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 Object
implements ApplicationManager

Author:
Bogdan Stefanescu

Field Summary
static 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(String bundleId)
           
 BundledApplication[] getApplications()
           
 ResourceContribution getContribution(Class<? extends ExtensibleResource> target, String key)
           
 Object getContribution(Resource target, String key)
           
 List<ResourceContribution> getContributions(Class<? extends ExtensibleResource> target, String category)
           
 List<ResourceContribution> getContributions(ExtensibleResource target, String category)
           
 ModuleHandler getModuleHandler(String appId)
           
 ModuleHandler getModuleHandlerFor(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 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(String bundleId)
Specified by:
getApplication in interface ApplicationManager

getApplications

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

getModuleHandler

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

getModuleHandlers

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

getContribution

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

getContributions

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

getContributions

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

getContribution

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

getModuleHandlerFor

public ModuleHandler getModuleHandlerFor(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 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:
Exception

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.