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; }
private void validateResRefs(JndiNameEnvironment env, Set<ResourceReferenceDescriptor> resRefs) { for (ResourceReferenceDescriptor resRef : resRefs) { validateEnvEntry(env, resRef, resRef.getName()); } }
/** * Equality on name. */ public boolean equals(Object object) { if (object instanceof ResourceReference) { ResourceReference resourceReference = (ResourceReference) object; return resourceReference.getName().equals(this.getName()); } return false; }
/** * Equality on name. */ public boolean equals(Object object) { if (object instanceof ResourceReference) { ResourceReference resourceReference = (ResourceReference) object; return resourceReference.getName().equals(this.getName()); } return false; }
/** * Return the resource object corresponding to the supplied name or throw an illegal argument exception. */ public ResourceReferenceDescriptor getResourceReferenceByName(String name) { for (Iterator itr = this.getResourceReferenceDescriptors().iterator(); itr.hasNext();) { ResourceReferenceDescriptor next = (ResourceReferenceDescriptor) itr.next(); if (next.getName().equals(name)) { return next; } } throw new IllegalArgumentException("no resource ref of name " + name); }
/** * Return the resource object corresponding to the supplied name or throw an illegal argument exception. */ @Override public ResourceReferenceDescriptor getResourceReferenceByName(String name) { for (Iterator itr = getResourceReferenceDescriptors().iterator(); itr.hasNext();) { ResourceReferenceDescriptor next = (ResourceReferenceDescriptor) itr.next(); if (next.getName().equals(name)) { return next; } } throw new IllegalArgumentException("no resource ref of name " + name); }
public ResourceReferenceDescriptor getResourceReferenceByName(String name) { for (Iterator itr = this.getResourceReferenceDescriptors().iterator(); itr.hasNext();) { ResourceReferenceDescriptor next = (ResourceReferenceDescriptor) itr.next(); if (next.getName().equals(name)) { return next; } } throw new IllegalArgumentException(localStrings.getLocalString( "enterprise.deployment.exceptionhasnoresourcerefbyname", "This class has no resource reference by the name of {0}", new Object[] {name})); }
public ResourceReferenceDescriptor getResourceReferenceByName(String name) { for (Iterator itr = this.getResourceReferenceDescriptors().iterator(); itr.hasNext();) { ResourceReferenceDescriptor next = (ResourceReferenceDescriptor) itr.next(); if (next.getName().equals(name)) { return next; } } throw new IllegalArgumentException(localStrings.getLocalString( "enterprise.deployment.exceptionhasnoresourcerefbyname", "This class has no resource reference by the name of {0}", new Object[] {name})); }
/** * Return the resource object corresponding to the supplied name or throw an illegal argument exception. */ public ResourceReferenceDescriptor getResourceReferenceByName(String name) { for (Iterator itr = this.getResourceReferenceDescriptors().iterator(); itr.hasNext();) { ResourceReferenceDescriptor next = (ResourceReferenceDescriptor) itr.next(); if (next.getName().equals(name)) { return next; } } throw new IllegalArgumentException(localStrings.getLocalString( "enterprise.deployment.exceptionapphasnoresourcerefbyname", "This app {0} has no resource reference by the name of {1}", new Object[]{getRegistrationName(), name})); }
/** * Return the resource object corresponding to the supplied name or throw an illegal argument exception. */ public ResourceReferenceDescriptor getResourceReferenceByName(String name) { for (Iterator itr = this.getResourceReferenceDescriptors().iterator(); itr.hasNext();) { ResourceReferenceDescriptor next = (ResourceReferenceDescriptor) itr.next(); if (next.getName().equals(name)) { return next; } } throw new IllegalArgumentException(localStrings.getLocalString( "enterprise.deployment.exceptionapphasnoresourcerefbyname", "This app {0} has no resource reference by the name of {1}", new Object[]{getRegistrationName(), name})); }
/** * Looks up a reference to a resource by its name (getName()). Throws an IllegalArgumentException * if no such descriptor is found. */ public ResourceReferenceDescriptor getResourceReferenceByName(String name) { for (Iterator itr = this.getResourceReferenceDescriptors().iterator(); itr.hasNext();) { ResourceReferenceDescriptor rr = (ResourceReferenceDescriptor) itr.next(); if (rr.getName().equals(name)) { return rr; } } throw new IllegalArgumentException(localStrings.getLocalString( "exceptionappclienthasnoresourcerefbyname", "This application client [{0}] has no resource reference by the name of [{1}]", new Object[] {getName(), name})); }
public boolean isConflict(ResourceReferenceDescriptor other) { return (getName().equals(other.getName())) && (!(DOLUtils.equals(getType(), other.getType()) && getAuthorization().equals(other.getAuthorization()) && getSharingScope().equals(other.getSharingScope()) ) || isConflictResourceGroup(other)); } }
public boolean isConflict(ResourceReferenceDescriptor other) { return (getName().equals(other.getName())) && (!DOLUtils.equals(getType(), other.getType()) || isConflictResourceGroup(other)); }
boolean isConflict(ResourceReferenceDescriptor other) { return (getName().equals(other.getName())) && (!DOLUtils.equals(getType(), other.getType()) || isConflictResourceGroup(other)); }
/** * Set runtime default value for ResourceReferenceDescriptor. */ private void computeRuntimeDefault(ResourceReferenceDescriptor resRef) { if (resRef.getType() != null && resRef.getType().equals("org.omg.CORBA.ORB")) { resRef.setJndiName("java:comp/ORB"); } else if (resRef.getJndiName() == null || resRef.getJndiName().length() == 0) { resRef.setJndiName(getDefaultResourceJndiName(resRef.getName())); } }
/** * write the descriptor class to a DOM tree and return it * * @param parent node for the DOM tree * @param nodeName node name * @param descriptor the descriptor to write * @return the DOM tree top node */ @Override public Node writeDescriptor(Node parent, String nodeName, ResourceReferenceDescriptor descriptor) { Node refNode = appendChild(parent, nodeName); appendTextChild(refNode, TagNames.RESOURCE_REFERENCE_NAME, descriptor.getName()); appendTextChild(refNode, RuntimeTagNames.JNDI_NAME, descriptor.getJndiName()); return refNode; }
@Override protected void combineResourceReferenceDescriptors(JndiNameEnvironment env) { for (Object oresRef : env.getResourceReferenceDescriptors()) { ResourceReferenceDescriptor resRef = (ResourceReferenceDescriptor)oresRef; ResourceReferenceDescriptor rrd = _getResourceReferenceByName(resRef.getName()); if (rrd != null) { if (resRef.isConflict(rrd)) { conflictResourceReference = true; } unionInjectionTargets(rrd, resRef); } else { addResourceReferenceDescriptor(resRef); } } }
@Override public Node writeDescriptor(Node parent, String nodeName, ResourceReferenceDescriptor rrDescriptor) { Node rrNode = super.writeDescriptor(parent, nodeName, descriptor); appendTextChild(rrNode, TagNames.RESOURCE_REFERENCE_NAME, rrDescriptor.getName()); appendTextChild(rrNode, RuntimeTagNames.JNDI_NAME, rrDescriptor.getJndiName()); if (rrDescriptor.getResourcePrincipal() != null) { DefaultResourcePrincipalNode drpNode = new DefaultResourcePrincipalNode(); drpNode.writeDescriptor(rrNode, RuntimeTagNames.DEFAULT_RESOURCE_PRINCIPAL, rrDescriptor.getResourcePrincipal()); } return rrNode; }