Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 88ECA200CC2 for ; Tue, 20 Jun 2017 21:32:21 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 870A3160BEF; Tue, 20 Jun 2017 19:32:21 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1C029160BF5 for ; Tue, 20 Jun 2017 21:32:17 +0200 (CEST) Received: (qmail 23019 invoked by uid 500); 20 Jun 2017 19:32:17 -0000 Mailing-List: contact commits-help@jspwiki.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jspwiki.apache.org Delivered-To: mailing list commits@jspwiki.apache.org Received: (qmail 22626 invoked by uid 99); 20 Jun 2017 19:32:14 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Jun 2017 19:32:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E64A1E0A38; Tue, 20 Jun 2017 19:32:13 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: git-site-role@apache.org To: commits@jspwiki.apache.org Date: Tue, 20 Jun 2017 19:32:54 -0000 Message-Id: <5037a5e1960b4478ba6e91a4c9e567f9@git.apache.org> In-Reply-To: <0376810a7d4645cbb4310daffb0708ca@git.apache.org> References: <0376810a7d4645cbb4310daffb0708ca@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [43/51] [partial] jspwiki-site git commit: Automatic Site Publish by Buildbot archived-at: Tue, 20 Jun 2017 19:32:21 -0000 http://git-wip-us.apache.org/repos/asf/jspwiki-site/blob/570c2bf5/apidocs/2.10.1/org/apache/wiki/PageManager.html ---------------------------------------------------------------------- diff --git a/apidocs/2.10.1/org/apache/wiki/PageManager.html b/apidocs/2.10.1/org/apache/wiki/PageManager.html deleted file mode 100755 index 2366c51..0000000 --- a/apidocs/2.10.1/org/apache/wiki/PageManager.html +++ /dev/null @@ -1,1221 +0,0 @@ - - - - - - - -PageManager (Apache JSPWiki Main War 2.10.1 API) - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.apache.wiki -
-Class PageManager

-
-java.lang.Object
-  extended by org.apache.wiki.modules.ModuleManager
-      extended by org.apache.wiki.PageManager
-
-
-
All Implemented Interfaces:
EventListener, WikiEventListener
-
-
-
-
public class PageManager
extends ModuleManager
implements WikiEventListener
- - - - - - -
- -

-Manages the WikiPages. This class functions as an unified interface towards - the page providers. It handles initialization and management of the providers, - and provides utility methods for accessing the contents. -

- Saving a page is a two-stage Task; first the pre-save operations and then the - actual save. See the descriptions of the tasks for further information. -

- -

-

-
Since:
-
2.0
-
-
- -

