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 at7 * 8 * http://www.apache.org/licenses/LICENSE-2.09 * 10 * Unless required by applicable law or agreed to in writing, software11 * 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 and14 * limitations under the License.15 */1617packageorg.apache.jetspeed.om.profile;
1819import org.apache.jetspeed.om.profile.Portlets;
20import org.apache.jetspeed.om.profile.Entry;
2122import java.io.Serializable;
23/***24 * This interface represents a loaded PSML document in memory, providing25 * 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 */31publicinterfacePSMLDocumentextends Serializable, Cloneable
32 {
33/***34 * Return the name of this document35 */36public String getName();
3738/***39 * Sets a new name for this document40 * 41 * @param name the new document name42 */43publicvoid setName(String name);
4445/***46 * Return the portlet set PSML description of this document47 *48 * @return a PSML object model hierarchy, or null if none is 49 * defined for this document50 */51publicPortlets getPortlets();
5253/***54 * Sets a new PSML object model for this document55 * 56 * @param portlets the PSML object model57 */58publicvoid setPortlets(Portlets portlets);
5960/*** Returns the first entry in the current PSML resource corresponding 61 * to the given portlet name62 * 63 * @param name the portlet name to seek64 * @return the found entry description or null65 */66publicEntry getEntry(String name);
6768/*** Returns the first entry in the current PSML resource corresponding 69 * to the given entry id70 * 71 * @param entryId the portlet's entry id to seek72 * @return the found entry description or null73 */74publicEntry getEntryById(String entryId);
7576/*** Returns the first portlets element in the current PSML resource corresponding 77 * to the given name78 * 79 * @param name the portlets name to seek80 * @return the found portlets description or null81 */82publicPortlets getPortlets(String name);
8384/*** Returns the first portlets element in the current PSML resource corresponding 85 * to the given name86 * 87 * @param portletId the portlet's entry id to seek88 * @return the found portlets description or null89 */90publicPortlets getPortletsById(String portletId);
9192/*** Returns the first portlets element in the current PSML resource 93 * found at the specified position. The position is computed using94 * a left-most tree traversal algorithm of the existing portlets (thus95 * not counting other entry objects)96 * 97 * @param position the sought position98 * @return the found portlets object or null if we did not find such an99 * object100 */101publicPortlets getPortlets(int position);
102103/*** 104 * Removes the first entry in the current PSML resource corresponding 105 * to the given entry id106 * 107 * @param entryId the portlet's entry id to remove108 * @return true if the entry was removed109 */110publicboolean removeEntryById(String entryId);
111112/***113 * Create a clone of this object114 */115public Object clone()
116 throws java.lang.CloneNotSupportedException;
117118 }
119