org.apache.wsrp4j.persistence.xml.driver
Class ServerPersistentInformationProviderImpl

java.lang.Object
  extended byorg.apache.wsrp4j.persistence.xml.driver.ServerPersistentInformationProviderImpl
All Implemented Interfaces:
PersistentInformationProvider, ServerPersistentInformationProvider

public class ServerPersistentInformationProviderImpl
extends java.lang.Object
implements ServerPersistentInformationProvider

This class holds the information for persistent file handling centrally. It creates the persistent file store directory during construction and returns PersistentFileInformation objects, filled with directory and file name information, based on the request. The file system structure looks like: 1) the PROVIDER case: ./persistence/*.xml (contains the mapping XML files) ./persistence/portlets/*.xml (contains object XML files) ./persistence/descriptions/*.xml (contains object XML files) ./persistence/portletStates/*.xml (contains object XML files) ./persistence/registries/*.xml (contains object XML files)

Version:
$Id: ServerPersistentInformationProviderImpl.java,v 1.4 2005/08/10 14:59:56 cziegeler Exp $
Author:
Ralf Altrichter

Field Summary
private  ServerPersistentInformationProvider _persistentInfoProvider
           
private static java.lang.String DESCRIPTIONS
           
private static java.lang.String FILE_EXTENSION
           
private  Logger logger
           
private static java.lang.String PERSISTENT_DIR
           
private static java.lang.String PLUTO_PORTLET_MAPPING
           
private static java.lang.String PORTLET_MAPPING
           
private static java.lang.String PORTLET_STATE_MAPPING
           
private static java.lang.String PORTLETS
           
private static java.lang.String PORTLETSTATES
           
private static java.lang.String PRODUCER_MAPPING
           
private static java.lang.String PRODUCERS
           
private static java.lang.String REGISTRIES
           
private static java.lang.String REGISTRY_MAPPING
           
private static java.lang.String ROOT_DIR
           
private static java.lang.String SEPARATOR
           
private static java.lang.String SERVICE_DESCRIPTION_MAPPING
           
private static java.lang.String SIMPLE_PORTLET_MAPPING
           
private static java.lang.String USER_MAPPING
           
private static java.lang.String USERS
           
 
Constructor Summary
private ServerPersistentInformationProviderImpl()
          Private constructor
  ServerPersistentInformationProviderImpl(java.lang.String offsetPath)
          Private constructor
 
Method Summary
static ServerPersistentInformationProvider create()
          Static construction of the PersistentInformationProvider
static ServerPersistentInformationProvider create(java.lang.String offsetPath)
           
 java.lang.String getMappingFile(java.lang.String mappingBaseName)
          Compute the path to the mapping file from the root plus the name of the mapping file
 PersistentInformation getPersistentInformation(ConsumerConfiguredPortletList cceList)
          Returns the persistent file information for the ConsumerConfiguredPortlet
 PersistentInformation getPersistentInformation(ConsumerPortletRegistrationList regList)
          Returns the persistent file information for the ConsumerPortletRegistrationList
 PersistentInformation getPersistentInformation(PortletDescriptionList portletDescriptionList)
          Returns the persistent file information for the PortletDescription
 PersistentInformation getPersistentInformation(PortletList portletList)
          Returns the persistent file information for the Portlet
 PersistentInformation getPersistentInformation(ProducerList producerList)
          Returns the persistent file information for the producers
 PersistentInformation getPersistentInformation(RegistrationList registrationList)
          Returns the persistent file information for the Registration
 PersistentInformation getPersistentInformation(ServiceDescriptionList serviceDescriptionList)
          Returns the persistent file information for the ServiceDescription
 PersistentInformation getPersistentInformation(UserList userList)
          Returns the persistent file information for the user
 java.lang.String getStoreDirectory(java.lang.String subDirectory)
          Returns the store directory with the given sub directory
 void makeStoreSubDir(java.lang.String subDirectory)
          Creates the store directory with the given sub directory name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_persistentInfoProvider

private ServerPersistentInformationProvider _persistentInfoProvider

logger

private Logger logger

DESCRIPTIONS

private static final java.lang.String DESCRIPTIONS
See Also:
Constant Field Values

PORTLETS

private static final java.lang.String PORTLETS
See Also:
Constant Field Values

PORTLETSTATES

private static final java.lang.String PORTLETSTATES
See Also:
Constant Field Values

REGISTRIES

private static final java.lang.String REGISTRIES
See Also:
Constant Field Values

USERS

private static final java.lang.String USERS
See Also:
Constant Field Values

PRODUCERS

private static final java.lang.String PRODUCERS
See Also:
Constant Field Values

USER_MAPPING

private static final java.lang.String USER_MAPPING
See Also:
Constant Field Values

PRODUCER_MAPPING

private static final java.lang.String PRODUCER_MAPPING
See Also:
Constant Field Values

PORTLET_MAPPING

private static final java.lang.String PORTLET_MAPPING
See Also:
Constant Field Values

SERVICE_DESCRIPTION_MAPPING

private static final java.lang.String SERVICE_DESCRIPTION_MAPPING
See Also:
Constant Field Values

REGISTRY_MAPPING

private static final java.lang.String REGISTRY_MAPPING
See Also:
Constant Field Values

PLUTO_PORTLET_MAPPING

private static final java.lang.String PLUTO_PORTLET_MAPPING
See Also:
Constant Field Values

SIMPLE_PORTLET_MAPPING

private static final java.lang.String SIMPLE_PORTLET_MAPPING
See Also:
Constant Field Values

PORTLET_STATE_MAPPING

private static final java.lang.String PORTLET_STATE_MAPPING
See Also:
Constant Field Values

ROOT_DIR

private static java.lang.String ROOT_DIR

FILE_EXTENSION

private static java.lang.String FILE_EXTENSION

PERSISTENT_DIR

private static java.lang.String PERSISTENT_DIR

SEPARATOR

private static java.lang.String SEPARATOR
Constructor Detail

ServerPersistentInformationProviderImpl

private ServerPersistentInformationProviderImpl()
Private constructor


ServerPersistentInformationProviderImpl

public ServerPersistentInformationProviderImpl(java.lang.String offsetPath)
Private constructor

Method Detail

create

public static ServerPersistentInformationProvider create()
Static construction of the PersistentInformationProvider


create

public static ServerPersistentInformationProvider create(java.lang.String offsetPath)
Parameters:
offsetPath - path for the store directory to be used Static construction of the PersistentInformationProvider

getStoreDirectory

public java.lang.String getStoreDirectory(java.lang.String subDirectory)
Returns the store directory with the given sub directory

Parameters:
subDirectory - String sub directory
Returns:
String store directory

makeStoreSubDir

public void makeStoreSubDir(java.lang.String subDirectory)
Creates the store directory with the given sub directory name

Parameters:
subDirectory - String sub directory

getMappingFile

public java.lang.String getMappingFile(java.lang.String mappingBaseName)
Compute the path to the mapping file from the root plus the name of the mapping file

Parameters:
mappingBaseName - String mapping file base name without extension
Returns:
String fully qualified mapping file name with extension

getPersistentInformation

public PersistentInformation getPersistentInformation(ServiceDescriptionList serviceDescriptionList)
Returns the persistent file information for the ServiceDescription

Specified by:
getPersistentInformation in interface ServerPersistentInformationProvider
Parameters:
serviceDescriptionList - ServiceDescriptionList
Returns:
PersistentInformation

getPersistentInformation

public PersistentInformation getPersistentInformation(PortletDescriptionList portletDescriptionList)
Returns the persistent file information for the PortletDescription

Specified by:
getPersistentInformation in interface ServerPersistentInformationProvider
Parameters:
portletDescriptionList - PortletDescriptionList
Returns:
PersistentInformation

getPersistentInformation

public PersistentInformation getPersistentInformation(RegistrationList registrationList)
Returns the persistent file information for the Registration

Specified by:
getPersistentInformation in interface ServerPersistentInformationProvider
Parameters:
registrationList - RegistrationList
Returns:
PersistentInformation

getPersistentInformation

public PersistentInformation getPersistentInformation(ConsumerConfiguredPortletList cceList)
Returns the persistent file information for the ConsumerConfiguredPortlet

Specified by:
getPersistentInformation in interface ServerPersistentInformationProvider
Parameters:
cceList - ConsumerConfiguredPortletList
Returns:
PersistentInformation

getPersistentInformation

public PersistentInformation getPersistentInformation(ProducerList producerList)
Returns the persistent file information for the producers

Specified by:
getPersistentInformation in interface ServerPersistentInformationProvider
Parameters:
producerList -
Returns:
PersistentInformation

getPersistentInformation

public PersistentInformation getPersistentInformation(UserList userList)
Returns the persistent file information for the user

Specified by:
getPersistentInformation in interface ServerPersistentInformationProvider
Parameters:
userList -
Returns:
PersistentInformation

getPersistentInformation

public PersistentInformation getPersistentInformation(PortletList portletList)
Returns the persistent file information for the Portlet

Specified by:
getPersistentInformation in interface ServerPersistentInformationProvider
Parameters:
portletList -
Returns:
PersistentInformation

getPersistentInformation

public PersistentInformation getPersistentInformation(ConsumerPortletRegistrationList regList)
Returns the persistent file information for the ConsumerPortletRegistrationList

Specified by:
getPersistentInformation in interface ServerPersistentInformationProvider
Parameters:
regList -
Returns:
PersistentInformation


--