- - - - - - - - - - - - - - - -
-Nested Class Summary
-static classPageManager.PreSaveWikiPageTask - -
-          Inner class that handles the page pre-save actions.
-static classPageManager.SaveWikiPageTask - -
-          Inner class that handles the actual page save and post-save actions.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Field Summary
-static StringFACT_CURRENT_TEXT - -
-          Fact name for storing the current text.
-static StringFACT_DIFF_TEXT - -
-          Fact name for storing a diff text.
-static StringFACT_IS_AUTHENTICATED - -
-          Fact name for storing whether the user is authenticated or not.
-static StringFACT_PAGE_NAME - -
-          Fact name for storing the page name.
-static StringFACT_PROPOSED_TEXT - -
-          Fact name for storing the proposed (edited) text.
-protected  HashMap<String,PageLock>m_pageLocks - -
-           
-static StringPRESAVE_TASK_MESSAGE_KEY - -
-          The message key for storing the text for the presave task.
-static StringPRESAVE_WIKI_CONTEXT - -
-          The workflow attribute which stores the wikiContext.
-static StringPROP_LOCKEXPIRY - -
-          The property value for setting the amount of time before the page locks expire.
-static StringPROP_PAGEPROVIDER - -
-          The property value for setting the current page provider.
-static StringPROP_USECACHE - -
-          The property value for setting the cache on/off.
-static StringSAVE_APPROVER - -
-          The name of the key from jspwiki.properties which defines who shall approve - the workflow of storing a wikipage.
-static StringSAVE_DECISION_MESSAGE_KEY - -
-          The message key for storing the Decision text for saving a page.
-static StringSAVE_REJECT_MESSAGE_KEY - -
-          The message key for rejecting the decision to save the page.
-static StringSAVE_TASK_MESSAGE_KEY - -
-          The message key of the text to finally approve a page save.
- - - - - - - -
Fields inherited from class org.apache.wiki.modules.ModuleManager
PLUGIN_RESOURCE_LOCATION
-  - - - - - - - - - - -
-Constructor Summary
PageManager(WikiEngine engine, - Properties props) - -
-          Creates a new PageManager.
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- voidactionPerformed(WikiEvent event) - -
-          Listens for WikiSecurityEvent.PROFILE_NAME_CHANGED - events.
-protected  booleanchangeAcl(WikiPage page, - Principal[] oldPrincipals, - Principal newPrincipal) - -
-          For a single wiki page, replaces all Acl entries matching a supplied array of Principals - with a new Principal.
- voiddeletePage(WikiPage page) - -
-          Deletes an entire page, all versions, all traces.
- voiddeleteVersion(WikiPage page) - -
-          Deletes only a specific version of a WikiPage.
-protected  voidfireEvent(int type, - String pagename) - -
-          Fires a WikiPageEvent of the provided type and page name - to all registered listeners.
- List<PageLock>getActiveLocks() - -
-          Returns a list of currently applicable locks.
- CollectiongetAllPages() - -
-          Returns all pages in some random order.
- PageLockgetCurrentLock(WikiPage page) - -
-          Returns the current lock owner of a page.
- WikiEnginegetEngine() - -
-          Returns the WikiEngine to which this PageManager belongs to.
- WikiPagegetPageInfo(String pageName, - int version) - -
-          Finds a WikiPage object describing a particular page and version.
- StringgetPageText(String pageName, - int version) - -
-          Fetches the page text from the repository.
- WikiPageProvidergetProvider() - -
-          Returns the page provider currently in use.
- StringgetProviderDescription() - -
-          Returns a human-readable description of the current provider.
- intgetTotalPageCount() - -
-          Returns the total count of all pages in the repository.
- ListgetVersionHistory(String pageName) - -
-          Gets a version history of page.
- PageLocklockPage(WikiPage page, - String user) - -
-          Locks page for editing.
- Collectionmodules() - -
-          Returns a collection of modules currently managed by this ModuleManager.
- booleanpageExists(String pageName) - -
-          Returns true, if the page exists (any version).
- booleanpageExists(String pageName, - int version) - -
-          Checks for existence of a specific page and version.
- voidputPageText(WikiPage page, - String content) - -
-          Puts the page text into the repository.
- voidunlockPage(PageLock lock) - -
-          Marks a page free to be written again.
- - - - - - - -
Methods inherited from class org.apache.wiki.modules.ModuleManager
checkCompatibility
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-  -

- - - - - - - - -
-Field Detail
- -

-PROP_PAGEPROVIDER

-
-public static final String PROP_PAGEPROVIDER
-
-
The property value for setting the current page provider. Value is "jspwiki.pageProvider". -

-

-
See Also:
Constant Field Values
-
-
- -

-PROP_USECACHE

-
-public static final String PROP_USECACHE
-
-
The property value for setting the cache on/off. Value is "jspwiki.usePageCache". -

-

-
See Also:
Constant Field Values
-
-
- -

-PROP_LOCKEXPIRY

-
-public static final String PROP_LOCKEXPIRY
-
-
The property value for setting the amount of time before the page locks expire. Value is "jspwiki.lockExpiryTime". -

-

-
See Also:
Constant Field Values
-
-
- -

