Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.webengine.app.impl
Class DefaultApplicationManager

java.lang.Object
  extended by org.nuxeo.ecm.webengine.app.impl.DefaultApplicationManager
All Implemented Interfaces:
ApplicationManager

public class DefaultApplicationManager
extends java.lang.Object
implements ApplicationManager

Author:
Bogdan Stefanescu

Field Summary
static java.util.regex.Pattern PARAMS_PATTERN
          Pattern to read manifest value parameters
 
Constructor Summary
DefaultApplicationManager(WebEngine engine)
           
 
Method Summary
 void addApplication(org.osgi.framework.Bundle bundle, javax.ws.rs.core.Application app)
           
 boolean deployApplication(org.osgi.framework.Bundle bundle)
          Deploy the JAX-RS application if any is found in the given bundle.
 BundledApplication getApplication(java.lang.String bundleId)
           
 BundledApplication[] getApplications()
           
 ResourceContribution getContribution(java.lang.Class<? extends ExtensibleResource> target, java.lang.String key)
           
 java.lang.Object getContribution(Resource target, java.lang.String key)
           
 java.util.List<ResourceContribution> getContributions(java.lang.Class<? extends ExtensibleResource> target, java.lang.String category)
           
 java.util.List<ResourceContribution> getContributions(ExtensibleResource target, java.lang.String category)
           
 ModuleHandler getModuleHandler(java.lang.String appId)
           
 ModuleHandler getModuleHandlerFor(java.lang.Class<?> rootResource)
           
 ModuleHandler[] getModuleHandlers()
           
 ModuleRegistry getRegistry()
          Gets the module registry.
 void reload()
          Reload modules - this is useful for hot reload when application classes changes
 void removeApplication(org.osgi.framework.Bundle bundle)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAMS_PATTERN

public static final java.util.regex.Pattern PARAMS_PATTERN
Pattern to read manifest value parameters

Constructor Detail

DefaultApplicationManager

public DefaultApplicationManager(WebEngine engine)
Method Detail

addApplication

public void addApplication(org.osgi.framework.Bundle bundle,
                           javax.ws.rs.core.Application app)
Specified by:
addApplication in interface ApplicationManager

removeApplication

public void removeApplication(org.osgi.framework.Bundle bundle)
Specified by:
removeApplication in interface ApplicationManager

getRegistry

public ModuleRegistry getRegistry()
Gets the module registry.


getApplication

public BundledApplication getApplication(java.lang.String bundleId)
Specified by:
getApplication in interface ApplicationManager

getApplications

public BundledApplication[] getApplications()
Specified by:
getApplications in interface ApplicationManager

getModuleHandler

public ModuleHandler getModuleHandler(java.lang.String appId)
Specified by:
getModuleHandler in interface ApplicationManager

getModuleHandlers

public ModuleHandler[] getModuleHandlers()
Specified by:
getModuleHandlers in interface ApplicationManager

getContribution

public java.lang.Object getContribution(Resource target,
                                        java.lang.String key)
                                 throws java.lang.Exception
Specified by:
getContribution in interface ApplicationManager
Throws:
java.lang.Exception

getContributions

public java.util.List<ResourceContribution> getContributions(ExtensibleResource target,
                                                             java.lang.String category)
Specified by:
getContributions in interface ApplicationManager

getContributions

public java.util.List<ResourceContribution> getContributions(java.lang.Class<? extends ExtensibleResource> target,
                                                             java.lang.String category)
Specified by:
getContributions in interface ApplicationManager

getContribution

public ResourceContribution getContribution(java.lang.Class<? extends ExtensibleResource> target,
                                            java.lang.String key)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

getModuleHandlerFor

public ModuleHandler getModuleHandlerFor(java.lang.Class<?> rootResource)
Specified by:
getModuleHandlerFor in interface ApplicationManager

reload

public void reload()
Reload modules - this is useful for hot reload when application classes changes

Specified by:
reload in interface ApplicationManager

deployApplication

public boolean deployApplication(org.osgi.framework.Bundle bundle)
                          throws java.lang.Exception
Description copied from interface: ApplicationManager
Deploy the JAX-RS application if any is found in the given bundle. If no JAX-RS application is found return false, otherwise deploy it and return true.

Specified by:
deployApplication in interface ApplicationManager
Parameters:
bundle - the bundle that may contain a JAX-RS application
Returns:
true if a JAX-RS application was found and deployed, false otherwise
Throws:
java.lang.Exception

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.