Methods Summary |
---|
public com.sun.enterprise.config.serverbeans.AppclientModule[] | getAllApps()Returns an array of all applications deployed with the server.
AppclientModule[] apps = ((Applications)this.configBean).getAppclientModule();
if(apps == null) return new AppclientModule[0];
ArrayList list = new ArrayList();
for (int i=0; i<apps.length; i++) {
// add the modules to the list if it is referenced
// by this server
if ( isReferenced(apps[i].getName()) ) {
list.add(apps[i]);
}
}
// returns an array of modules referenced by this server
AppclientModule[] refList = new AppclientModule[list.size()];
return ( (AppclientModule[]) list.toArray(refList) );
|
private com.sun.enterprise.config.serverbeans.AppclientModule | getAppclientModule(java.lang.String appId)
AppclientModule app = (AppclientModule)
((Applications)this.configBean).getAppclientModuleByName(appId);
if(app == null)
throw new ConfigException(
Localizer.getValue(ExceptionType.APP_NOT_EXIST));
return app;
|
public java.lang.String | getDescription(java.lang.String id)
return getAppclientModule(id).getDescription();
|
public com.sun.enterprise.deployment.Application | getDescriptor(java.lang.String modId, java.lang.ClassLoader cl, java.lang.String modDir, boolean validateXml)Returns the deployment descriptor object for the connector module
in the specified directory.
Application application = getRegisteredDescriptor(modId);
if (application!=null) {
application.setClassLoader(cl);
return application;
}
try {
AppClientArchivist appClientArchivist = new AppClientArchivist();
appClientArchivist.setXMLValidation(validateXml);
appClientArchivist.setClassLoader(cl);
FileArchive archive = openDDArchive(modId, modDir);
// Try to load the app from the serialized descriptor file.
SerializedDescriptorHelper.Loader sdLoader =
SerializedDescriptorHelper.load(modId, this);
Application deserializedApplication = sdLoader.getApplication();
if (deserializedApplication != null) {
application = deserializedApplication;
} else {
application = ApplicationArchivist.openArchive(modId, appClientArchivist, archive, true);
}
application.setClassLoader(cl);
application.setGeneratedXMLDirectory(getGeneratedXMLLocation(modId));
registerDescriptor(modId, application);
// If needed, save this app in serialized form for faster loading next time.
sdLoader.store(application);
return application;
} catch (IOException ioe) {
throw new ConfigException(Localizer.getValue(
ExceptionType.IO_ERROR_LOADING_DD, modId), ioe);
} catch (Throwable t) {
throw new ConfigException(Localizer.getValue(
ExceptionType.FAIL_DD_LOAD, modId), t);
}
|
public java.lang.String | getGeneratedXMLLocation(java.lang.String name)
ModuleEnvironment menv = instanceEnvironment.getModuleEnvironment(name,
DeployableObjectType.CAR);
return menv.getModuleGeneratedXMLPath();
|
public java.lang.String | getLocation(java.lang.String appId)
AppclientModule app = (AppclientModule)
((Applications)this.configBean).getAppclientModuleByName(appId);
return resolvePath(app.getLocation());
|
public javax.enterprise.deploy.shared.ModuleType | getModuleType()
return ModuleType.CAR;
|
public java.lang.String | getStubLocation(java.lang.String name)
ModuleEnvironment menv = instanceEnvironment.getModuleEnvironment(name,
DeployableObjectType.CAR);
return menv.getModuleStubPath();
|
public boolean | isEnabled(java.lang.String appId)There is no persistent state store in domain.xml
Hence, return true always.
return true;
|
public boolean | isJavaWebStartEnabled(java.lang.String appId)Reports whether Java Web Start access is enabled for the specified app client.
AppclientModule app = (AppclientModule) ((Applications)this.configBean).getAppclientModuleByName(appId);
return app.isJavaWebStartEnabled();
|
protected boolean | isRegistered(java.lang.String appId, com.sun.enterprise.config.ConfigBean bean)
ConfigBean cb = null;
try {
cb = ((Applications)bean).getAppclientModuleByName(appId);
} catch(Exception cn) {
}
if(cb != null) return true;
return false;
|
public boolean | isSystem(java.lang.String appId)Checks whether this application is a system app
appclients are always non-system apps
return false;
|
public boolean | isSystemAdmin(java.lang.String appId)Checks whether this application is a system admin app
appclients are always non-system apps
return false;
|
public boolean | isSystemPredeployed(java.lang.String appId)
return false;
|
public java.util.List | listIds()Returns a list of all applications deployed with the server.
ArrayList arr = new ArrayList();
AppclientModule[] apps = ((Applications)this.configBean).getAppclientModule();
if(apps == null) return arr;
for (int i=0;i<apps.length;i++) {
String name = apps[i].getName();
// adds the web module to the list if
// it is referenced by this server
if ( isReferenced(name) ) {
arr.add(name);
}
}
return arr;
|
public void | remove(java.lang.String appId)Removes the application information from the configuration file.
AppclientModule backJa = (AppclientModule)
((Applications)configBean).getAppclientModuleByName(appId);
((Applications)configBean).removeAppclientModule(backJa);
|
public void | setDescription(java.lang.String id, java.lang.String desc)
getAppclientModule(id).setDescription(desc);
|
public void | setEnable(java.lang.String appId, boolean enabled)Identifies whether an application is enabled or disabled.
Appclients do not need to have a persistent enable state
Hence, this method does nothing for now.
//Enabled is not persisted for appclients.
|
public void | setLocation(java.lang.String appId, java.lang.String location)Set the location for an App
getAppclientModule(appId).setLocation(location);
|
public void | setOptionalAttributes(java.lang.String appId, java.util.Properties optionalAttributes)Set the optional attributes for an App
This method is required by the base class.
Since there are no optional attributes for appclient
don't do anything in this method
//Not required for appclient.
|