public String getName() { return decoree.getName(); }
public int hashCode() { int result = NULL_HASH_CODE; String name = getName(); if (name != null) { result += name.hashCode(); } return result; } }
/** * Looks up an message destination reference with the given name. * Throws an IllegalArgumentException if it is not found. */ public MessageDestinationReferenceDescriptor getMessageDestinationReferenceByName(String name) { for (MessageDestinationReferenceDescriptor mdr : messageDestReferences) { if (mdr.getName().equals(name)) { return mdr; } } throw new IllegalArgumentException("No message destination ref of name " + name); }
/** * Looks up an message destination reference with the given name. * Throws an IllegalArgumentException if it is not found. */ @Override public MessageDestinationReferenceDescriptor getMessageDestinationReferenceByName(String name) { for (MessageDestinationReferenceDescriptor mdr : messageDestReferences) { if (mdr.getName().equals(name)) { return mdr; } } throw new IllegalArgumentException("No message destination ref of name " + name); }
protected MessageDestinationReferenceDescriptor _getMessageDestinationReferenceByName(String name) { for (MessageDestinationReferenceDescriptor mdr : getMessageDestinationReferenceDescriptors()) { if (mdr.getName().equals(name)) { return mdr; } } return null; }
public boolean equals(Object object) { if (object instanceof MessageDestinationReference) { MessageDestinationReference reference = (MessageDestinationReference) object; return reference.getName().equals(this.getName()); } return false; }
public boolean equals(Object object) { if (object instanceof MessageDestinationReference) { MessageDestinationReference reference = (MessageDestinationReference) object; return reference.getName().equals(this.getName()); } return false; } }
/** returns a formatted string representing me. */ public void print(StringBuffer toStringBuffer) { if (isLinkedToMessageDestination()) { toStringBuffer.append("Resolved Message-Destination-Ref ").append(getName()).append( "points to logical message destination ").append(getMessageDestination().getName()); } else { toStringBuffer.append("Unresolved Message-Destination-Ref ").append(getName()).append( "@").append(getType()).append("@").append(usage); } }
/** returns a formatted string representing me. */ public void print(StringBuffer toStringBuffer) { if (isLinkedToMessageDestination()) { toStringBuffer.append("Resolved Message-Destination-Ref ").append(getName()).append( "points to logical message destination ").append(getMessageDestination().getName()); } else { toStringBuffer.append("Unresolved Message-Destination-Ref ").append(getName()).append( "@").append(getType()).append("@").append(usage); } }
public MessageDestinationReferenceDescriptor getMessageDestinationReferenceByName(String name) { for (Iterator itr = this.getMessageDestinationReferenceDescriptors().iterator(); itr.hasNext();) { MessageDestinationReferenceDescriptor mdr = (MessageDestinationReferenceDescriptor) itr.next(); if (mdr.getName().equals(name)) { return mdr; } } throw new IllegalArgumentException(localStrings.getLocalString( "enterprise.deployment.exceptionhasnomsgdestrefbyname", "This class has no message destination reference by the name of {0}", new Object[] {name})); }
public MessageDestinationReferenceDescriptor getMessageDestinationReferenceByName(String name) { for (Iterator itr = this.getMessageDestinationReferenceDescriptors().iterator(); itr.hasNext();) { MessageDestinationReferenceDescriptor mdr = (MessageDestinationReferenceDescriptor) itr.next(); if (mdr.getName().equals(name)) { return mdr; } } throw new IllegalArgumentException(localStrings.getLocalString( "enterprise.deployment.exceptionhasnomsgdestrefbyname", "This class has no message destination reference by the name of {0}", new Object[] {name})); }
/** * Looks up an message destination reference with the given name. * Throws an IllegalArgumentException if it is not found. */ public MessageDestinationReferenceDescriptor getMessageDestinationReferenceByName(String name) { for (MessageDestinationReferenceDescriptor mdr : messageDestReferences) { if (mdr.getName().equals(name)) { return mdr; } } throw new IllegalArgumentException(localStrings.getLocalString( "exceptionapphasnomsgdestrefbyname", "This app [{0}] has no message destination reference by the name of [{1}]", new Object[]{getRegistrationName(), name})); }
/** * Looks up an message destination reference with the given name. * Throws an IllegalArgumentException if it is not found. */ public MessageDestinationReferenceDescriptor getMessageDestinationReferenceByName(String name) { for (MessageDestinationReferenceDescriptor mdr : messageDestReferences) { if (mdr.getName().equals(name)) { return mdr; } } throw new IllegalArgumentException(localStrings.getLocalString( "exceptionapphasnomsgdestrefbyname", "This app [{0}] has no message destination reference by the name of [{1}]", new Object[]{getRegistrationName(), name})); }
/** * Set runtime default value for MessageDestinationReferenceDescriptor. */ private void computeRuntimeDefault(MessageDestinationReferenceDescriptor msgDestRef) { if (msgDestRef.getJndiName() == null || msgDestRef.getJndiName().length() == 0) { msgDestRef.setJndiName(getDefaultResourceJndiName(msgDestRef.getName())); } }
/** * Set runtime default value for MessageDestinationReferenceDescriptor. */ private void computeRuntimeDefault(MessageDestinationReferenceDescriptor msgDestRef) { if (msgDestRef.getJndiName() == null || msgDestRef.getJndiName().length() == 0) { msgDestRef.setJndiName(getDefaultResourceJndiName(msgDestRef.getName())); } }
boolean isConflict(MessageDestinationReferenceDescriptor other) { return getName().equals(other.getName()) && (!( DOLUtils.equals(getDestinationType(), other.getDestinationType()) && DOLUtils.equals(getUsage(), other.getUsage()) && DOLUtils.equals(getMessageDestinationLinkName(), other.getMessageDestinationLinkName()) ) || isConflictResourceGroup(other)); }
@Override public Node writeDescriptor(Node parent, String nodeName, MessageDestinationReferenceDescriptor msgDestRef) { Node msgDestRefNode = super.writeDescriptor(parent, nodeName, msgDestRef); appendTextChild(msgDestRefNode, RuntimeTagNames.MESSAGE_DESTINATION_REFERENCE_NAME, msgDestRef.getName()); appendTextChild(msgDestRefNode, RuntimeTagNames.JNDI_NAME, msgDestRef.getJndiName()); return msgDestRefNode; }
public boolean isConflict(MessageDestinationReferenceDescriptor other) { return getName().equals(other.getName()) && (!( DOLUtils.equals(getDestinationType(), other.getDestinationType()) && DOLUtils.equals(getUsage(), other.getUsage()) && DOLUtils.equals(getMessageDestinationLinkName(), other.getMessageDestinationLinkName()) ) || isConflictResourceGroup(other)); }
@Override protected void combineMessageDestinationReferenceDescriptors(JndiNameEnvironment env) { for (Object omdRef : env.getMessageDestinationReferenceDescriptors()) { MessageDestinationReferenceDescriptor mdRef = (MessageDestinationReferenceDescriptor)omdRef; MessageDestinationReferenceDescriptor mdr = _getMessageDestinationReferenceByName(mdRef.getName()); if (mdr != null) { if (mdr.isConflict(mdRef)) { conflictMessageDestinationReference = true; } unionInjectionTargets(mdr, mdRef); } else { addMessageDestinationReferenceDescriptor(mdRef); } } }
/** * If the message destination ref is linked to a message destination, fetch the linked destination and validate it. * We might be duplicating our validation efforts since we are already validating message destination separately. */ private void parseResources(MessageDestinationReferenceDescriptor msgDestRef, JndiNameEnvironment env, AppResources appResources) { String name = getLogicalJNDIName(msgDestRef.getName(), env); String jndiName; if (msgDestRef.isLinkedToMessageDestination()) { jndiName = msgDestRef.getMessageDestination().getJndiName(); } else { jndiName = msgDestRef.getJndiName(); } appResources.store(new AppResource(name, jndiName, msgDestRef.getType(), env, true)); }