@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; }
lhsOldStorageUnitStatus = this.getOldStorageUnitStatus(); String rhsOldStorageUnitStatus; rhsOldStorageUnitStatus = that.getOldStorageUnitStatus(); if (!strategy.equals(LocatorUtils.property(thisLocator, "oldStorageUnitStatus", lhsOldStorageUnitStatus), LocatorUtils.property(thatLocator, "oldStorageUnitStatus", rhsOldStorageUnitStatus), lhsOldStorageUnitStatus, rhsOldStorageUnitStatus, (this.oldStorageUnitStatus!= null), (that.oldStorageUnitStatus!= 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 (oldStorageUnitStatusShouldBeCopiedAndSet == Boolean.TRUE) { String sourceOldStorageUnitStatus; sourceOldStorageUnitStatus = this.getOldStorageUnitStatus(); String copyOldStorageUnitStatus = ((String) strategy.copy(LocatorUtils.property(locator, "oldStorageUnitStatus", sourceOldStorageUnitStatus), sourceOldStorageUnitStatus, (this.oldStorageUnitStatus!= null))); copy.setOldStorageUnitStatus(copyOldStorageUnitStatus);