-PRESAVE_TASK_MESSAGE_KEY

-
-public static final String PRESAVE_TASK_MESSAGE_KEY
-
-
The message key for storing the text for the presave task. Value is "task.preSaveWikiPage" -

-

-
See Also:
Constant Field Values
-
-
- -

-PRESAVE_WIKI_CONTEXT

-
-public static final String PRESAVE_WIKI_CONTEXT
-
-
The workflow attribute which stores the wikiContext. -

-

-
See Also:
Constant Field Values
-
-
- -

-SAVE_APPROVER

-
-public static final String SAVE_APPROVER
-
-
The name of the key from jspwiki.properties which defines who shall approve - the workflow of storing a wikipage. Value is "workflow.saveWikiPage" -

-

-
See Also:
Constant Field Values
-
-
- -

-SAVE_DECISION_MESSAGE_KEY

-
-public static final String SAVE_DECISION_MESSAGE_KEY
-
-
The message key for storing the Decision text for saving a page. Value is "decision.saveWikiPage". -

-

-
See Also:
Constant Field Values
-
-
- -

-SAVE_REJECT_MESSAGE_KEY

-
-public static final String SAVE_REJECT_MESSAGE_KEY
-
-
The message key for rejecting the decision to save the page. Value is "notification.saveWikiPage.reject". -

-

-
See Also:
Constant Field Values
-
-
- -

-SAVE_TASK_MESSAGE_KEY

-
-public static final String SAVE_TASK_MESSAGE_KEY
-
-
The message key of the text to finally approve a page save. Value is "task.saveWikiPage". -

-

-
See Also:
Constant Field Values
-
-
- -

-FACT_PAGE_NAME

-
-public static final String FACT_PAGE_NAME
-
-
Fact name for storing the page name. Value is "fact.pageName". -

-

-
See Also:
Constant Field Values
-
-
- -

-FACT_DIFF_TEXT

-
-public static final String FACT_DIFF_TEXT
-
-
Fact name for storing a diff text. Value is "fact.diffText". -

-

-
See Also:
Constant Field Values
-
-
- -

-FACT_CURRENT_TEXT

-
-public static final String FACT_CURRENT_TEXT
-
-
Fact name for storing the current text. Value is "fact.currentText". -

-

-
See Also:
Constant Field Values
-
-
- -

-FACT_PROPOSED_TEXT

-
-public static final String FACT_PROPOSED_TEXT
-
-
Fact name for storing the proposed (edited) text. Value is "fact.proposedText". -

-

-
See Also:
Constant Field Values
-
-
- -

-FACT_IS_AUTHENTICATED

-
-public static final String FACT_IS_AUTHENTICATED
-
-
Fact name for storing whether the user is authenticated or not. Value is "fact.isAuthenticated". -

-

-
See Also:
Constant Field Values
-
-
- -

-m_pageLocks

-
-protected HashMap<String,PageLock> m_pageLocks
-
-
-
-
- - - - - - - - -
-Constructor Detail
- -

-PageManager

-
-public PageManager(WikiEngine engine,
-                   Properties props)
-            throws WikiException
-
-
Creates a new PageManager. -

-

-
Parameters:
engine - WikiEngine instance
props - Properties to use for initialization -
Throws: -
WikiException - If anything goes wrong, you get this.
-
- - - - - - - - -
-Method Detail
- -

-getProvider

-
-public WikiPageProvider getProvider()
-
-
Returns the page provider currently in use. -

-

-
-
-
- -
Returns:
A WikiPageProvider instance.
-
-
-
- -

-getAllPages

-
-public Collection getAllPages()
-                       throws ProviderException
-
-
Returns all pages in some random order. If you need just the page names, - please see ReferenceManager.findCreated(), which is probably a lot - faster. This method may cause repository access. -

-

