com.day.cq.security.impl.path
Class AuthorizablePathFactoryImpl

java.lang.Object
  extended by com.day.cq.security.impl.path.AuthorizablePathFactoryImpl
All Implemented Interfaces:
AuthorizablePathFactory

public class AuthorizablePathFactoryImpl
extends Object
implements AuthorizablePathFactory

Create Pathes for authorizables Path will be of format //[users|group]//

See Also:
AuthorizablePathFactory

Constructor Summary
AuthorizablePathFactoryImpl(String root)
           
 
Method Summary
 AuthorizablePath createPath(Authorizable authorizable)
          Create a Path for the given Authorizable
 String getRoot()
           
 Iterator<AuthorizablePath> listChildren(String path, UserManager userManager)
          Lists all children of the given path.
 AuthorizablePath valueOf(String path)
          Creates a Path Object based on the path as String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthorizablePathFactoryImpl

public AuthorizablePathFactoryImpl(String root)
Method Detail

createPath

public AuthorizablePath createPath(Authorizable authorizable)
                            throws PathNotFoundException
Description copied from interface: AuthorizablePathFactory
Create a Path for the given Authorizable

Specified by:
createPath in interface AuthorizablePathFactory
Parameters:
authorizable - to create path for
Returns:
path
Throws:
PathNotFoundException - in case if is impossible to crate a path for the given authorizable

getRoot

public String getRoot()
Specified by:
getRoot in interface AuthorizablePathFactory
Returns:
absolute path the factory uses as root

valueOf

public AuthorizablePath valueOf(String path)
                         throws PathNotFoundException
Description copied from interface: AuthorizablePathFactory
Creates a Path Object based on the path as String

Specified by:
valueOf in interface AuthorizablePathFactory
Parameters:
path - to created
Returns:
Path created
Throws:
PathNotFoundException - in case the String is not a valid path

listChildren

public Iterator<AuthorizablePath> listChildren(String path,
                                               UserManager userManager)
                                        throws PathNotFoundException
Description copied from interface: AuthorizablePathFactory
Lists all children of the given path.

Specified by:
listChildren in interface AuthorizablePathFactory
Parameters:
path - to list children of
userManager - to resolve the children a session is allowed to read
Returns:
Abspath of the visibile childre
Throws:
PathNotFoundException - in case the given root path is not a valid path.


Copyright © 2008 Day Management AG. All Rights Reserved.