@Override @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST", justification = "The NotificationEvent is cast to a StorageUnitStatusChangeNotificationEvent which is always the case since" + " we manage the event type to a builder in a map defined in NotificationMessageManager") public Map<String, Object> getNotificationMessageVelocityContextMap(NotificationEvent notificationEvent) { StorageUnitStatusChangeNotificationEvent event = (StorageUnitStatusChangeNotificationEvent) notificationEvent; Map<String, Object> velocityContextMap = new HashMap<>(); addObjectPropertyToContext(velocityContextMap, "businessObjectDataKey", event.getBusinessObjectDataKey(), escapeJsonBusinessObjectDataKey(event.getBusinessObjectDataKey()), escapeXmlBusinessObjectDataKey(event.getBusinessObjectDataKey())); addStringPropertyToContext(velocityContextMap, "storageName", event.getStorageName()); addStringPropertyToContext(velocityContextMap, "newStorageUnitStatus", event.getNewStorageUnitStatus()); addStringPropertyToContext(velocityContextMap, "oldStorageUnitStatus", event.getOldStorageUnitStatus()); addStringPropertyToContext(velocityContextMap, "namespace", event.getBusinessObjectDataKey().getNamespace()); return velocityContextMap; }
@Override @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST", justification = "The NotificationEvent is cast to a StorageUnitStatusChangeNotificationEvent which is always the case since" + " we manage the event type to a builder in a map defined in NotificationMessageManager") public Map<String, Object> getNotificationMessageVelocityContextMap(NotificationEvent notificationEvent) { StorageUnitStatusChangeNotificationEvent event = (StorageUnitStatusChangeNotificationEvent) notificationEvent; Map<String, Object> velocityContextMap = new HashMap<>(); addObjectPropertyToContext(velocityContextMap, "businessObjectDataKey", event.getBusinessObjectDataKey(), escapeJsonBusinessObjectDataKey(event.getBusinessObjectDataKey()), escapeXmlBusinessObjectDataKey(event.getBusinessObjectDataKey())); addStringPropertyToContext(velocityContextMap, "storageName", event.getStorageName()); addStringPropertyToContext(velocityContextMap, "newStorageUnitStatus", event.getNewStorageUnitStatus()); addStringPropertyToContext(velocityContextMap, "oldStorageUnitStatus", event.getOldStorageUnitStatus()); addStringPropertyToContext(velocityContextMap, "namespace", event.getBusinessObjectDataKey().getNamespace()); return velocityContextMap; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { super.appendFields(locator, buffer, strategy); { BusinessObjectDataKey theBusinessObjectDataKey; theBusinessObjectDataKey = this.getBusinessObjectDataKey(); strategy.appendField(locator, this, "businessObjectDataKey", buffer, theBusinessObjectDataKey, (this.businessObjectDataKey!= null)); } { String theStorageName; theStorageName = this.getStorageName(); strategy.appendField(locator, this, "storageName", buffer, theStorageName, (this.storageName!= null)); } { String theNewStorageUnitStatus; theNewStorageUnitStatus = this.getNewStorageUnitStatus(); strategy.appendField(locator, this, "newStorageUnitStatus", buffer, theNewStorageUnitStatus, (this.newStorageUnitStatus!= null)); } { String theOldStorageUnitStatus; theOldStorageUnitStatus = this.getOldStorageUnitStatus(); strategy.appendField(locator, this, "oldStorageUnitStatus", buffer, theOldStorageUnitStatus, (this.oldStorageUnitStatus!= null)); } return buffer; }
lhsStorageName = this.getStorageName(); String rhsStorageName; rhsStorageName = that.getStorageName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "storageName", lhsStorageName), LocatorUtils.property(thatLocator, "storageName", rhsStorageName), lhsStorageName, rhsStorageName, (this.storageName!= null), (that.storageName!= null))) { return false;
public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) { int currentHashCode = super.hashCode(locator, strategy); { BusinessObjectDataKey theBusinessObjectDataKey; theBusinessObjectDataKey = this.getBusinessObjectDataKey(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "businessObjectDataKey", theBusinessObjectDataKey), currentHashCode, theBusinessObjectDataKey, (this.businessObjectDataKey!= null)); } { String theStorageName; theStorageName = this.getStorageName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "storageName", theStorageName), currentHashCode, theStorageName, (this.storageName!= null)); } { String theNewStorageUnitStatus; theNewStorageUnitStatus = this.getNewStorageUnitStatus(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "newStorageUnitStatus", theNewStorageUnitStatus), currentHashCode, theNewStorageUnitStatus, (this.newStorageUnitStatus!= null)); } { String theOldStorageUnitStatus; theOldStorageUnitStatus = this.getOldStorageUnitStatus(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "oldStorageUnitStatus", theOldStorageUnitStatus), currentHashCode, theOldStorageUnitStatus, (this.oldStorageUnitStatus!= null)); } return currentHashCode; }
if (storageNameShouldBeCopiedAndSet == Boolean.TRUE) { String sourceStorageName; sourceStorageName = this.getStorageName(); String copyStorageName = ((String) strategy.copy(LocatorUtils.property(locator, "storageName", sourceStorageName), sourceStorageName, (this.storageName!= null))); copy.setStorageName(copyStorageName);