com.day.cq.security.impl.privileges
Class SimplePrivilegeFactory

java.lang.Object
  extended by com.day.cq.security.impl.privileges.SimplePrivilegeFactory
All Implemented Interfaces:
PrivilegeFactory

public class SimplePrivilegeFactory
extends Object
implements PrivilegeFactory

Default Factory creating Privileges for that are declared via a Repository Item and are not path dependant.

See Also:
PrivilegeFactory

Method Summary
 Privilege create(String privilegePath, Authorizable authorizable, PrivilegeStore store)
          The Factory creates an Privilege in any case.
 Collection<String> handles()
          Explicitly declare the Privileges this Factor is able to create Privileges for.
In case another Factory for one of the Privileges is already configured, registration of this Factory fails
 boolean handles(String privilegePath)
          Simple check to determine if the Factory will be able to create a Privilege for
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

handles

public Collection<String> handles()
Explicitly declare the Privileges this Factor is able to create Privileges for.
In case another Factory for one of the Privileges is already configured, registration of this Factory fails

Specified by:
handles in interface PrivilegeFactory
Returns:
collections of the Privilege-ID this factory registers for

handles

public boolean handles(String privilegePath)
Simple check to determine if the Factory will be able to create a Privilege for

Parameters:
privilegePath - to test
Returns:
true if there is a Repository Node at the given path

create

public Privilege create(String privilegePath,
                        Authorizable authorizable,
                        PrivilegeStore store)
The Factory creates an Privilege in any case.

Specified by:
create in interface PrivilegeFactory
Parameters:
privilegePath - of the Privilege to create. must be contained in the set it handles
authorizable - this privilege is created for
store - containing configuration for the authorizable/privilege pair
Returns:
Privilege created for the Authorizable


Copyright © 2008 Day Management AG. All Rights Reserved.