KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > om > profile > PSMLDocument


1 /*
2  * Copyright 2000-2001,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.jetspeed.om.profile;
18
19 import org.apache.jetspeed.om.profile.Portlets;
20 import org.apache.jetspeed.om.profile.Entry;
21
22 import java.io.Serializable JavaDoc;
23 /**
24  * This interface represents a loaded PSML document in memory, providing
25  * all facilities for finding and updating specific parts of the
26  * document.
27  *
28  * @author <a HREF="mailto:raphael@apache.org">Raphaël Luta</a>
29  * @version $Id: PSMLDocument.java,v 1.8 2004/02/23 03:05:01 jford Exp $
30  */

31 public interface PSMLDocument extends Serializable JavaDoc, Cloneable JavaDoc
32 {
33     /**
34      * Return the name of this document
35      */

36     public String JavaDoc getName();
37         
38     /**
39      * Sets a new name for this document
40      *
41      * @param name the new document name
42      */

43     public void setName(String JavaDoc name);
44
45     /**
46      * Return the portlet set PSML description of this document
47      *
48      * @return a PSML object model hierarchy, or null if none is
49      * defined for this document
50      */

51     public Portlets getPortlets();
52
53     /**
54      * Sets a new PSML object model for this document
55      *
56      * @param portlets the PSML object model
57      */

58     public void setPortlets(Portlets portlets);
59
60     /** Returns the first entry in the current PSML resource corresponding
61      * to the given portlet name
62      *
63      * @param name the portlet name to seek
64      * @return the found entry description or null
65      */

66     public Entry getEntry(String JavaDoc name);
67
68     /** Returns the first entry in the current PSML resource corresponding
69      * to the given entry id
70      *
71      * @param entryId the portlet's entry id to seek
72      * @return the found entry description or null
73      */

74     public Entry getEntryById(String JavaDoc entryId);
75
76     /** Returns the first portlets element in the current PSML resource corresponding
77      * to the given name
78      *
79      * @param name the portlets name to seek
80      * @return the found portlets description or null
81      */

82     public Portlets getPortlets(String JavaDoc name);
83
84     /** Returns the first portlets element in the current PSML resource corresponding
85      * to the given name
86      *
87      * @param portletId the portlet's entry id to seek
88      * @return the found portlets description or null
89      */

90     public Portlets getPortletsById(String JavaDoc portletId);
91
92     /** Returns the first portlets element in the current PSML resource
93      * found at the specified position. The position is computed using
94      * a left-most tree traversal algorithm of the existing portlets (thus
95      * not counting other entry objects)
96      *
97      * @param position the sought position
98      * @return the found portlets object or null if we did not find such an
99      * object
100      */

101     public Portlets getPortlets(int position);
102
103     /**
104      * Removes the first entry in the current PSML resource corresponding
105      * to the given entry id
106      *
107      * @param entryId the portlet's entry id to remove
108      * @return true if the entry was removed
109      */

110     public boolean removeEntryById(String JavaDoc entryId);
111     
112     /**
113      * Create a clone of this object
114      */

115     public Object JavaDoc clone()
116         throws java.lang.CloneNotSupportedException JavaDoc;
117
118 }
119
120
Popular Tags