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 11B39200C6F for ; Tue, 9 May 2017 21:15:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 106D4160B9A; Tue, 9 May 2017 19:15:09 +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 39B30160BDD for ; Tue, 9 May 2017 21:15:06 +0200 (CEST) Received: (qmail 59059 invoked by uid 500); 9 May 2017 19:15:05 -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 58146 invoked by uid 99); 9 May 2017 19:15:02 -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, 09 May 2017 19:15:02 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D6FD9E0FE7; Tue, 9 May 2017 19:15:02 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: juanpablo@apache.org To: commits@jspwiki.apache.org Date: Tue, 09 May 2017 19:15:13 -0000 Message-Id: <3678bf166e4b4a75aee63b37ed8fb828@git.apache.org> In-Reply-To: <55419443330d498da24ddbe3b68ea0b9@git.apache.org> References: <55419443330d498da24ddbe3b68ea0b9@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [12/51] [partial] jspwiki-site git commit: Automatic Site Publish by Buildbot archived-at: Tue, 09 May 2017 19:15:09 -0000 http://git-wip-us.apache.org/repos/asf/jspwiki-site/blob/edae175e/content/apidocs/2.10.1/org/apache/wiki/auth/acl/AclImpl.html ---------------------------------------------------------------------- diff --git a/content/apidocs/2.10.1/org/apache/wiki/auth/acl/AclImpl.html b/content/apidocs/2.10.1/org/apache/wiki/auth/acl/AclImpl.html new file mode 100755 index 0000000..4dc373e --- /dev/null +++ b/content/apidocs/2.10.1/org/apache/wiki/auth/acl/AclImpl.html @@ -0,0 +1,442 @@ + + + + + + + +AclImpl (Apache JSPWiki Main War 2.10.1 API) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.apache.wiki.auth.acl +
+Class AclImpl

+
+java.lang.Object
+  extended by org.apache.wiki.auth.acl.AclImpl
+
+
+
All Implemented Interfaces:
Serializable, Acl
+
+
+
+
public class AclImpl
extends Object
implements Acl, Serializable
+ + + + + + +
+ +

+JSPWiki implementation of an Access Control List. +

+ +

+

+
Since:
+
2.3
+
See Also:
Serialized Form
+
+ +

+ + + + + + + + + + + +
+Constructor Summary
AclImpl() + +
+          Constructs a new AclImpl instance.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleanaddEntry(AclEntry entry) + +
+          Adds an ACL entry to this ACL.
+ Enumeration<AclEntry>entries() + +
+          Returns an enumeration of the entries in this ACL.
+ Principal[]findPrincipals(Permission permission) + +
+          Returns all Principal objects assigned a given Permission in the access + control list.
+ AclEntrygetEntry(Principal principal) + +
+          Returns an AclEntry for a supplied Principal, or null if + the Principal does not have a matching AclEntry.
+ booleanisEmpty() + +
+          Returns true, if this Acl is empty.
+ booleanremoveEntry(AclEntry entry) + +
+          Removes an ACL entry from this ACL.
+ StringtoString() + +
+          Returns a string representation of the contents of this Acl.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+AclImpl

+
+public AclImpl()
+
+
Constructs a new AclImpl instance. +

+

+ + + + + + + + +
+Method Detail
+ +

+findPrincipals

+
+public Principal[] findPrincipals(Permission permission)
+
+
Returns all Principal objects assigned a given Permission in the access + control list. The Principals returned are those that have been granted + either the supplied permission, or a permission implied by the supplied + permission. Principals are not "expanded" if they are a role or group. +

+

+
Specified by:
findPrincipals in interface Acl
+
+
+
Parameters:
permission - the permission to search for +
Returns:
an array of Principals possessing the permission
+
+
+
+ +

+addEntry

+
+public boolean addEntry(AclEntry entry)
+
+
Adds an ACL entry to this ACL. An entry associates a principal (e.g., an + individual or a group) with a set of permissions. Each principal can have + at most one positive ACL entry, specifying permissions to be granted to + the principal. If there is already an ACL entry already in the ACL, false + is returned. +

+

