Methods Summary |
---|
public void | addEjbReferenceDescriptor(EjbReferenceDescriptor ejbReference)Add a reference to an ejb.
addEjbReferenceDescriptor((EjbReference) ejbReference);
|
public void | addEjbReferenceDescriptor(com.sun.enterprise.deployment.types.EjbReference ejbReference)
this.getEjbReferenceDescriptors().add(ejbReference);
ejbReference.setReferringBundleDescriptor(this);
this.changed();
|
public void | addEntityManagerFactoryReferenceDescriptor(EntityManagerFactoryReferenceDescriptor reference)
reference.setReferringBundleDescriptor(this);
this.getEntityManagerFactoryReferenceDescriptors().add(reference);
this.changed();
|
public void | addEntityManagerReferenceDescriptor(EntityManagerReferenceDescriptor reference)
reference.setReferringBundleDescriptor(this);
this.getEntityManagerReferenceDescriptors().add(reference);
this.changed();
|
public void | addEnvironmentProperty(EnvironmentProperty environmentProperty)Adds an environment property to this application client [{0}].
this.getEnvironmentProperties().add(environmentProperty);
this.changed();
|
public void | addJmsDestinationReferenceDescriptor(JmsDestinationReferenceDescriptor jmsDestReference)
this.getJmsDestinationReferenceDescriptors().add(jmsDestReference);
this.changed();
|
public void | addMessageDestinationReferenceDescriptor(MessageDestinationReferenceDescriptor messageDestRef)
messageDestRef.setReferringBundleDescriptor(this);
this.getMessageDestinationReferenceDescriptors().add(messageDestRef);
this.changed();
|
public void | addPostConstructDescriptor(LifecycleCallbackDescriptor postConstructDesc)
String className = postConstructDesc.getLifecycleCallbackClass();
boolean found = false;
for (LifecycleCallbackDescriptor next :
getPostConstructDescriptors()) {
if ( (next.getLifecycleCallbackClass() != null) &&
next.getLifecycleCallbackClass().equals(className)) {
found = true;
break;
}
}
if (!found) {
getPostConstructDescriptors().add(postConstructDesc);
}
|
public void | addPreDestroyDescriptor(LifecycleCallbackDescriptor preDestroyDesc)
String className = preDestroyDesc.getLifecycleCallbackClass();
boolean found = false;
for (LifecycleCallbackDescriptor next :
getPreDestroyDescriptors()) {
if ( (next.getLifecycleCallbackClass() != null) &&
next.getLifecycleCallbackClass().equals(className)) {
found = true;
break;
}
}
if (!found) {
getPreDestroyDescriptors().add(preDestroyDesc);
}
|
public void | addResourceReferenceDescriptor(ResourceReferenceDescriptor resourceReference)Adds a reference to a resource.
this.getResourceReferenceDescriptors().add(resourceReference);
this.changed();
|
public void | addServiceReferenceDescriptor(ServiceReferenceDescriptor serviceRef)
serviceRef.setBundleDescriptor(this);
this.getServiceReferenceDescriptors().add(serviceRef);
this.changed();
|
public java.util.Collection | findReferencedPUs()This method is used to find out the precise list of PUs that are
referenced by the appclient. An appclient can not use container
managed EM as there is no support for JTA in our ACC, so this method
only returns the list of PUs referenced via @PersistenceUnit or
.
return findReferencedPUsViaPURefs(this);
|
public java.lang.String | getCallbackHandler()Get the classname of the callback handler.
return callbackHandler;
|
public java.util.Set | getComponentClassNames()
Set set = new HashSet<String>();
set.add(getMainClassName());
return set;
|
public java.lang.String | getDefaultSpecVersion()
return AppClientNode.SPEC_VERSION;
|
public com.sun.enterprise.deployment.types.EjbReference | getEjbReference(java.lang.String name)Looks up an ejb reference with the given name. Throws an IllegalArgumentException
if it is not found.
for (Iterator itr = this.getEjbReferenceDescriptors().iterator(); itr.hasNext();) {
EjbReference ejr = (EjbReference) itr.next();
if (ejr.getName().equals(name)) {
return ejr;
}
}
throw new IllegalArgumentException(localStrings.getLocalString(
"exceptionappclienthasnoejbrefbyname",
"This application client [{0}] has no ejb reference by the name of [{1}]",
new Object[] {getName(), name}));
|
public EjbReferenceDescriptor | getEjbReferenceByName(java.lang.String name)Looks up an ejb reference with the given name. Throws an IllegalArgumentException
if it is not found.
for (Iterator itr = this.getEjbReferenceDescriptors().iterator(); itr.hasNext();) {
EjbReferenceDescriptor ejr = (EjbReferenceDescriptor) itr.next();
if (ejr.getName().equals(name)) {
return ejr;
}
}
throw new IllegalArgumentException(localStrings.getLocalString(
"exceptionappclienthasnoejbrefbyname",
"This application client [{0}] has no ejb reference by the name of [{1}]",
new Object[] {getName(), name}));
|
public java.util.Set | getEjbReferenceDescriptors()Return the set of references to ejbs that I have.
if (this.ejbReferences == null) {
this.ejbReferences = new OrderedSet();
}
return this.ejbReferences = new OrderedSet(this.ejbReferences);
|
public EntityManagerFactoryReferenceDescriptor | getEntityManagerFactoryReferenceByName(java.lang.String name)Return the entity manager factory reference descriptor corresponding to
the given name.
for (EntityManagerFactoryReferenceDescriptor next :
getEntityManagerFactoryReferenceDescriptors()) {
if (next.getName().equals(name)) {
return next;
}
}
throw new IllegalArgumentException(localStrings.getLocalString(
"exceptionappclienthasnoentitymgrfactoryrefbyname",
"This application client [{0}] has no entity manager factory reference by the name of [{1}]",
new Object[] {getName(), name}));
|
public java.util.Set | getEntityManagerFactoryReferenceDescriptors()
return entityManagerFactoryReferences;
|
public EntityManagerReferenceDescriptor | getEntityManagerReferenceByName(java.lang.String name)Return the entity manager factory reference descriptor corresponding to
the given name.
throw new IllegalArgumentException(localStrings.getLocalString(
"exceptionappclienthasnoentitymgrrefbyname",
"This application client [{0}] has no entity manager reference by the name of [{1}]",
new Object[] {getName(), name}));
|
public java.util.Set | getEntityManagerReferenceDescriptors()
return entityManagerReferences;
|
public java.util.Set | getEnvironmentProperties()Returns the set of environment properties of this app client.
if (this.environmentProperties == null) {
this.environmentProperties = new OrderedSet();
}
return this.environmentProperties = new OrderedSet(this.environmentProperties);
|
public EnvironmentProperty | getEnvironmentPropertyByName(java.lang.String name)Returns the environment property object searching on the supplied key.
throws an illegal argument exception if no such environment property exists.
for (Iterator itr = this.getEnvironmentProperties().iterator();
itr.hasNext();) {
EnvironmentProperty ev = (EnvironmentProperty) itr.next();
if (ev.getName().equals(name)) {
return ev;
}
}
throw new IllegalArgumentException(localStrings.getLocalString(
"enterprise.deployment.exceptionappclienthasnoenvpropertybyname",
"This application client [{0}] has no environment property by the name of [{1}]",
new Object[] {getName(), name}));
|
public java.util.List | getInjectableResourcesByClass(java.lang.String className)
return getInjectableResourcesByClass(className, this);
|
public InjectionInfo | getInjectionInfoByClass(java.lang.String className)
return getInjectionInfoByClass(className, this);
|
public com.sun.enterprise.deployment.runtime.JavaWebStartAccessDescriptor | getJavaWebStartAccessDescriptor()
if (jwsAccessDescriptor == null) {
jwsAccessDescriptor = new JavaWebStartAccessDescriptor();
jwsAccessDescriptor.setBundleDescriptor(this);
}
return jwsAccessDescriptor;
|
public JmsDestinationReferenceDescriptor | getJmsDestinationReferenceByName(java.lang.String name)Return a JMS destination reference by the same name or throw an IllegalArgumentException.
for (Iterator itr = this.getJmsDestinationReferenceDescriptors().iterator(); itr.hasNext();) {
JmsDestinationReferenceDescriptor jdr = (JmsDestinationReferenceDescriptor) itr.next();
if (jdr.getName().equals(name)) {
return jdr;
}
}
throw new IllegalArgumentException(localStrings.getLocalString(
"enterprise.deployment.exceptionappclienthasnojmsdestrefbyname",
"This application client [{0}] has no resource environment reference by the name of [{1}]",
new Object[] {getName(), name}));
|
public java.util.Set | getJmsDestinationReferenceDescriptors()Return the set of JMS destination references this ejb declares.
if (this.jmsDestReferences == null) {
this.jmsDestReferences = new OrderedSet();
}
return this.jmsDestReferences = new OrderedSet(this.jmsDestReferences);
|
public java.lang.String | getMainClassName()Return the fq Java clasname of this application client [{0}].
if (this.mainClassName == null) {
this.mainClassName = "";
}
return this.mainClassName;
|
public MessageDestinationReferenceDescriptor | getMessageDestinationReferenceByName(java.lang.String name)Looks up an message destination reference with the given name.
Throws an IllegalArgumentException if it is not found.
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(
"exceptionappclienthasnomsgdestrefbyname",
"This application client [{0}] has no message destination reference by the name of [{1}]",
new Object[] {getName(), name}));
|
public java.util.Set | getMessageDestinationReferenceDescriptors()
if( this.messageDestReferences == null ) {
this.messageDestReferences = new OrderedSet();
}
return this.messageDestReferences =
new OrderedSet(this.messageDestReferences);
|
public javax.enterprise.deploy.shared.ModuleType | getModuleType()
return ModuleType.CAR;
|
public java.util.Collection | getNamedDescriptors()Return the set of named descriptors I reference.
return super.getNamedDescriptorsFrom(this);
|
public java.util.Vector | getNamedReferencePairs()Return the set of named reference pairs I reference.
return super.getNamedReferencePairsFrom(this);
|
public LifecycleCallbackDescriptor | getPostConstructDescriptorByClass(java.lang.String className)
return getPostConstructDescriptorByClass(className, this);
|
public java.util.Set | getPostConstructDescriptors()
return postConstructDescs;
|
public LifecycleCallbackDescriptor | getPreDestroyDescriptorByClass(java.lang.String className)
return getPreDestroyDescriptorByClass(className, this);
|
public java.util.Set | getPreDestroyDescriptors()
return preDestroyDescs;
|
public ResourceReferenceDescriptor | getResourceReferenceByName(java.lang.String name)Looks up a reference to a resource by its name (getName()). Throws an IllegalArgumentException
if no such descriptor is found.
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 java.util.Set | getResourceReferenceDescriptors()Return the set of references to resources that I have.
if (this.resourceReferences == null) {
this.resourceReferences = new OrderedSet();
}
return this.resourceReferences = new OrderedSet(this.resourceReferences);
|
public ServiceReferenceDescriptor | getServiceReferenceByName(java.lang.String name)Looks up an service reference with the given name.
Throws an IllegalArgumentException if it is not found.
for (Iterator itr = this.getServiceReferenceDescriptors().iterator();
itr.hasNext();) {
ServiceReferenceDescriptor srd = (ServiceReferenceDescriptor)
itr.next();
if (srd.getName().equals(name)) {
return srd;
}
}
throw new IllegalArgumentException(localStrings.getLocalString(
"enterprise.deployment.exceptionappclienthasnoservicerefbyname",
"This application client [{0}] has no service reference by the name of [{1}]",
new Object[] {getName(), name}));
|
public java.util.Set | getServiceReferenceDescriptors()
if( this.serviceReferences == null ) {
this.serviceReferences = new OrderedSet();
}
return this.serviceReferences = new OrderedSet(this.serviceReferences);
|
public boolean | hasRuntimeInformation()Return true if there is runtime information in this
object that must be saved.
for (Iterator itr = this.getNamedDescriptors().iterator(); itr.hasNext();) {
NamedDescriptor next = (NamedDescriptor) itr.next();
if (!"".equals(next.getJndiName())) {
return true;
}
}
return false;
|
public boolean | hasWebServiceClients()
return !(getServiceReferenceDescriptors().isEmpty());
|
public boolean | hasWebServices()
return false;
|
public void | print(java.lang.StringBuffer toStringBuffer)
toStringBuffer.append("Application Client Descriptor");
toStringBuffer.append("\n ");
super.print(toStringBuffer);
toStringBuffer.append("\n environmentProperties ").append(environmentProperties);
toStringBuffer.append("\n ejbReferences ");
if(ejbReferences != null)
printDescriptorSet(ejbReferences,toStringBuffer);
toStringBuffer.append("\n jmsDestReferences ");
if(jmsDestReferences != null)
printDescriptorSet(jmsDestReferences,toStringBuffer);
toStringBuffer.append("\n messageDestReferences ");
if(messageDestReferences != null)
printDescriptorSet(messageDestReferences,toStringBuffer);
toStringBuffer.append("\n resourceReferences ");
if(resourceReferences != null)
printDescriptorSet(resourceReferences,toStringBuffer);
toStringBuffer.append("\n serviceReferences ");
if(serviceReferences != null)
printDescriptorSet(serviceReferences,toStringBuffer);
toStringBuffer.append("\n mainClassName ").append(mainClassName);
|
private void | printDescriptorSet(java.util.Set descSet, java.lang.StringBuffer sbuf)
for(Iterator itr = descSet.iterator(); itr.hasNext();){
Object obj = itr.next();
if(obj instanceof Descriptor)
((Descriptor)obj).print(sbuf);
else
sbuf.append(obj);
}
|
public void | removeEjbReferenceDescriptor(EjbReferenceDescriptor ejbReference)Removes the given reference to an ejb.
removeEjbReferenceDescriptor((EjbReference) ejbReference);
|
public void | removeEjbReferenceDescriptor(com.sun.enterprise.deployment.types.EjbReference ejbReference)
this.getEjbReferenceDescriptors().remove(ejbReference);
ejbReference.setReferringBundleDescriptor(null);
this.changed();
|
public void | removeEnvironmentProperty(EnvironmentProperty environmentProperty)Remove the given environment property
this.getEnvironmentProperties().remove(environmentProperty);
this.changed();
|
public void | removeJmsDestinationReferenceDescriptor(JmsDestinationReferenceDescriptor jmsDestReference)
this.getJmsDestinationReferenceDescriptors().remove(jmsDestReference);
this.changed();
|
public void | removeMessageDestinationReferenceDescriptor(MessageDestinationReferenceDescriptor msgDestRef)
this.getMessageDestinationReferenceDescriptors().remove(msgDestRef);
this.changed();
|
public void | removeResourceReferenceDescriptor(ResourceReferenceDescriptor resourceReference)Removes the given resource reference from this app client.
this.getResourceReferenceDescriptors().remove(resourceReference);
this.changed();
|
public void | removeServiceReferenceDescriptor(ServiceReferenceDescriptor serviceRef)
this.getServiceReferenceDescriptors().remove(serviceRef);
this.changed();
|
public void | setCallbackHandler(java.lang.String handler)Set the classname of the callback handler.
callbackHandler = handler;
this.changed();
|
public void | setJavaWebStartAccessDescriptor(com.sun.enterprise.deployment.runtime.JavaWebStartAccessDescriptor descr)
descr.setBundleDescriptor(this);
jwsAccessDescriptor = descr;
this.changed();
|
public void | setMainClassName(java.lang.String mainClassName)Sets the main classname of this app client.
this.mainClassName = mainClassName;
this.changed();
|
public void | visit(com.sun.enterprise.deployment.util.DescriptorVisitor aVisitor)visit the descriptor and all sub descriptors with a DOL visitor implementation
if (aVisitor instanceof AppClientVisitor) {
visit((AppClientVisitor) aVisitor);
} else {
super.visit(aVisitor);
}
|
public void | visit(com.sun.enterprise.deployment.util.AppClientVisitor aVisitor)visit the descriptor and all sub descriptors with a DOL visitor implementation
aVisitor.accept(this);
// Visit all injectables first. In some cases, basic type information
// has to be derived from target inject method or inject field.
for(InjectionCapable injectable : getInjectableResources(this)) {
aVisitor.accept(injectable);
}
Set ejbRefs = getEjbReferenceDescriptors();
for (Iterator itr = ejbRefs.iterator();itr.hasNext();) {
aVisitor.accept((EjbReference) itr.next());
}
for (Iterator itr=getResourceReferenceDescriptors().iterator();
itr.hasNext();) {
ResourceReferenceDescriptor next =
(ResourceReferenceDescriptor) itr.next();
aVisitor.accept(next);
}
for (Iterator itr=getJmsDestinationReferenceDescriptors().iterator();
itr.hasNext();) {
JmsDestinationReferenceDescriptor next =
(JmsDestinationReferenceDescriptor) itr.next();
aVisitor.accept(next);
}
Set msgDestRefs = getMessageDestinationReferenceDescriptors();
for (Iterator itr = msgDestRefs.iterator();itr.hasNext();) {
aVisitor.accept((MessageDestinationReferencer) itr.next());
}
for (Iterator itr = getMessageDestinations().iterator();
itr.hasNext();) {
MessageDestinationDescriptor msgDestDescriptor =
(MessageDestinationDescriptor)itr.next();
aVisitor.accept(msgDestDescriptor);
}
Set serviceRefs = getServiceReferenceDescriptors();
for (Iterator itr = serviceRefs.iterator();itr.hasNext();) {
aVisitor.accept((ServiceReferenceDescriptor) itr.next());
}
|