org.apache.jetspeed.om.profile
Interface PSMLDocument

All Superinterfaces:
java.lang.Cloneable, java.io.Serializable
All Known Implementing Classes:
BasePSMLDocument

public interface PSMLDocument
extends java.io.Serializable, java.lang.Cloneable

This interface represents a loaded PSML document in memory, providing all facilities for finding and updating specific parts of the document.

Version:
$Id: PSMLDocument.java,v 1.9 2005/03/21 18:21:36 sgala Exp $
Author:
Raphaël Luta

Method Summary
 java.lang.Object clone()
          Create a clone of this object
 Entry getEntry(java.lang.String name)
          Returns the first entry in the current PSML resource corresponding to the given portlet name
 Entry getEntryById(java.lang.String entryId)
          Returns the first entry in the current PSML resource corresponding to the given entry id
 java.lang.String getName()
          Return the name of this document
 Portlets getPortlets()
          Return the portlet set PSML description of this document
 Portlets getPortlets(int position)
          Returns the first portlets element in the current PSML resource found at the specified position.
 Portlets getPortlets(java.lang.String name)
          Returns the first portlets element in the current PSML resource corresponding to the given name
 Portlets getPortletsById(java.lang.String portletId)
          Returns the first portlets element in the current PSML resource corresponding to the given name
 boolean removeEntryById(java.lang.String entryId)
          Removes the first entry in the current PSML resource corresponding to the given entry id
 void setName(java.lang.String name)
          Sets a new name for this document
 void setPortlets(Portlets portlets)
          Sets a new PSML object model for this document
 

Method Detail

getName

public java.lang.String getName()
Return the name of this document


setName

public void setName(java.lang.String name)
Sets a new name for this document

Parameters:
name - the new document name

getPortlets

public Portlets getPortlets()
Return the portlet set PSML description of this document

Returns:
a PSML object model hierarchy, or null if none is defined for this document

setPortlets

public void setPortlets(Portlets portlets)
Sets a new PSML object model for this document

Parameters:
portlets - the PSML object model

getEntry

public Entry getEntry(java.lang.String name)
Returns the first entry in the current PSML resource corresponding to the given portlet name

Parameters:
name - the portlet name to seek
Returns:
the found entry description or null

getEntryById

public Entry getEntryById(java.lang.String entryId)
Returns the first entry in the current PSML resource corresponding to the given entry id

Parameters:
entryId - the portlet's entry id to seek
Returns:
the found entry description or null

getPortlets

public Portlets getPortlets(java.lang.String name)
Returns the first portlets element in the current PSML resource corresponding to the given name

Parameters:
name - the portlets name to seek
Returns:
the found portlets description or null

getPortletsById

public Portlets getPortletsById(java.lang.String portletId)
Returns the first portlets element in the current PSML resource corresponding to the given name

Parameters:
portletId - the portlet's entry id to seek
Returns:
the found portlets description or null

getPortlets

public Portlets getPortlets(int position)
Returns the first portlets element in the current PSML resource found at the specified position. The position is computed using a left-most tree traversal algorithm of the existing portlets (thus not counting other entry objects)

Parameters:
position - the sought position
Returns:
the found portlets object or null if we did not find such an object

removeEntryById

public boolean removeEntryById(java.lang.String entryId)
Removes the first entry in the current PSML resource corresponding to the given entry id

Parameters:
entryId - the portlet's entry id to remove
Returns:
true if the entry was removed

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Create a clone of this object

Throws:
java.lang.CloneNotSupportedException


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