001: // Copyright (C) 2003,2004,2005 by Object Mentor, Inc. All rights reserved.
002: // Released under the terms of the GNU General Public License version 2 or later.
003:
004: package fitnesse.wiki;
005:
006: import java.io.Serializable;
007: import java.util.*;
008: import fitnesse.util.StringUtil;
009:
010: public interface WikiPage extends Serializable, Comparable {
011: public static final String ACTION_SEARCH = "Search";
012:
013: public static final String ACTION_FILES = "Files";
014:
015: public static final String ACTION_RECENT_CHANGES = "RecentChanges";
016:
017: public static final String ACTION_WHERE_USED = "WhereUsed";
018:
019: public static final String ACTION_REFACTOR = "Refactor";
020:
021: public static final String ACTION_PROPERTIES = "Properties";
022:
023: public static final String ACTION_VERSIONS = "Versions";
024:
025: public static final String ACTION_EDIT = "Edit";
026:
027: public static final String ACTION_SUITE = "Suite";
028:
029: public static final String ACTION_TEST = "Test";
030:
031: public static final String ACTION_OPEN_IN_WINDOW = "OpenInWindow";
032:
033: public static final String ACTION_NEW_PAGE = "NewPage";
034:
035: public static final String ACTION_REFRESH = "Refresh";
036:
037: public static final String STIQ_TEST = "STIQTest";
038:
039: public static final String STIQ_COMPONENT = "STIQComponent";
040:
041: public static final String STIQ_SUITE = "STIQSuite";
042:
043: public static final String STIQ_CONTAINER = "Container";
044:
045: public static final String SECURE_READ = "secure-read";
046:
047: public static final String SECURE_WRITE = "secure-write";
048:
049: public static final String SECURE_TEST = "secure-test";
050:
051: public static final String LAST_MODIFYING_USER = "LastModifyingUser";
052:
053: public String[] PAGE_TYPE_ATTRIBUTES = { STIQ_TEST, STIQ_COMPONENT,
054: STIQ_SUITE };
055:
056: public String[] ACTION_ATTRIBUTES = { ACTION_TEST, ACTION_SUITE,
057: ACTION_EDIT, ACTION_VERSIONS, ACTION_REFACTOR,
058: ACTION_WHERE_USED };
059:
060: public String[] NAVIGATION_ATTRIBUTES = { ACTION_RECENT_CHANGES,
061: ACTION_FILES, ACTION_SEARCH };
062:
063: public String[] NON_SECURITY_ATTRIBUTES = StringUtil.combineArrays(
064: PAGE_TYPE_ATTRIBUTES, StringUtil.combineArrays(
065: ACTION_ATTRIBUTES, NAVIGATION_ATTRIBUTES));
066:
067: public String[] SECURITY_ATTRIBUTES = { SECURE_READ, SECURE_WRITE,
068: SECURE_TEST };
069:
070: public WikiPage getParent() throws Exception;
071:
072: public WikiPage addChildPage(String name) throws Exception;
073:
074: public boolean hasChildPage(String name) throws Exception;
075:
076: public WikiPage getChildPage(String name) throws Exception;
077:
078: public void removeChildPage(String name) throws Exception;
079:
080: public List getChildren() throws Exception;
081:
082: public String getName() throws Exception;
083:
084: public PageData getData() throws Exception;
085:
086: public PageData getDataVersion(String versionName) throws Exception;
087:
088: public VersionInfo commit(PageData data) throws Exception;
089:
090: public PageCrawler getPageCrawler();
091:
092: // TODO Delete these method alone with ProxyPage when the time is right.
093: public boolean hasExtension(String extensionName);
094:
095: public Extension getExtension(String extensionName);
096:
097: public boolean isSTIQTest();
098:
099: public boolean isSTIQTestComponent();
100:
101: public boolean isSTIQBranch();
102:
103: }
|