/** * Return the entity manager factory reference descriptor corresponding to * the given name. */ public EntityManagerReferenceDescriptor getEntityManagerReferenceByName(String 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})); }
/** * Return the entity manager factory reference descriptor corresponding to * the given name. */ public EntityManagerReferenceDescriptor getEntityManagerReferenceByName(String 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})); }
@Override public Set<ResourceDescriptor> getResourceDescriptors(JavaEEResourceType type) { switch(type) { case CFD: throw new UnsupportedOperationException(localStrings.getLocalString( "enterprise.deployment.exceptionappclientnotsupportconnectionfactorydefinition", "The application client [{0}] do not support connection factory definitions", new Object[] {getName()})); case AODD: throw new UnsupportedOperationException(localStrings.getLocalString( "enterprise.deployment.exceptionappclientnotsupportadministeredobjectdefinition", "The application client [{0}] do not support administered object definitions", new Object[] {getName()})); } return super.getResourceDescriptors(type); }
/** * 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})); }
/** * Looks up an ejb reference with the given name. Throws an IllegalArgumentException * if it is not found. */ public EjbReference getEjbReference(String name) { 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})); }
/** * Looks up an ejb reference with the given name. Throws an IllegalArgumentException * if it is not found. */ public EjbReferenceDescriptor getEjbReferenceByName(String name) { 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})); }
/** * Looks up an ejb reference with the given name. Throws an IllegalArgumentException * if it is not found. */ public EjbReference getEjbReference(String name) { 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})); }
/** * Return a resource environment reference by the same name or throw an IllegalArgumentException. */ public ResourceEnvReferenceDescriptor getResourceEnvReferenceByName(String name) { for (Iterator itr = this.getResourceEnvReferenceDescriptors().iterator(); itr.hasNext();) { ResourceEnvReferenceDescriptor jdr = (ResourceEnvReferenceDescriptor) itr.next(); if (jdr.getName().equals(name)) { return jdr; } } throw new IllegalArgumentException(localStrings.getLocalString( "enterprise.deployment.exceptionappclienthasnoesourceenvrefbyname", "This application client [{0}] has no resource environment reference by the name of [{1}]", new Object[] {getName(), 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})); }
/** * Return a JMS destination reference by the same name or throw an IllegalArgumentException. */ public JmsDestinationReferenceDescriptor getJmsDestinationReferenceByName(String name) { 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})); }
/** * Looks up an ejb reference with the given name. Throws an IllegalArgumentException * if it is not found. */ public EjbReferenceDescriptor getEjbReferenceByName(String name) { 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})); }
/** * Looks up an message destination reference with the given name. * Throws an IllegalArgumentException if it is not found. */ 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( "exceptionappclienthasnomsgdestrefbyname", "This application client [{0}] has no message destination reference by the name of [{1}]", new Object[] {getName(), name})); }
/** * Looks up an service reference with the given name. * Throws an IllegalArgumentException if it is not found. */ public ServiceReferenceDescriptor getServiceReferenceByName(String name) { 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 void addDataSourceDefinitionDescriptor(DataSourceDefinitionDescriptor reference) { for(Iterator itr = this.getDataSourceDefinitionDescriptors().iterator(); itr.hasNext();){ DataSourceDefinitionDescriptor desc = (DataSourceDefinitionDescriptor)itr.next(); if(desc.getName().equals(reference.getName())){ throw new IllegalStateException( localStrings.getLocalString("exceptionappclientduplicatedatasourcedefinition", "The application client [{0}] cannot have datasource definitions of same name : [{1}]", getName(), reference.getName())); } } getDataSourceDefinitionDescriptors().add(reference); }
/** * Return the entity manager factory reference descriptor corresponding to * the given name. */ public EntityManagerFactoryReferenceDescriptor getEntityManagerFactoryReferenceByName(String 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})); }
/** * Return the entity manager factory reference descriptor corresponding to * the given name. */ public EntityManagerFactoryReferenceDescriptor getEntityManagerFactoryReferenceByName(String 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})); }
@Override public void addResourceDescriptor(ResourceDescriptor descriptor) { if(descriptor.getResourceType().equals(JavaEEResourceType.CFD)){ throw new UnsupportedOperationException(localStrings.getLocalString( "enterprise.deployment.exceptionappclientnotsupportconnectionfactorydefinition", "The application client [{0}] do not support connection factory definitions", new Object[] {getName()})); } else if (descriptor.getResourceType().equals(JavaEEResourceType.AODD)) { throw new UnsupportedOperationException(localStrings.getLocalString( "enterprise.deployment.exceptionappclientnotsupportadministeredobjectdefinition", "The application client [{0}] do not support administered object definitions", new Object[] {getName()})); } else { super.addResourceDescriptor(descriptor); } }
@Override public void removeResourceDescriptor(ResourceDescriptor descriptor) { if(descriptor.getResourceType().equals(JavaEEResourceType.CFD)){ throw new UnsupportedOperationException(localStrings.getLocalString( "enterprise.deployment.exceptionappclientnotsupportconnectionfactorydefinition", "The application client [{0}] do not support connection factory definitions", new Object[] {getName()})); } else if (descriptor.getResourceType().equals(JavaEEResourceType.AODD)) { throw new UnsupportedOperationException(localStrings.getLocalString( "enterprise.deployment.exceptionappclientnotsupportadministeredobjectdefinition", "The application client [{0}] do not support administered object definitions", new Object[] {getName()})); } else { super.removeResourceDescriptor(descriptor); } } }
/** * visits an app client descriptor * @param app client descriptor */ public void accept(ApplicationClientDescriptor appclientDesc) { DOLUtils.getDefaultLogger().info("=================="); DOLUtils.getDefaultLogger().info("\tAppClient Description " + appclientDesc.getDescription()); DOLUtils.getDefaultLogger().info("\tAppClient Name " + appclientDesc.getName()); DOLUtils.getDefaultLogger().info("\tAppClient Small Icon " + appclientDesc.getSmallIconUri()); DOLUtils.getDefaultLogger().info("\tAppClient Large Icon " + appclientDesc.getLargeIconUri()); DOLUtils.getDefaultLogger().info("\tAppClient Callback Handler " + appclientDesc.getCallbackHandler()); //add rest of the tags }
/** * visits an app client descriptor * @param app client descriptor */ public void accept(ApplicationClientDescriptor appclientDesc) { DOLUtils.getDefaultLogger().info("=================="); DOLUtils.getDefaultLogger().info("\tAppClient Description " + appclientDesc.getDescription()); DOLUtils.getDefaultLogger().info("\tAppClient Name " + appclientDesc.getName()); DOLUtils.getDefaultLogger().info("\tAppClient Small Icon " + appclientDesc.getSmallIconUri()); DOLUtils.getDefaultLogger().info("\tAppClient Large Icon " + appclientDesc.getLargeIconUri()); DOLUtils.getDefaultLogger().info("\tAppClient Callback Handler " + appclientDesc.getCallbackHandler()); //add rest of the tags } }