-
-
-
- -
Returns:
A Collection of WikiPage objects. -
Throws: -
ProviderException - If the backend has problems.
-
-
-
- -

-getPageText

-
-public String getPageText(String pageName,
-                          int version)
-                   throws ProviderException
-
-
Fetches the page text from the repository. This method also does some sanity checks, - like checking for the pageName validity, etc. Also, if the page repository has been - modified externally, it is smart enough to handle such occurrences. -

-

-
-
-
-
Parameters:
pageName - The name of the page to fetch.
version - The version to find -
Returns:
The page content as a raw string -
Throws: -
ProviderException - If the backend has issues.
-
-
-
- -

-getEngine

-
-public WikiEngine getEngine()
-
-
Returns the WikiEngine to which this PageManager belongs to. -

-

-
-
-
- -
Returns:
The WikiEngine object.
-
-
-
- -

-putPageText

-
-public void putPageText(WikiPage page,
-                        String content)
-                 throws ProviderException
-
-
Puts the page text into the repository. Note that this method does NOT update - JSPWiki internal data structures, and therefore you should always use WikiEngine.saveText() -

-

-
-
-
-
Parameters:
page - Page to save
content - Wikimarkup to save -
Throws: -
ProviderException - If something goes wrong in the saving phase
-
-
-
- -

-lockPage

-
-public PageLock lockPage(WikiPage page,
-                         String user)
-
-
Locks page for editing. Note, however, that the PageManager - will in no way prevent you from actually editing this page; - the lock is just for information. -

-

-
-
-
-
Parameters:
page - WikiPage to lock
user - Username to use for locking -
Returns:
null, if page could not be locked.
-
-
-
- -

-unlockPage

-
-public void unlockPage(PageLock lock)
-
-
Marks a page free to be written again. If there has not been a lock, will fail quietly. -

-

-
-
-
-
Parameters:
lock - A lock acquired in lockPage(). Safe to be null.
-
-
-
- -

-getCurrentLock

-
-public PageLock getCurrentLock(WikiPage page)
-
-
Returns the current lock owner of a page. If the page is not - locked, will return null. -

-

-
-
-
-
Parameters:
page - The page to check the lock for -
Returns:
Current lock, or null, if there is no lock
-
-
-
- -

-getActiveLocks

-
-public List<PageLock> getActiveLocks()
-
-
Returns a list of currently applicable locks. Note that by the time you get the list, - the locks may have already expired, so use this only for informational purposes. -

-

-
-
-
- -
Returns:
List of PageLock objects, detailing the locks. If no locks exist, returns - an empty list.
Since:
-
2.0.22.
-
-
-
-
- -

-getPageInfo

-
-public WikiPage getPageInfo(String pageName,
-                            int version)
-                     throws ProviderException
-
-
Finds a WikiPage object describing a particular page and version. -

-

-
-
-
-
Parameters:
pageName - The name of the page
version - A version number -
Returns:
A WikiPage object, or null, if the page does not exist -
Throws: -
ProviderException - If there is something wrong with the page - name or the repository
-
-
-
- -

-getVersionHistory

-
-public List getVersionHistory(String pageName)
-                       throws ProviderException
-
-
Gets a version history of page. Each element in the returned - List is a WikiPage. -

-

-
-
-
-
Parameters:
pageName - The name of the page to fetch history for -
Returns:
If the page does not exist, returns null, otherwise a List - of WikiPages. -
Throws: -
ProviderException - If the repository fails.
-
-
-
- -

-getProviderDescription

-
-public String getProviderDescription()
-
-
Returns a human-readable description of the current provider. -

-

-
-
-
- -
Returns:
A human-readable description.
-
-
-
- -

-getTotalPageCount

-
-public int getTotalPageCount()
-
-
Returns the total count of all pages in the repository. This - method is equivalent of calling getAllPages().size(), but - it swallows the ProviderException and returns -1 instead of - any problems. -

-

