001: /*
002: * This file is part of PFIXCORE.
003: *
004: * PFIXCORE is free software; you can redistribute it and/or modify
005: * it under the terms of the GNU Lesser General Public License as published by
006: * the Free Software Foundation; either version 2 of the License, or
007: * (at your option) any later version.
008: *
009: * PFIXCORE is distributed in the hope that it will be useful,
010: * but WITHOUT ANY WARRANTY; without even the implied warranty of
011: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
012: * GNU Lesser General Public License for more details.
013: *
014: * You should have received a copy of the GNU Lesser General Public License
015: * along with PFIXCORE; if not, write to the Free Software
016: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
017: */
018:
019: package de.schlund.pfixcore.editor2.core.dom;
020:
021: import java.util.Collection;
022:
023: /**
024: * Pages are the objects which are directly visible to the end-user. One page
025: * can exist in several variants, whereas the variant name is used as a suffix
026: * to the page name, seperated from the page name by two colons ("::").
027: *
028: * @author Sebastian Marsching <sebastian.marsching@1und1.de>
029: */
030: public interface Page extends Comparable<Page> {
031: /**
032: * Returns page name (not including variant name)
033: *
034: * @return Name of the page as seen by the end-user
035: */
036: String getName();
037:
038: /**
039: * Returns the variant being used for this page. If no variant is being used
040: * for this page (default), null is returned.
041: *
042: * @return Variant or <code>null</code> if no variant is selected for this
043: * Page
044: */
045: Variant getVariant();
046:
047: /**
048: * Returns page name including variant name
049: *
050: * @return Name of the page including variant as used internally
051: */
052: String getFullName();
053:
054: /**
055: * Returns the path of the handler used for this Page (e.g. /xml/config)
056: *
057: * @return Path to the handler used in the URL of this Page
058: */
059: String getHandlerPath();
060:
061: /**
062: * Returns the XSL target which is used to generate the output of this Page
063: *
064: * @return Target of type TARGET_XSL representing the stylesheet being used
065: * to render this Page
066: */
067: Target getPageTarget();
068:
069: /**
070: * Returns a list of themes being active for this Page. The themes are
071: * returned in order of preference - preferred themes are returned before
072: * less preferred themes.
073: *
074: * @return Themes being used by this Page
075: */
076: ThemeList getThemes();
077:
078: /**
079: * Returns project this Page belongs to
080: *
081: * @return Project this Page is part of
082: */
083: Project getProject();
084:
085: /**
086: * Returns a list of all pages which are childs of this page in navigation.
087: *
088: * @return All child pages
089: */
090: Collection<Page> getSubPages();
091:
092: /**
093: * Returns whether there is at least one child page
094: *
095: * @return Whether child pages are existing
096: */
097: boolean hasSubPages();
098:
099: /**
100: * Registers this page for an update. This can be used to recalculate
101: * dependencies after something has changed. The update is not processed
102: * immediately but asynchronously.
103: *
104: * @see #update()
105: */
106: void registerForUpdate();
107:
108: /**
109: * Regenerates the page. This is useful to recalculate the dependencies
110: * after some part being used by this page has been changed.
111: * The regeneration is done synchronously.
112: *
113: * @see #registerForUpdate()
114: */
115: void update();
116: }
|