+
Specified by:
addEntry in interface Acl
+
+
+
Parameters:
entry - - the ACL entry to be added to this ACL +
Returns:
true on success, false if an entry of the same type (positive or + negative) for the same principal is already present in this ACL
+
+
+
+ +

+removeEntry

+
+public boolean removeEntry(AclEntry entry)
+
+
Removes an ACL entry from this ACL. +

+

+
Specified by:
removeEntry in interface Acl
+
+
+
Parameters:
entry - the ACL entry to be removed from this ACL +
Returns:
true on success, false if the entry is not part of this ACL
+
+
+
+ +

+entries

+
+public Enumeration<AclEntry> entries()
+
+
Returns an enumeration of the entries in this ACL. Each element in the + enumeration is of type AclEntry. +

+

+
Specified by:
entries in interface Acl
+
+
+ +
Returns:
an enumeration of the entries in this ACL.
+
+
+
+ +

+getEntry

+
+public AclEntry getEntry(Principal principal)
+
+
Returns an AclEntry for a supplied Principal, or null if + the Principal does not have a matching AclEntry. +

+

+
Specified by:
getEntry in interface Acl
+
+
+
Parameters:
principal - the principal to search for +
Returns:
the AclEntry associated with the principal, or null
+
+
+
+ +

+toString

+
+public String toString()
+
+
Returns a string representation of the contents of this Acl. +

+

+
Specified by:
toString in interface Acl
Overrides:
toString in class Object
+
+
+ +
Returns:
the string representation
+
+
+
+ +

+isEmpty

+
+public boolean isEmpty()
+
+
Returns true, if this Acl is empty. +

+

+
Specified by:
isEmpty in interface Acl
+
+
+ +
Returns:
the result
Since:
+
2.4.68
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+Copyright © {inceptionYear}-2014 The Apache Software Foundation. All rights reserved. + + http://git-wip-us.apache.org/repos/asf/jspwiki-site/blob/edae175e/content/apidocs/2.10.1/org/apache/wiki/auth/acl/AclImpl.png ---------------------------------------------------------------------- diff --git a/content/apidocs/2.10.1/org/apache/wiki/auth/acl/AclImpl.png b/content/apidocs/2.10.1/org/apache/wiki/auth/acl/AclImpl.png new file mode 100755 index 0000000..3315183 Binary files /dev/null and b/content/apidocs/2.10.1/org/apache/wiki/auth/acl/AclImpl.png differ http://git-wip-us.apache.org/repos/asf/jspwiki-site/blob/edae175e/content/apidocs/2.10.1/org/apache/wiki/auth/acl/AclManager.html ---------------------------------------------------------------------- diff --git a/content/apidocs/2.10.1/org/apache/wiki/auth/acl/AclManager.html b/content/apidocs/2.10.1/org/apache/wiki/auth/acl/AclManager.html new file mode 100755 index 0000000..d2ac624 --- /dev/null +++ b/content/apidocs/2.10.1/org/apache/wiki/auth/acl/AclManager.html @@ -0,0 +1,316 @@ + + + + + + + +AclManager (Apache JSPWiki Main War 2.10.1 API) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.apache.wiki.auth.acl +
+Interface AclManager

+
+
All Known Implementing Classes:
DefaultAclManager
+
+
+
+
public interface AclManager
+ + + + + +
+ +

+Specifies how to parse and return ACLs from wiki pages. +

+ +

+

+
Since:
+
2.3
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ AclgetPermissions(WikiPage page) + +
+          Returns the access control list for the page.
+ voidinitialize(WikiEngine engine, + Properties props) + +
+          Initializes the AclManager with a supplied wiki engine and properties.
+ AclparseAcl(WikiPage page, + String ruleLine) + +
+          A helper method for parsing textual AccessControlLists.
+ voidsetPermissions(WikiPage page, + Acl acl) + +
+          Sets the access control list for the page and persists it.
+  +

+ + + + + + + + +
+Method Detail
+ +

+initialize

+
+void initialize(WikiEngine engine,
+                Properties props)
+
+
Initializes the AclManager with a supplied wiki engine and properties. +

