|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.turbine.services.BaseInitable | +--org.apache.turbine.services.BaseService | +--org.apache.turbine.services.TurbineBaseService | +--org.apache.jetspeed.services.registry.DatabaseRegistryService
This is an implementation of the RegistryService
based on the Jetspeed Database Persistence Manager
Field Summary | |
static int |
DEFAULT_VERBOSE
|
static java.lang.String |
SERVICE_NAME
The name of this service |
Fields inherited from class org.apache.turbine.services.BaseService |
configuration, name, properties, serviceBroker |
Fields inherited from class org.apache.turbine.services.BaseInitable |
initableBroker, isInitialized |
Fields inherited from interface org.apache.jetspeed.services.registry.FileRegistry |
DEFAULT_REFRESH |
Constructor Summary | |
DatabaseRegistryService()
|
Method Summary | |
void |
addEntry(java.lang.String regName,
org.apache.jetspeed.om.registry.RegistryEntry entry)
Add a new RegistryEntry in the named Registry. |
org.apache.jetspeed.om.registry.RegistryEntry |
createEntry(java.lang.String regName)
Creates a new RegistryEntry instance compatible with the current Registry instance implementation |
void |
createFragment(java.lang.String name,
java.io.Reader reader,
boolean persistent)
Read and unmarshal a fragment in memory |
org.apache.jetspeed.om.registry.Registry |
get(java.lang.String regName)
Returns a Registry object for further manipulation |
org.apache.jetspeed.om.registry.RegistryEntry |
getEntry(java.lang.String regName,
java.lang.String entryName)
Returns a RegistryEntry from the named Registry. |
java.util.Map |
getFragmentMap()
|
java.util.Enumeration |
getNames()
List all the registry currently available to this service |
void |
init()
Late init method from Turbine Service model |
void |
init(javax.servlet.ServletConfig conf)
This is the early initialization method called by the Turbine Service framework |
void |
loadFragment(java.lang.String file)
Load and unmarshal a RegistryFragment from the file |
void |
refresh()
Refresh the state of the registry implementation. |
protected void |
refresh(java.lang.String regName)
Scan all the registry fragments for new entries relevant to this registry and update its definition. |
void |
removeEntry(java.lang.String regName,
java.lang.String entryName)
Deletes a RegistryEntry from the named Registry This is a convenience wrapper around Registry.removeEntry(org.apache.jetspeed.om.registry.RegistryEntry) |
void |
removeFragment(java.lang.String file)
Remove a fragment from storage |
void |
saveFragment(java.lang.String file)
Marshal and save a RegistryFragment to disk |
void |
shutdown()
This is the shutdown method called by the Turbine Service framework |
protected void |
updateFragment(java.lang.String name,
org.apache.jetspeed.services.registry.RegistryFragment fragment)
Updates a fragment in storage and the associated entryIndex |
Methods inherited from class org.apache.turbine.services.TurbineBaseService |
init, init |
Methods inherited from class org.apache.turbine.services.BaseService |
getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBroker |
Methods inherited from class org.apache.turbine.services.BaseInitable |
getInit, getInitableBroker, setInit, setInitableBroker |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.turbine.services.Service |
getConfiguration, getName, getProperties, setName, setServiceBroker |
Methods inherited from interface org.apache.turbine.services.Initable |
getInit, init, setInitableBroker |
Field Detail |
public static java.lang.String SERVICE_NAME
public static final int DEFAULT_VERBOSE
Constructor Detail |
public DatabaseRegistryService()
Method Detail |
public org.apache.jetspeed.om.registry.Registry get(java.lang.String regName)
get
in interface RegistryService
regName
- the name of the registry to fetch
public java.util.Enumeration getNames()
getNames
in interface RegistryService
public org.apache.jetspeed.om.registry.RegistryEntry createEntry(java.lang.String regName)
createEntry
in interface RegistryService
regName
- the name of the registry to use
public org.apache.jetspeed.om.registry.RegistryEntry getEntry(java.lang.String regName, java.lang.String entryName)
Registry.getEntry(java.lang.String)
getEntry
in interface RegistryService
regName
- the name of the registryentryName
- the name of the entry to retrieve from the registry.
public void addEntry(java.lang.String regName, org.apache.jetspeed.om.registry.RegistryEntry entry) throws RegistryException
Registry.addEntry(org.apache.jetspeed.om.registry.RegistryEntry)
addEntry
in interface RegistryService
regName
- the name of the registryentry
- the Registry entry to add
Sends
- a RegistryException if the manager can't add
the provided entry
RegistryException
public void removeEntry(java.lang.String regName, java.lang.String entryName)
Registry.removeEntry(org.apache.jetspeed.om.registry.RegistryEntry)
removeEntry
in interface RegistryService
regName
- the name of the registryentryName
- the name of the entry to removepublic void init(javax.servlet.ServletConfig conf) throws org.apache.turbine.services.InitializationException
Service
framework
init
in class org.apache.turbine.services.TurbineBaseService
org.apache.turbine.services.InitializationException
public java.util.Map getFragmentMap()
getFragmentMap
in interface FileRegistry
public void init() throws org.apache.turbine.services.InitializationException
init
in interface org.apache.turbine.services.Initable
init
in class org.apache.turbine.services.TurbineBaseService
org.apache.turbine.services.InitializationException
public void shutdown()
Service
framework
shutdown
in interface org.apache.turbine.services.Initable
shutdown
in class org.apache.turbine.services.TurbineBaseService
protected void refresh(java.lang.String regName)
regName
- the name of the Registry to refreshpublic void refresh()
refresh
in interface FileRegistry
public void loadFragment(java.lang.String file)
loadFragment
in interface FileRegistry
file
- the absolute file path storing this fragmentpublic void createFragment(java.lang.String name, java.io.Reader reader, boolean persistent)
createFragment
in interface FileRegistry
name
- the name of this fragmentpersistent
- whether this fragment should be persisted on disk in
the registryreader
- the reader to use for creating this fragmentpublic void saveFragment(java.lang.String file)
saveFragment
in interface FileRegistry
file
- the absolute file path storing this fragmentpublic void removeFragment(java.lang.String file)
removeFragment
in interface FileRegistry
file
- the absolute file path storing this fragmentprotected void updateFragment(java.lang.String name, org.apache.jetspeed.services.registry.RegistryFragment fragment)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |