/** * Create an instance of {@link StorageUnitStatusChangeNotificationEvent } * */ public StorageUnitStatusChangeNotificationEvent createStorageUnitStatusChangeNotificationEvent() { return new StorageUnitStatusChangeNotificationEvent(); }
@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 String toString() { final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); }
public Object clone() { return copyTo(createNewInstance()); }
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); super.copyTo(locator, draftCopy, strategy); if (draftCopy instanceof StorageUnitStatusChangeNotificationEvent) { if (businessObjectDataKeyShouldBeCopiedAndSet == Boolean.TRUE) { BusinessObjectDataKey sourceBusinessObjectDataKey; sourceBusinessObjectDataKey = this.getBusinessObjectDataKey(); BusinessObjectDataKey copyBusinessObjectDataKey = ((BusinessObjectDataKey) strategy.copy(LocatorUtils.property(locator, "businessObjectDataKey", sourceBusinessObjectDataKey), sourceBusinessObjectDataKey, (this.businessObjectDataKey!= null))); copy.setBusinessObjectDataKey(copyBusinessObjectDataKey); } else { if (businessObjectDataKeyShouldBeCopiedAndSet == Boolean.FALSE) { 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); } else { if (storageNameShouldBeCopiedAndSet == Boolean.FALSE) { if (newStorageUnitStatusShouldBeCopiedAndSet == Boolean.TRUE) { String sourceNewStorageUnitStatus; sourceNewStorageUnitStatus = this.getNewStorageUnitStatus(); String copyNewStorageUnitStatus = ((String) strategy.copy(LocatorUtils.property(locator, "newStorageUnitStatus", sourceNewStorageUnitStatus), sourceNewStorageUnitStatus, (this.newStorageUnitStatus!= null))); copy.setNewStorageUnitStatus(copyNewStorageUnitStatus); } else { if (newStorageUnitStatusShouldBeCopiedAndSet == Boolean.FALSE) { if (oldStorageUnitStatusShouldBeCopiedAndSet == Boolean.TRUE) {
public static StorageUnitStatusChangeNotificationEvent.Builder<Void> copyOnly(final StorageUnitStatusChangeNotificationEvent _other, final PropertyTree _propertyTree) { return copyOf(_other, _propertyTree, PropertyTreeUse.INCLUDE); }
public Object copyTo(Object target) { final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE; return copyTo(null, target, strategy); }
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; }
public static StorageUnitStatusChangeNotificationEvent.Builder<Void> copyExcept(final NotificationEvent _other, final PropertyTree _propertyTree) { return copyOf(_other, _propertyTree, PropertyTreeUse.EXCLUDE); }
public static<_B >StorageUnitStatusChangeNotificationEvent.Builder<_B> copyOf(final StorageUnitStatusChangeNotificationEvent _other) { final StorageUnitStatusChangeNotificationEvent.Builder<_B> _newBuilder = new StorageUnitStatusChangeNotificationEvent.Builder<_B>(null, null, false); _other.copyTo(_newBuilder); return _newBuilder; }
@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 Object createNewInstance() { return new StorageUnitStatusChangeNotificationEvent(); }
public static StorageUnitStatusChangeNotificationEvent.Builder<Void> copyExcept(final StorageUnitStatusChangeNotificationEvent _other, final PropertyTree _propertyTree) { return copyOf(_other, _propertyTree, PropertyTreeUse.EXCLUDE); }
public static<_B >StorageUnitStatusChangeNotificationEvent.Builder<_B> copyOf(final StorageUnitStatusChangeNotificationEvent _other, final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) { final StorageUnitStatusChangeNotificationEvent.Builder<_B> _newBuilder = new StorageUnitStatusChangeNotificationEvent.Builder<_B>(null, null, false); _other.copyTo(_newBuilder, _propertyTree, _propertyTreeUse); return _newBuilder; }
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; }
@Override public StorageUnitStatusChangeNotificationEvent build() { if (_storedValue == null) { return this.init(new StorageUnitStatusChangeNotificationEvent()); } else { return ((StorageUnitStatusChangeNotificationEvent) _storedValue); } }
public static StorageUnitStatusChangeNotificationEvent.Builder<Void> copyOnly(final NotificationEvent _other, final PropertyTree _propertyTree) { return copyOf(_other, _propertyTree, PropertyTreeUse.INCLUDE); }
lhsBusinessObjectDataKey = this.getBusinessObjectDataKey(); BusinessObjectDataKey rhsBusinessObjectDataKey; rhsBusinessObjectDataKey = that.getBusinessObjectDataKey(); if (!strategy.equals(LocatorUtils.property(thisLocator, "businessObjectDataKey", lhsBusinessObjectDataKey), LocatorUtils.property(thatLocator, "businessObjectDataKey", rhsBusinessObjectDataKey), lhsBusinessObjectDataKey, rhsBusinessObjectDataKey, (this.businessObjectDataKey!= null), (that.businessObjectDataKey!= null))) { return false; 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; lhsNewStorageUnitStatus = this.getNewStorageUnitStatus(); String rhsNewStorageUnitStatus; rhsNewStorageUnitStatus = that.getNewStorageUnitStatus(); if (!strategy.equals(LocatorUtils.property(thisLocator, "newStorageUnitStatus", lhsNewStorageUnitStatus), LocatorUtils.property(thatLocator, "newStorageUnitStatus", rhsNewStorageUnitStatus), lhsNewStorageUnitStatus, rhsNewStorageUnitStatus, (this.newStorageUnitStatus!= null), (that.newStorageUnitStatus!= null))) { return false; 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;
@Override public List<NotificationMessage> processStorageUnitStatusChangeNotificationEvent(BusinessObjectDataKey businessObjectDataKey, String storageName, String newStorageUnitStatus, String oldStorageUnitStatus) { return processNotificationMessages(notificationMessageManager.buildNotificationMessages( new StorageUnitStatusChangeNotificationEvent(businessObjectDataKey, storageName, newStorageUnitStatus, oldStorageUnitStatus))); }
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; }