org.apache.jetspeed.services
Class PsmlManager

java.lang.Object
  extended byorg.apache.jetspeed.services.PsmlManager

public class PsmlManager
extends java.lang.Object

Static accessor for the PsmlManagerService

Version:
$Id: PsmlManager.java,v 1.11 2005/03/21 18:21:43 sgala Exp $
Author:
Raphaël Luta

Constructor Summary
PsmlManager()
           
 
Method Summary
static PSMLDocument createDocument(Profile profile)
          Create a new document.
 int export(PsmlManagerService consumer, QueryLocator locator)
          Export profiles from this service into another service
static 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.
static PSMLDocument getDocument(ProfileLocator locator)
          Returns a PSML document for the given locator
static PSMLDocument getDocument(java.lang.String name)
          Deprecated.  
static PsmlManagerService getService()
          Commodity method for getting a reference to the service singleton
static java.util.Iterator query(QueryLocator locator)
          Query for a collection of profiles given a profile locator criteria.
static PSMLDocument refresh(ProfileLocator locator)
          Refreshes a PSML document for the given locator
static void removeDocument(ProfileLocator locator)
          Removes a document.
static void removeGroupDocuments(Group group)
          Removes all documents for a given group.
static void removeRoleDocuments(Role role)
          Removes all documents for a given role.
static void removeUserDocuments(JetspeedUser user)
          Removes all documents for a given user.
static boolean saveDocument(PSMLDocument doc)
          Deprecated.  
static boolean saveDocument(java.lang.String fileOrUrl, PSMLDocument doc)
          Deprecated.  
static boolean store(Profile profile)
          Store the PSML document on disk, using its locator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PsmlManager

public PsmlManager()
Method Detail

getService

public static PsmlManagerService getService()
Commodity method for getting a reference to the service singleton


getDocument

public static 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 static 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 static 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 static 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 static boolean saveDocument(PSMLDocument doc)
Deprecated.  

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

Parameters:
doc - the document to save

saveDocument

public static 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

createDocument

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

Parameters:
profile - The description and default value for the new document.
Returns:
The newly created document.

removeDocument

public static void removeDocument(ProfileLocator locator)
Removes a document.

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

removeUserDocuments

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

Parameters:
user - The user object.

removeGroupDocuments

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

Parameters:
group - The group object.

removeRoleDocuments

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

Parameters:
role - The role object.

query

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

Parameters:
locator - The profile locator criteria.

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 static PSMLDocument refresh(ProfileLocator locator)
Refreshes a PSML document for the given locator

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


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