-
-
-
- -
Returns:
The number of pages, or -1, if there is an error.
-
-
-
- -

-pageExists

-
-public boolean pageExists(String pageName)
-                   throws ProviderException
-
-
Returns true, if the page exists (any version). -

-

-
-
-
-
Parameters:
pageName - Name of the page. -
Returns:
A boolean value describing the existence of a page -
Throws: -
ProviderException - If the backend fails or the name is illegal.
-
-
-
- -

-pageExists

-
-public boolean pageExists(String pageName,
-                          int version)
-                   throws ProviderException
-
-
Checks for existence of a specific page and version. -

-

-
-
-
-
Parameters:
pageName - Name of the page
version - The version to check -
Returns:
true if the page exists, false otherwise -
Throws: -
ProviderException - If backend fails or name is illegal
Since:
-
2.3.29
-
-
-
-
- -

-deleteVersion

-
-public void deleteVersion(WikiPage page)
-                   throws ProviderException
-
-
Deletes only a specific version of a WikiPage. -

-

-
-
-
-
Parameters:
page - The page to delete. -
Throws: -
ProviderException - if the page fails
-
-
-
- -

-deletePage

-
-public void deletePage(WikiPage page)
-                throws ProviderException
-
-
Deletes an entire page, all versions, all traces. -

-

-
-
-
-
Parameters:
page - The WikiPage to delete -
Throws: -
ProviderException - If the repository operation fails
-
-
-
- -

-fireEvent

-
-protected final void fireEvent(int type,
-                               String pagename)
-
-
Fires a WikiPageEvent of the provided type and page name - to all registered listeners. -

-

-
-
-
-
Parameters:
type - the event type to be fired
pagename - the wiki page name as a String
See Also:
WikiPageEvent
-
-
-
- -

-modules

-
-public Collection modules()
-
-
Returns a collection of modules currently managed by this ModuleManager. Each - entry is an instance of the WikiModuleInfo class. This method should return something - which is safe to iterate over, even if the underlying collection changes. -

-

-
Specified by:
modules in class ModuleManager
-
-
- -
Returns:
A Collection of WikiModuleInfo instances.
-
-
-
- -

-actionPerformed

-
-public void actionPerformed(WikiEvent event)
-
-
Listens for WikiSecurityEvent.PROFILE_NAME_CHANGED - events. If a user profile's name changes, each page ACL is inspected. If an entry contains - a name that has changed, it is replaced with the new one. No events are emitted - as a consequence of this method, because the page contents are still the same; it is - only the representations of the names within the ACL that are changing. -

-

-
Specified by:
actionPerformed in interface WikiEventListener
-
-
-
Parameters:
event - The event
-
-
-
- -

-changeAcl

-
-protected boolean changeAcl(WikiPage page,
-                            Principal[] oldPrincipals,
-                            Principal newPrincipal)
-
-
For a single wiki page, replaces all Acl entries matching a supplied array of Principals - with a new Principal. -

-

-
-
-
-
Parameters:
page - the wiki page whose Acl is to be modified
oldPrincipals - an array of Principals to replace; all AclEntry objects whose - AclEntry.getPrincipal() method returns one of these Principals will be replaced
newPrincipal - the Principal that should receive the old Principals' permissions -
Returns:
true if the Acl was actually changed; false otherwise
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
-Copyright © {inceptionYear}-2014 The Apache Software Foundation. All rights reserved. - - http://git-wip-us.apache.org/repos/asf/jspwiki-site/blob/570c2bf5/apidocs/2.10.1/org/apache/wiki/PageManager.png ---------------------------------------------------------------------- diff --git a/apidocs/2.10.1/org/apache/wiki/PageManager.png b/apidocs/2.10.1/org/apache/wiki/PageManager.png deleted file mode 100755 index ca65ee6..0000000 Binary files a/apidocs/2.10.1/org/apache/wiki/PageManager.png and /dev/null differ