+

+
Parameters:
engine - the wiki engine
props - the initialization properties
+
+
+
+ +

+parseAcl

+
+Acl parseAcl(WikiPage page,
+             String ruleLine)
+             throws WikiSecurityException
+
+
A helper method for parsing textual AccessControlLists. The line is in + form "(ALLOW) , , ". This + method was moved from Authorizer. +

+

+
Parameters:
page - The current wiki page. If the page already has an ACL, it + will be used as a basis for this ACL in order to avoid the + creation of a new one.
ruleLine - The rule line, as described above. +
Returns:
A valid Access Control List. May be empty. +
Throws: +
WikiSecurityException - if the ruleLine was faulty somehow.
Since:
+
2.1.121
+
+
+
+
+ +

+getPermissions

+
+Acl getPermissions(WikiPage page)
+
+
Returns the access control list for the page. + If the ACL has not been parsed yet, it is done + on-the-fly. If the page has a parent page, then that is tried also. + This method was moved from Authorizer; + it was consolidated with some code from AuthorizationManager. +

+

+
Parameters:
page - the wiki page +
Returns:
the Acl representing permissions for the page
Since:
+
2.2.121
+
+
+
+
+ +

+setPermissions

+
+void setPermissions(WikiPage page,
+                    Acl acl)
+                    throws WikiSecurityException
+
+
Sets the access control list for the page and persists it. +

+

+
Parameters:
page - the wiki page
acl - the access control list +
Throws: +
WikiSecurityException - if the ACL cannot be set or persisted
Since:
+
2.5
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+Copyright © {inceptionYear}-2014 The Apache Software Foundation. All rights reserved. + + http://git-wip-us.apache.org/repos/asf/jspwiki-site/blob/edae175e/content/apidocs/2.10.1/org/apache/wiki/auth/acl/AclManager.png ---------------------------------------------------------------------- diff --git a/content/apidocs/2.10.1/org/apache/wiki/auth/acl/AclManager.png b/content/apidocs/2.10.1/org/apache/wiki/auth/acl/AclManager.png new file mode 100755 index 0000000..73b9242 Binary files /dev/null and b/content/apidocs/2.10.1/org/apache/wiki/auth/acl/AclManager.png differ http://git-wip-us.apache.org/repos/asf/jspwiki-site/blob/edae175e/content/apidocs/2.10.1/org/apache/wiki/auth/acl/DefaultAclManager.html ---------------------------------------------------------------------- diff --git a/content/apidocs/2.10.1/org/apache/wiki/auth/acl/DefaultAclManager.html b/content/apidocs/2.10.1/org/apache/wiki/auth/acl/DefaultAclManager.html new file mode 100755 index 0000000..7472db8 --- /dev/null +++ b/content/apidocs/2.10.1/org/apache/wiki/auth/acl/DefaultAclManager.html @@ -0,0 +1,449 @@ + + + + + + + +DefaultAclManager (Apache JSPWiki Main War 2.10.1 API) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.apache.wiki.auth.acl +
+Class DefaultAclManager

+
+java.lang.Object
+  extended by org.apache.wiki.auth.acl.DefaultAclManager
+
+
+
All Implemented Interfaces:
AclManager
+
+
+
+
public class DefaultAclManager
extends Object
implements AclManager
+ + + + + +
+ +

+Default implementation that parses Acls from wiki page markup. +

+ +

+

+
Since:
+
2.3
+
+
+ +

+ + + + + + + + + + + +
+Field Summary
+static PatternACL_PATTERN + +
+          Identifies ACL strings in wiki text; the first group is the action (view, edit) and + the second is the list of Principals separated by commas.
+  + + + + + + + + + + +
+Constructor Summary
DefaultAclManager() + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ AclgetPermissions(WikiPage page) + +
+          Returns the access control list for the page.
+ voidinitialize(WikiEngine engine, + Properties props) + +
+          Initializes the AclManager with a supplied wiki engine and properties.
+ AclparseAcl(WikiPage page, + String ruleLine) + +
+          A helper method for parsing textual AccessControlLists.
+protected static StringprintAcl(Acl acl) + +
+          Generates an ACL string for inclusion in a wiki page, based on a supplied Acl object.
+ voidsetPermissions(WikiPage page, + Acl acl) + +
+          Sets the access control list for the page and persists it by prepending + it to the wiki page markup and saving the page.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+ACL_PATTERN

+
+public static final Pattern ACL_PATTERN
+
+
Identifies ACL strings in wiki text; the first group is the action (view, edit) and + the second is the list of Principals separated by commas. The overall match is + the ACL string from [{ to }]. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+DefaultAclManager

+
+public DefaultAclManager()
+
+
+ + + + + + + + +
+Method Detail
+ +

+initialize

+
+public void initialize(WikiEngine engine,
+                       Properties props)
+
+
Initializes the AclManager with a supplied wiki engine and properties. +

+

+
Specified by:
initialize in interface AclManager
+
+
+
Parameters:
engine - the wiki engine
props - the initialization properties
See Also:
AclManager.initialize(org.apache.wiki.WikiEngine, + java.util.Properties)
+
+
+
+ +

+parseAcl

+
+public Acl parseAcl(WikiPage page,
+                    String ruleLine)
+             throws WikiSecurityException
+
+
A helper method for parsing textual AccessControlLists. The line is in + form "ALLOW , , ". This + method was moved from Authorizer. +

+

+
Specified by:
parseAcl in interface AclManager
+
+
+
Parameters:
page - The current wiki page. If the page already has an ACL, it + will be used as a basis for this ACL in order to avoid the + creation of a new one.
ruleLine - The rule line, as described above. +
Returns:
A valid Access Control List. May be empty. +
Throws: +
WikiSecurityException - if the ruleLine was faulty somehow.
Since:
+
2.1.121
+
+
+
+
+ +

+getPermissions

+
+public Acl getPermissions(WikiPage page)
+
+
Returns the access control list for the page. + If the ACL has not been parsed yet, it is done + on-the-fly. If the page has a parent page, then that is tried also. + This method was moved from Authorizer; + it was consolidated with some code from AuthorizationManager. + This method is guaranteed to return a non-null Acl. +

+

+
Specified by:
getPermissions in interface AclManager
+
+
+
Parameters:
page - the page +
Returns:
the Acl representing permissions for the page
Since:
+
2.2.121
+
+
+
+
+ +

+setPermissions

+
+public void setPermissions(WikiPage page,
+                           Acl acl)
+                    throws WikiSecurityException
+
+
Sets the access control list for the page and persists it by prepending + it to the wiki page markup and saving the page. When this method is + called, all other ACL markup in the page is removed. This method will forcibly + expire locks on the wiki page if they exist. Any ProviderExceptions will be + re-thrown as WikiSecurityExceptions. +

+

+
Specified by:
setPermissions in interface AclManager
+
+
+
Parameters:
page - the wiki page
acl - the access control list +
Throws: +
WikiSecurityException - of the Acl cannot be set
Since:
+
2.5
+
+
+
+
+ +

+printAcl

+
+protected static String printAcl(Acl acl)
+
+
Generates an ACL string for inclusion in a wiki page, based on a supplied Acl object. + All of the permissions in this Acl are assumed to apply to the same page scope. + The names of the pages are ignored; only the actions and principals matter. +

+

+
+
+
+
Parameters:
acl - the ACL +
Returns:
the ACL string
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+Copyright © {inceptionYear}-2014 The Apache Software Foundation. All rights reserved. + + http://git-wip-us.apache.org/repos/asf/jspwiki-site/blob/edae175e/content/apidocs/2.10.1/org/apache/wiki/auth/acl/DefaultAclManager.png ---------------------------------------------------------------------- diff --git a/content/apidocs/2.10.1/org/apache/wiki/auth/acl/DefaultAclManager.png b/content/apidocs/2.10.1/org/apache/wiki/auth/acl/DefaultAclManager.png new file mode 100755 index 0000000..c0faeef Binary files /dev/null and b/content/apidocs/2.10.1/org/apache/wiki/auth/acl/DefaultAclManager.png differ