|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.gx.webmanager.services.framework.spi.FrameworkBase
public abstract class FrameworkBase
Abstract implementation of the FrameWork interface. Provides (default) implementations of the methods required by setter based dependency injection.
| Field Summary |
|---|
| Fields inherited from interface nl.gx.webmanager.services.framework.spi.Framework |
|---|
CLUSTERING_NODEID_PROP, CLUSTERING_READONLY_PROP |
| Constructor Summary | |
|---|---|
FrameworkBase()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getBaseDirectory()
Get the applications basedirectorty. |
java.lang.String |
getBundleDirectory()
Get the framework bundledirectorty. |
protected java.lang.String |
getBundleLocation(java.lang.String bundle)
Returns the absolute path of a specified bundle based on the configured bundleDirectory. |
java.lang.String |
getCacheDirectory()
Get the framework cachedirectorty. |
java.lang.String |
getClusterNodeId()
Provides the configured cluster identifier for this node. |
java.lang.String |
getEditionDirectory()
Get the framework edition bundle directory. |
protected int |
getInitialFrameworkStartLevel()
Return the initialFrameworkStartLevel. |
protected java.util.Map<java.lang.Integer,java.util.List<java.lang.String>> |
getInstallMap()
Return the installmap. |
protected java.util.Properties |
getProperties()
Return the properties. |
java.lang.String |
getRepositoryDirectory()
Get the JCR repositorydirectorty. |
abstract java.lang.Object |
getService(java.lang.String name)
Provide an easy access to services based on service name. |
abstract java.lang.Object |
getService(java.lang.String name,
java.lang.String filter)
Provides easy access to services based on service name and optional filter. |
java.lang.String |
getWebrootDirectory()
Get the webrootdirectory. |
protected abstract boolean |
initialize()
Initializes the framework based on the configured system bundles. |
boolean |
isAvailable()
Check whether the OSGi impl is running and available. |
boolean |
isClusterMasterNode()
Indicates if this instance is a master node. |
protected boolean |
isForceInitialize()
Return forceInitialize. |
boolean |
isStarting()
Check whether the framework is starting up. |
protected abstract void |
restart()
Restarts the framework based on the state in the configured cachedirectory. |
void |
setBaseDirectory(java.lang.String baseDirectory)
Set the applications basedirectorty. |
void |
setBundleDirectory(java.lang.String bundleDirectory)
Set the framework bundledirectorty. |
void |
setCacheDirectory(java.lang.String cacheDirectory)
Set the applications cachedirectorty. |
void |
setEditionDirectory(java.lang.String editionDirectory)
Set the framework edition bundle directory. |
protected void |
setForceInitialize(boolean forceInitialize)
|
void |
setInitialFrameworkStartLevel(int initialFrameworkStartLevel)
|
void |
setInstallMap(java.util.Map<java.lang.Integer,java.util.List<java.lang.String>> installMap)
Public setter provided for DI. |
void |
setProperties(java.util.Properties properties)
Public setter provided for DI. |
void |
setRepositoryDirectory(java.lang.String repositoryDirectory)
Set the applications JCR repositorydirectorty. |
void |
setServletContext(javax.servlet.ServletContext servletContext)
|
void |
setWebrootDirectory(java.lang.String webrootDirectory)
Set the applications webrootdirectory. |
protected abstract void |
shutdown()
Shuts down the framework. |
void |
start()
Start the OSGi impl. |
void |
stop()
Stop the OSGi impl. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface nl.gx.webmanager.services.framework.spi.Framework |
|---|
getServices, getServices, setFrameworkStartLevel |
| Constructor Detail |
|---|
public FrameworkBase()
| Method Detail |
|---|
public java.lang.String getBaseDirectory()
Framework
getBaseDirectory in interface Framework
public void setBaseDirectory(java.lang.String baseDirectory)
throws ConfigurationException
Framework
setBaseDirectory in interface FrameworkbaseDirectory - absolute path to the basedirectory on the filesystem.
ConfigurationException - when the directory is not accessiblepublic java.lang.String getBundleDirectory()
Framework
getBundleDirectory in interface Framework
public final void setBundleDirectory(java.lang.String bundleDirectory)
throws ConfigurationException
Framework
setBundleDirectory in interface FrameworkbundleDirectory - absolute path to the bundledirectory on the filesystem.
ConfigurationException - when the directory is not accessiblepublic final void setEditionDirectory(java.lang.String editionDirectory)
Framework
setEditionDirectory in interface FrameworkeditionDirectory - the directory injected by Springpublic final java.lang.String getEditionDirectory()
Framework
getEditionDirectory in interface Frameworknull if configuration failedpublic java.lang.String getCacheDirectory()
Framework
getCacheDirectory in interface Framework
public final void setCacheDirectory(java.lang.String cacheDirectory)
throws ConfigurationException
Framework
setCacheDirectory in interface FrameworkcacheDirectory - absolute path to the cachedirectory on the filesystem.
ConfigurationException - when the directory is not accessiblepublic java.lang.String getRepositoryDirectory()
Framework
getRepositoryDirectory in interface Frameworkpublic java.lang.String getWebrootDirectory()
Framework
getWebrootDirectory in interface Framework
public void setRepositoryDirectory(java.lang.String repositoryDirectory)
throws ConfigurationException
Framework
setRepositoryDirectory in interface FrameworkrepositoryDirectory - absolute path to the repositorydirectorty on the filesystem.
ConfigurationException - when the directory is not accessible
public void setWebrootDirectory(java.lang.String webrootDirectory)
throws ConfigurationException
Framework
setWebrootDirectory in interface FrameworkwebrootDirectory - absolute path to the webrootdirectory on the filesystem.
ConfigurationException - when the directory is not accessibleprotected boolean isForceInitialize()
protected void setForceInitialize(boolean forceInitialize)
forceInitialize - protected java.util.Properties getProperties()
public void setProperties(java.util.Properties properties)
Framework
setProperties in interface Frameworkproperties - startupproperties provided for the concrete framework
implementation.protected java.util.Map<java.lang.Integer,java.util.List<java.lang.String>> getInstallMap()
public void setInstallMap(java.util.Map<java.lang.Integer,java.util.List<java.lang.String>> installMap)
Framework
setInstallMap in interface FrameworkinstallMap - map containing bundlenames to be installed for any startlevel.protected int getInitialFrameworkStartLevel()
public void setInitialFrameworkStartLevel(int initialFrameworkStartLevel)
public void setServletContext(javax.servlet.ServletContext servletContext)
setServletContext in interface org.springframework.web.context.ServletContextAware
public final void start()
throws FrameworkException
Framework
start in interface FrameworkFrameworkException - when start fails
public final void stop()
throws FrameworkException
Framework
stop in interface FrameworkFrameworkException - when shutdown failspublic boolean isStarting()
Framework
isStarting in interface Frameworkpublic boolean isAvailable()
Framework
isAvailable in interface Frameworkpublic boolean isClusterMasterNode()
Framework
isClusterMasterNode in interface Frameworkpublic java.lang.String getClusterNodeId()
Framework
getClusterNodeId in interface Framework
public abstract java.lang.Object getService(java.lang.String name)
throws FrameworkException
Framework
getService in interface Frameworkname - fully qualified name of the requested service interface.
FrameworkException
public abstract java.lang.Object getService(java.lang.String name,
java.lang.String filter)
throws FrameworkException
Framework
getService in interface Frameworkname - fully qualified name of the requested service interfacefilter - LDAP filter for serviceregistration
FrameworkException
protected abstract boolean initialize()
throws FrameworkException
java.lang.Exception - if initialize fails
FrameworkException
protected abstract void restart()
throws FrameworkException
java.lang.Exception - if retsrat fails
FrameworkException
protected abstract void shutdown()
throws FrameworkException
java.lang.Exception - it shutdown fails
FrameworkExceptionprotected java.lang.String getBundleLocation(java.lang.String bundle)
bundle - name of the bundle
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||