|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webmethods.portal.system.PortalSystem
public class PortalSystem
The entry point into the Portal server.
PortalSystem is a singleton. It exposes the PortalSystem.main(java.lang.String[])
method which initializes Portal. Initialization leverages the
DefaultPhaseProvider
to initialize all of the IPhaseProvider
s registered in the system. Upon successful
initialization, all IComponentProvider
s will be available as well as their IComponent
s.
PortalSystem also defines many constants that can be passed into PortalSystem.acquireURI(java.lang.String)
to find common portal resources.
This includes: PortalSystem.TOPIC_ROOT
, PortalSystem.FOLDER_ROOT
, PortalSystem.FOLDER_SYSTEM
and many others.
PortalSystem also defines the various states that the system can be in. These vary from PortalSystem.UNINITIALIZED_STATE
to PortalSystem.SHUTDOWN_STATE
and a few in between.
PortalSystem also exposes all of the registered IComponentProvider
s. When requiring a specific IComponentProvider
invoke an API like PortalSystem.getCommandProvider()
and cast it to the appropriate implementation, in this instance: com.webmethods.portal.bizPolicy.command.ICommandManager
.
Field Summary | |
---|---|
static int |
BOOTSTRAP_STATE
The system is in a pre-initialized 'bootstrap' state. |
static String |
CURRENT_RESOURCE
The current resource. |
static String |
CURRENT_RESOURCE_ANCESTOR
The current resource's ancestor to the specified step (current.resource.ancestor.1=parent, current.resource.ancestor.2=grandparent). |
static String |
CURRENT_RESOURCE_PARENT
The current resource's parent. |
static String |
CURRENT_RESOURCE_TYPE
|
static String |
FOLDER_CONTENT_SERVICE
The content service folder. |
static String |
FOLDER_DIRECTORY_SERVICE
The directory service folder. |
static String |
FOLDER_HELP
The Help folder. |
static String |
FOLDER_PORTLET_INSTANCES
The portlet instances folder. |
static String |
FOLDER_PORTLETS
The XTypes Portlet folder. |
static String |
FOLDER_PUBLIC
The public folder. |
static String |
FOLDER_ROOT
The Root folder. |
static String |
FOLDER_SKINS
The skins folder. |
static String |
FOLDER_SYSTEM
The System folder. |
static String |
FOLDER_TEMPLATES
The templates folder. |
static String |
FOLDER_TEMPLATES_MANAGEMENT
The templates management folder. |
static String |
FOLDER_THEMES
The themes folder. |
static String |
FOLDER_USERS
The users folder. |
static String |
FOLDER_XTYPE
The xtype folder. |
static String |
FOLDER_XTYPES
The XTypes folder. |
static int |
INITIALIZING_STATE
The system is initializing and the MetaManager is available. |
protected Map |
m_componentProviders
This is the map of managers that implement the IComponentProvider interface |
protected IPhaseProvider |
m_phaseProvider
This is what initializes us through the various phases of the product. |
protected static PortalSystem |
m_portalSystem
A static singleton |
protected int |
m_state
|
protected List |
m_uriResolverList
A storage of IURIResolver |
protected IURIResolver[] |
m_uriResolvers
This is the IURIResolver that always gets first crack at calls to PortalSystem.acquireURI(java.lang.String) |
protected static String |
m_VMID
|
static String |
PERSISTENT_SYSTEM_PROPERTIES_DEFAULT
Where the persistent properties are stored. |
static String |
PERSISTENT_SYSTEM_PROPERTIES_KEY
The key identifying persistent property storage. |
static String |
PHASE_PROVIDER_CLASS
This is the phase provider that manages initializing the various phases of the product. |
static long |
PORTAL_START_TIME
|
static String |
PORTAL_SYSTEM_CLASS
Identifies which PortalSystem to use. |
static String |
PORTLET_DEFAULT_ADMIN_PAGE
Alias for the default admin page portlet. |
static String |
PORTLET_DEFAULT_PAGE
Alias for the default page portlet. |
static String |
PORTLET_DIRECTORY
Alias for the directory portlet. |
static String |
PORTLET_ERROR_REPORT
Alias for the error report portlet. |
static String |
PORTLET_FOLDERVIEW
Alias for the folderview portlet. |
static String |
PORTLET_HEAD
Alias for the head portlet. |
static String |
PORTLET_LEFTNAV
Alias for the leftnav (Content Manager) portlet. |
static String |
PORTLET_LOCATIONS
Alias for the locations portlet. |
static String |
PORTLET_LOGOUT
Alias for the logout portlet. |
static String |
PORTLET_PERMISSIONS
Alias for the permissions portlet. |
static String |
PORTLET_PROPERTIES
Alias for the properties portlet. |
static String |
PORTLET_PUBLISH
Alias for the publish portlet. |
static String |
PORTLET_STREAMING_CONTENT_VIEWER
Alias for the streaming content viewer portlet. |
static String |
PORTLET_TITLEBAR
Alias for the titlebar portlet. |
static String |
PORTLET_UNI_PICKER
Alias for the unipicker (Universal Picker) portlet. |
static String |
PORTLET_USER_PROFILE
Alias for the user profile portlet. |
static int |
PRE_META_STATE
This is the point during initialization when no com.webmethods.portal.service.meta2.IMetaManager is available yet,
because the PortalSystem is still initializing. |
static int |
READY_STATE
The system is ready and initialized. |
static int |
SHUTDOWN_STATE
The system is shutting down. |
static String |
TEMPLATE_BASIC
The basic template. |
static String |
TEMPLATE_EMPTY
The "empty" template. |
static String |
TEMPLATE_THREE_COL
The three column template. |
static String |
TEMPLATE_USECORPGOV
The Corporate Governance template. |
static String |
TOPIC_ADMIN
The Admin topic. |
static String |
TOPIC_HELP
The Help topic. |
static String |
TOPIC_ROOT
The root topic. |
static String |
TOPIC_SYSTEM
The System topic. |
static int |
UNINITIALIZED_STATE
The system hasn't begun initializing yet. |
static String |
USER_CURRENT
Alias for the current user. |
static String |
USER_CURRENT_FAVORITES
Alias for the current user's scrapbook. |
static String |
USER_CURRENT_HOME
Alias for the current user's home folder. |
static String |
USER_CURRENT_PROFILE
Alias for the current user's profile. |
static String |
USER_CURRENT_ROOT
Alias for the current user's root folder (contains user home and scrapbook). |
static String |
USER_CURRENT_SAVED_SEARCHES
Alias for the current user's saved search page. |
static String |
USER_CURRENT_START_PAGE
Alias for the current user's start page. |
Constructor Summary | |
---|---|
PortalSystem()
Default constructor used for reflection |
Method Summary | |
---|---|
IURI |
acquireURI(String uri)
Retrieve the provider-specific implementation of IURI based on the URI information. |
static void |
addComponentProvider(String name,
IComponentProvider cp)
Updates the map that holds the IComponentProvider s. |
void |
addURIResolver(IURIResolver newUriResolver)
Allows the PortalSystem.acquireURI(java.lang.String) to be 'hooked' by other resolvers |
boolean |
exists(IURI objectURI)
Checks if an items specified by objectURI exists in the system |
static IComponentProvider |
getAppServerProvider()
Deprecated. |
static IComponentProvider |
getAuditManager()
|
static IComponentProvider |
getBizPolicyProvider()
|
static IComponentProvider |
getBundleManager()
|
static IComponentProvider |
getCacheProvider()
|
static IComponentProvider |
getClassManager()
|
static IComponentProvider |
getClusterProvider()
|
static IComponentProvider |
getCommandProvider()
|
static IComponentProvider |
getComponentProvider(String componentProvider)
Retrieves the registered IComponentProvider after which you should cast to
the specific interface requested. |
static Map |
getComponentProviders()
Gets the map of all registered IComponentProvider s. |
static IComponentProvider |
getContentProvider()
|
static IComponentProvider |
getContextProvider()
|
static IComponentProvider |
getDirectoryProvider()
|
static IComponentProvider |
getGlobalProvider()
|
static IComponentProvider |
getInstallProvider()
|
static IComponentProvider |
getMechanicsProvider()
|
static IComponentProvider |
getMetaProvider()
|
static IComponentProvider |
getNoodleProvider()
|
static IPhaseProvider |
getPhaseProvider()
|
static PortalSystem |
getPortalSystem()
Get the singleton instance of the PortalSystem. |
static IComponentProvider |
getPortletProvider()
|
static IComponentProvider |
getPRCacheProvider()
|
static int |
getState()
Get the state of the PortalSystem. |
static String |
getSystemProperty(String propertyName,
String defaultValue)
Retrieve a system property. |
static IComponentProvider |
getTaskProvider()
|
IURIResolver[] |
getUriResolvers()
Get the array of currently registered IURIResolver s. |
static IComponentProvider |
getVersionProvider()
|
static String |
getVMID()
|
static IComponentProvider |
getWebAppProvider()
|
static IComponentProvider |
getWebServiceProvider()
|
static boolean |
inDevMode()
Returns true if system is in development mode |
protected void |
init(String configLocation)
The main startup for the PortalSystem. |
static boolean |
inPreviewServerMode()
|
static String |
localizeMessage(Class resourceBundle,
String messageKey,
Object[] args,
boolean includeMessageKeyPrefix)
Helper method to retrieve a localized message from a resource bundle |
Object |
lookup(IURI objectURI)
Look up an object in the system. |
static void |
main(String[] args)
The arg identifies the portal.properties (configLocation) for example:
java com.webmethods.portal.system.PortalSystem file:/c:/portalminder/config/portal.properties
|
static void |
removeComponentProvider(String name)
Removes an IComponentProvider from the internal map. |
IURI |
resolveURIByPath(String value)
Attempts to resolve URI by given path to the object. |
static void |
setState(int state)
Set the state of the PortalSystem. |
static void |
setSystemProperty(String key,
String value)
Set a system property. |
void |
shutdown()
|
static void |
waitUntilReady(Runnable runnable)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int UNINITIALIZED_STATE
public static final int PRE_META_STATE
com.webmethods.portal.service.meta2.IMetaManager
is available yet,
because the PortalSystem is still initializing.
public static final int BOOTSTRAP_STATE
com.webmethods.portal.service.meta2.IMetaManager
is initialized, but
prior to the bootstrap Phase being executed.
public static final int INITIALIZING_STATE
PortalSystem.BOOTSTRAP_STATE
.
public static final int READY_STATE
public static final int SHUTDOWN_STATE
public static final String PORTAL_SYSTEM_CLASS
public static final String PHASE_PROVIDER_CLASS
public static final String PERSISTENT_SYSTEM_PROPERTIES_KEY
public static final String PERSISTENT_SYSTEM_PROPERTIES_DEFAULT
public static final String TOPIC_ROOT
public static final String TOPIC_ADMIN
public static final String TOPIC_SYSTEM
public static final String TOPIC_HELP
public static final String FOLDER_ROOT
public static final String FOLDER_SYSTEM
public static final String FOLDER_HELP
public static final String FOLDER_XTYPES
public static final String FOLDER_PORTLETS
public static final String FOLDER_PORTLET_INSTANCES
public static final String FOLDER_TEMPLATES_MANAGEMENT
public static final String FOLDER_USERS
public static final String FOLDER_XTYPE
public static final String FOLDER_THEMES
public static final String FOLDER_SKINS
public static final String FOLDER_DIRECTORY_SERVICE
public static final String FOLDER_CONTENT_SERVICE
public static final String FOLDER_TEMPLATES
public static final String FOLDER_PUBLIC
public static final String TEMPLATE_BASIC
public static final String TEMPLATE_EMPTY
public static final String TEMPLATE_THREE_COL
public static final String TEMPLATE_USECORPGOV
public static final String USER_CURRENT
public static final String USER_CURRENT_ROOT
public static final String USER_CURRENT_HOME
public static final String USER_CURRENT_START_PAGE
public static final String USER_CURRENT_FAVORITES
public static final String USER_CURRENT_SAVED_SEARCHES
public static final String USER_CURRENT_PROFILE
public static final String CURRENT_RESOURCE
public static final String CURRENT_RESOURCE_TYPE
public static final String CURRENT_RESOURCE_PARENT
public static final String CURRENT_RESOURCE_ANCESTOR
public static final String PORTLET_PERMISSIONS
public static final String PORTLET_DEFAULT_ADMIN_PAGE
public static final String PORTLET_DEFAULT_PAGE
public static final String PORTLET_HEAD
public static final String PORTLET_DIRECTORY
public static final String PORTLET_FOLDERVIEW
public static final String PORTLET_LEFTNAV
public static final String PORTLET_LOCATIONS
public static final String PORTLET_LOGOUT
public static final String PORTLET_PROPERTIES
public static final String PORTLET_PUBLISH
public static final String PORTLET_TITLEBAR
public static final String PORTLET_UNI_PICKER
public static final String PORTLET_USER_PROFILE
public static final String PORTLET_STREAMING_CONTENT_VIEWER
public static final String PORTLET_ERROR_REPORT
protected static PortalSystem m_portalSystem
protected Map m_componentProviders
IComponentProvider
interface
protected List m_uriResolverList
IURIResolver
protected IURIResolver[] m_uriResolvers
IURIResolver
that always gets first crack at calls to PortalSystem.acquireURI(java.lang.String)
protected IPhaseProvider m_phaseProvider
protected int m_state
PortalSystem.getState()
public static long PORTAL_START_TIME
protected static String m_VMID
Constructor Detail |
---|
public PortalSystem()
Method Detail |
---|
public static PortalSystem getPortalSystem()
PortalSystem
public static Map getComponentProviders()
IComponentProvider
s.
The map's keys are the names (java.lang.String) of the IComponentProvider
.
The map's values are the instances of IComponentProvider
.
Typically, you should use the convenience functions like PortalSystem.getMechanicsProvider()
instead
of retrieving the map directly.
IComponentProvider
s.PortalSystem.m_componentProviders
public IURIResolver[] getUriResolvers()
IURIResolver
s.
PortalSystem.m_uriResolvers
public static IComponentProvider getComponentProvider(String componentProvider)
IComponentProvider
after which you should cast to
the specific interface requested.
componentProvider
- the name of a registered IComponentProvider
.
It is highly recommended to use a named constant from IComponentProvider
.
IComponentProvider
or null if not foundpublic static void addComponentProvider(String name, IComponentProvider cp)
IComponentProvider
s. No other logic is performed.
name
- The name of the component providercp
- The IComponentProvider
PortalSystem.getComponentProviders()
,
PortalSystem.removeComponentProvider(java.lang.String)
public static void removeComponentProvider(String name)
IComponentProvider
from the internal map.
name
- The name of the component provider.PortalSystem.getComponentProviders()
,
PortalSystem.addComponentProvider(java.lang.String, IComponentProvider)
public static IComponentProvider getDirectoryProvider()
com.webmethods.portal.service.dir.IDirSystem
public static IComponentProvider getMetaProvider()
com.webmethods.portal.service.meta2.IMetaManager
public static IComponentProvider getMechanicsProvider()
com.webmethods.portal.mech.IMechanicsManager
public static IComponentProvider getCommandProvider()
com.webmethods.portal.bizPolicy.command.ICommandManager
public static IComponentProvider getBizPolicyProvider()
IBizPolicyManager
public static IComponentProvider getContentProvider()
com.webmethods.portal.bizPolicy.IContextProvider
public static IComponentProvider getCacheProvider()
com.webmethods.portal.service.cache.ICacheManager
public static IComponentProvider getInstallProvider()
com.webmethods.portal.service.install.IInstallProvider
public static IComponentProvider getPortletProvider()
com.webmethods.portal.service.portlet.IPortletProvider
public static IComponentProvider getClassManager()
com.webmethods.portal.service.classmanager.IClassManager
public static IComponentProvider getBundleManager()
com.webmethods.portal.service.bundle.BundleManager
public static IComponentProvider getAuditManager()
com.webmethods.portal.service.classmanager.IAuditManager
public static IComponentProvider getTaskProvider()
public static IComponentProvider getWebAppProvider()
com.webmethods.portal.framework.IWebApplication
public static IComponentProvider getWebServiceProvider()
com.webmethods.portal.webservices.IWebService
public static IComponentProvider getAppServerProvider()
public static IComponentProvider getClusterProvider()
com.webmethods.portal.system.cluster.IClusterProvider
public static IComponentProvider getVersionProvider()
com.webmethods.portal.service.version.IVersionProvider
public static IComponentProvider getContextProvider()
com.webmethods.portal.bizPolicy.IContextProvider
public static IComponentProvider getPRCacheProvider()
com.webmethods.portal.framework.prc.service.IPRCProvider
public static IComponentProvider getGlobalProvider()
com.webmethods.portal.service.global.IGlobalProvider
public static IComponentProvider getNoodleProvider()
com.webmethods.portal.noodle.INoodleProvider
public static IPhaseProvider getPhaseProvider()
com.webmethods.portal.system.init.IPhaseProvider
public static String localizeMessage(Class resourceBundle, String messageKey, Object[] args, boolean includeMessageKeyPrefix)
resourceBundle
- the bundle to get the message frommessageKey
- the key of the message to retrieveargs
- any args needed to complete the message (may be null)includeMessageKeyPrefix
- true to include the message key in the returned message, false otherwise
public static int getState()
PortalSystem.setState(int)
,
PortalSystem.UNINITIALIZED_STATE
,
PortalSystem.BOOTSTRAP_STATE
,
PortalSystem.INITIALIZING_STATE
,
PortalSystem.READY_STATE
,
PortalSystem.SHUTDOWN_STATE
public static void setState(int state)
state
- The state to set.PortalSystem.getState()
,
PortalSystem.UNINITIALIZED_STATE
,
PortalSystem.BOOTSTRAP_STATE
,
PortalSystem.INITIALIZING_STATE
,
PortalSystem.READY_STATE
,
PortalSystem.SHUTDOWN_STATE
public Object lookup(IURI objectURI) throws PortalException
objectURI
- the URI to the object
PortalException
public boolean exists(IURI objectURI) throws PortalException
objectURI
- the URI to of an object
PortalException
public IURI acquireURI(String uri) throws PortalException
IURI
based on the URI information.
uri
- the String version of the URI
IURI
PortalException
- if the URI cannot be constructed or if the URI has an invalid syntaxpublic IURI resolveURIByPath(String value) throws PortalException
value
-
IURI
PortalException
- if the URI cannot be constructed or if the URI has an invalid syntaxpublic void addURIResolver(IURIResolver newUriResolver)
PortalSystem.acquireURI(java.lang.String)
to be 'hooked' by other resolvers
newUriResolver
- PortalSystem.acquireURI(java.lang.String)
public static void main(String[] args) throws Exception
The arg identifies the portal.properties (configLocation)
for example:
java com.webmethods.portal.system.PortalSystem file:/c:/portalminder/config/portal.properties
args
- portal.properties
Exception
protected void init(String configLocation) throws InitializationException
configLocation
- The location of the bootstrap config stuff.
InitializationException
public void shutdown()
public static String getSystemProperty(String propertyName, String defaultValue)
propertyName
- The system property name to find.defaultValue
- The default value to return if the property isn't found.
public static void setSystemProperty(String key, String value) throws IOException
1) It will set the system property: System.setProperty(java.lang.String, java.lang.String)
2) It will persist the property to the registry
3) It will fire an event
key
- The name of the property to set.value
- The value to set the property to.
IOException
- if it can't save to the persistent system properties file.public static boolean inDevMode()
public static boolean inPreviewServerMode()
public static String getVMID()
public static void waitUntilReady(Runnable runnable)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |