org.apache.jetspeed.services.psmlmanager
Interface PsmlManagerService

All Superinterfaces:
org.apache.turbine.services.Initable, org.apache.turbine.services.Service
All Known Subinterfaces:
DatabasePsmlManager
All Known Implementing Classes:
CastorPsmlManagerService, DatabasePsmlManagerService

public interface PsmlManagerService
extends org.apache.turbine.services.Service

This service is responsible for loading and saving PSML documents.

Version:
$Id: PsmlManagerService.java,v 1.13 2005/03/21 18:21:44 sgala Exp $
Author:
Raphaël Luta

Field Summary
static java.lang.String SERVICE_NAME
          The name of the service
 
Method Summary
 PSMLDocument createDocument(Profile profile)
          Create a new document.
 int export(PsmlManagerService consumer, QueryLocator locator)
          Export profiles from this service into another service
 PSMLDocument getDocument(java.util.List locators)
          Given a ordered list of locators, find the first document matching a profile locator, starting from the beginning of the list and working to the end.
 PSMLDocument getDocument(ProfileLocator locator)
          Returns a PSML document for the given locator
 PSMLDocument getDocument(java.lang.String name)
          Deprecated.  
 java.util.Iterator query(QueryLocator locator)
          Query for a collection of profiles given a profile locator criteria.
 PSMLDocument refresh(ProfileLocator locator)
          Returns a PSML document for the given locator bypassing the cache (if applicable)
 void removeDocument(ProfileLocator locator)
          Remove a document.
 void removeGroupDocuments(Group group)
          Removes all documents for a given group.
 void removeRoleDocuments(Role role)
          Removes all documents for a given role.
 void removeUserDocuments(JetspeedUser user)
          Removes all documents for a given user.
 boolean saveDocument(PSMLDocument doc)
          Deprecated.  
 boolean saveDocument(java.lang.String fileOrUrl, PSMLDocument doc)
          Deprecated.  
 boolean store(Profile profile)
          Store the PSML document on disk, using its locator
 
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, init, setInitableBroker, shutdown
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
The name of the service

See Also:
Constant Field Values
Method Detail

getDocument

public PSMLDocument getDocument(java.lang.String name)
Deprecated.  

Returns a PSML document of the given name. For this implementation, the name must be the document URL or absolute filepath

Parameters:
name - the name of the document to retrieve

getDocument

public PSMLDocument getDocument(ProfileLocator locator)
Returns a PSML document for the given locator

Parameters:
locator - The locator descriptor of the document to be retrieved.

getDocument

public PSMLDocument getDocument(java.util.List locators)
Given a ordered list of locators, find the first document matching a profile locator, starting from the beginning of the list and working to the end.


store

public boolean store(Profile profile)
Store the PSML document on disk, using its locator

Parameters:
profile - the profile locator description.
Returns:
true if the operation succeeded

saveDocument

public boolean saveDocument(PSMLDocument doc)
Deprecated.  

Save the PSML document on disk, using its name as filepath

Parameters:
doc - the document to save
Returns:
true if the operation succeeded

saveDocument

public boolean saveDocument(java.lang.String fileOrUrl,
                            PSMLDocument doc)
Deprecated.  

Save the PSML document on disk to the specififed fileOrUrl

Parameters:
fileOrUrl - a String representing either an absolute URL or an absolute filepath
doc - the document to save
Returns:
true if the operation succeeded

createDocument

public PSMLDocument createDocument(Profile profile)
Create a new document.

Parameters:
profile - the profile to use
Returns:
The newly created document.

removeDocument

public void removeDocument(ProfileLocator locator)
Remove a document.

Parameters:
locator - The description of the profile to be removed.

removeUserDocuments

public void removeUserDocuments(JetspeedUser user)
Removes all documents for a given user.

Parameters:
user - The user object.

removeGroupDocuments

public void removeGroupDocuments(Group group)
Removes all documents for a given group.

Parameters:
group - The group object.

removeRoleDocuments

public void removeRoleDocuments(Role role)
Removes all documents for a given role.

Parameters:
role - The role object.

query

public java.util.Iterator query(QueryLocator locator)
Query for a collection of profiles given a profile locator criteria.

Parameters:
locator - The profile locator criteria.
Returns:
A collection of profiles that match the criteria specified in the locator.

export

public int export(PsmlManagerService consumer,
                  QueryLocator locator)
Export profiles from this service into another service

Parameters:
consumer - The PSML consumer service, receives PSML from this service.
locator - The profile locator criteria.
Returns:
The count of profiles exported.

refresh

public PSMLDocument refresh(ProfileLocator locator)
Returns a PSML document for the given locator bypassing the cache (if applicable)

Parameters:
locator - The locator descriptor of the document to be retrieved.


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.