Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.slide.common
Class NamespaceConfig

    java.lang.Object
      org.apache.slide.common.NamespaceConfig

public final class NamespaceConfig
extends java.lang.Object

Configuration of the Namespace.

Version:
  $Revision: 1.36 $

Field Summary
`static int` | `ACL_INHERIT_TYPE_FULL`
`static int` | `ACL_INHERIT_TYPE_NONE`
`static int` | `ACL_INHERIT_TYPE_PATH`
`static int` | `ACL_INHERIT_TYPE_ROOT`
`static java.lang.String` | `ACTION_ROLE`
`protected java.lang.String` | `actionsPath` File path.
`protected boolean` | `autoCreateUsers` Automatically create users.
`protected java.lang.String` | `autoCreateUsersRole` Roles implementation to be used for automatically created users.
`static java.lang.String` | `BASE_ROLE`
`protected ActionNode` | `bindMemberAction` Bind/unbind actions
`protected ContentInterceptor[]` | `contentInterceptors` Content interceptors.
`protected ActionNode` | `createObjectAction` Create object action.
`protected ActionNode` | `createRevisionContentAction` Create revision content action.
`protected ActionNode` | `createRevisionMetadataAction` Create revision metadata action.
`protected java.util.Hashtable` | `defaultProperties` List of default properties.
`protected static java.util.Vector` | `emptyVector` Empty vector.
`protected java.lang.String` | `filesPath` File path.
`protected ActionNode` | `grantPermissionAction` Grant permission action.
`protected java.lang.String` | `groupsPath`
`protected java.lang.String` | `guestPath` Guest user path.
`protected ActionNode` | `killLockAction` Kill lock action.
`static java.lang.String` | `LINK_ROLE`
`protected ActionNode` | `lockObjectAction` Lock object action.
`protected ActionNode` | `modifyRevisionContentAction` Modify revision content action.
`protected ActionNode` | `modifyRevisionMetadataAction` Modify revision metadata action.
`protected java.lang.String` | `name` Namespace name.
`static java.lang.String` | `NOBODY` Base role names.
`static java.lang.String` | `NOBODY_ROLE`
`protected java.util.Hashtable` | `parameters` Additional parameters.
`protected ActionNode` | `readLocksAction` Read locks action.
`protected ActionNode` | `readObjectAction` Read object action.
`protected ActionNode` | `readOwnPermissionsAction`
`protected ActionNode` | `readPermissionsAction` Read permissions action.
`protected ActionNode` | `readRevisionContentAction` Read revision content action.
`protected ActionNode` | `readRevisionMetadataAction` Read revision metadata action.
`protected ActionNode` | `removeObjectAction` Remove object action.
`protected ActionNode` | `removeRevisionContentAction` Remove revision content action.
`protected ActionNode` | `removeRevisionMetadataAction` Remove revision metadata action.
`protected ActionNode` | `revokePermissionAction` Revoke permission action.
`protected java.util.Hashtable` | `roleClassMappings` Role interface -> role name mappings.
`protected java.util.Hashtable` | `roleMappings` Role name -> role interface mappings.
`protected java.lang.String` | `rolesPath`
`protected ActionNode` | `unbindMemberAction`
`protected java.lang.String` | `usersPath` Users path.

Constructor Summary
`NamespaceConfig()`

Method Summary
`protected void` | `addDefaultProperty(java.lang.String role, java.lang.String name, java.lang.String value, java.lang.String namespace)` Add a new default property.
`protected void` | `addParameter(java.lang.String name, java.lang.String value)` Add a new parameter.
`protected void` | `addRoleMapping(java.lang.String name, java.lang.String value)` Add a new role mapping.
`int` | `getAclInheritanceType()`
`protected ActionNode` | `getActionNode(Namespace namespace, java.lang.String actionPath)` Retrieve an action node.
`java.lang.String` | `getActionsPath()` Actions path accessor.
`java.lang.String` | `getAutoCreateUsersRole()` Get the class name of the role which will be used to create nodes which are automatically created when isAutoCreateUsers() returns true.
`ActionNode` | `getBindMemberAction()` Method getBindAction
`(package private) ContentInterceptor[]` | `getContentInterceptors()` Get content interceptors.
`ActionNode` | `getCreateObjectAction()` Create object action accessor.
`ActionNode` | `getCreateRevisionContentAction()` Create revision content accessor.
`ActionNode` | `getCreateRevisionMetadataAction()` Create revision metadata accessor.
`ActionNode` | `getDefaultAction()` Default action accessor.
`java.util.Enumeration` | `getDefaultProperties(java.lang.String role)` Get default properties for a given role.
`java.lang.String` | `getFilesPath()` Files path accessor.
`ActionNode` | `getGrantPermissionAction()` Grant permission accessor.
`java.lang.String` | `getGroupsPath()` Groups path accessor.
`java.lang.String` | `getGuestPath()` Deprecated. There is now a generic SubjectNode for "guest"
`ActionNode` | `getKillLockAction()` Kill lock accessor.
`ActionNode` | `getLockObjectAction()` Lock object accessor.
`ActionNode` | `getModifyRevisionContentAction()` Modify revision content accessor.
`ActionNode` | `getModifyRevisionMetadataAction()` Modify revision metadata accessor.
`int` | `getNestedRolesMaxDepth()`
`java.lang.String` | `getParameter(java.lang.String name)` Get parameter value.
`ActionNode` | `getReadLocksAction()` Read locks accessor.
`ActionNode` | `getReadObjectAction()` Read object action accessor.
`ActionNode` | `getReadOwnPermissionsAction()`
`ActionNode` | `getReadPermissionsAction()` Read permissions accessor.
`ActionNode` | `getReadRevisionContentAction()` Read revision content accessor.
`ActionNode` | `getReadRevisionMetadataAction()` Read revision metadata accessor.
`ActionNode` | `getRemoveObjectAction()` Remove object accessor.
`ActionNode` | `getRemoveRevisionContentAction()` Remove revision content accessor.
`ActionNode` | `getRemoveRevisionMetadataAction()` Remove revision metadata accessor.
`ActionNode` | `getRevokePermissionAction()` Revoke permission accessor.
`java.lang.String` | `getRoleMapping(java.lang.String name)` Get role mapping.
`java.lang.String` | `getRolesPath()` Roles path accessor.
`ActionNode` | `getUnbindMemberAction()`
`java.lang.String` | `getUsersPath()` Users path accessor.
`(package private) void` | `initializeAsDummyConfig(Namespace namespace)` Create a dummy config, used to create the base namespace data.
`void` | `initializeForTestPurposesOnly()` TEST PURPOSES ONLY.
`(package private) void` | `initializeNamespaceConfig(Namespace namespace, Configuration config)` Initialize the Namespace configuration using the given Configuration object.
`(package private) void` | `initializeNamespaceParameters(Namespace namespace, Configuration config)` Initialize the Namespace configuration using the given Configuration object.
`boolean` | `isAutoCreateUsers()` Is automcatic user creation active ?
`boolean` | `isGroup(java.lang.String uri)`
`boolean` | `isPrincipal(java.lang.String uri)`
`boolean` | `isRole(java.lang.String uri)`
`java.lang.String` | `toString()` Get a String representation of this domain.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### NOBODY

    public static final java.lang.String NOBODY

  Base role names.

  See Also:
    Constant Field Values

### NOBODY_ROLE

    public static final java.lang.String NOBODY_ROLE

### BASE_ROLE

    public static final java.lang.String BASE_ROLE

### ACTION_ROLE

    public static final java.lang.String ACTION_ROLE

### LINK_ROLE

    public static final java.lang.String LINK_ROLE

### ACL_INHERIT_TYPE_NONE

    public static final int ACL_INHERIT_TYPE_NONE

See Also:
  Constant Field Values

### ACL_INHERIT_TYPE_ROOT

    public static final int ACL_INHERIT_TYPE_ROOT

See Also:
  Constant Field Values

### ACL_INHERIT_TYPE_PATH

    public static final int ACL_INHERIT_TYPE_PATH

See Also:
  Constant Field Values

### ACL_INHERIT_TYPE_FULL

    public static final int ACL_INHERIT_TYPE_FULL

See Also:
  Constant Field Values

### name

    protected java.lang.String name

  Namespace name.

### readObjectAction

    protected ActionNode readObjectAction

  Read object action.

### createObjectAction

    protected ActionNode createObjectAction

  Create object action. Equivalent to createChildAction.

### removeObjectAction

    protected ActionNode removeObjectAction

  Remove object action.

### grantPermissionAction

    protected ActionNode grantPermissionAction

  Grant permission action.

### revokePermissionAction

    protected ActionNode revokePermissionAction

  Revoke permission action.

### readPermissionsAction

    protected ActionNode readPermissionsAction

  Read permissions action.

### readOwnPermissionsAction

    protected ActionNode readOwnPermissionsAction

### lockObjectAction

    protected ActionNode lockObjectAction

  Lock object action.

### killLockAction

    protected ActionNode killLockAction

  Kill lock action.

### readLocksAction

    protected ActionNode readLocksAction

  Read locks action.

### createRevisionMetadataAction

    protected ActionNode createRevisionMetadataAction

  Create revision metadata action.

### modifyRevisionMetadataAction

    protected ActionNode modifyRevisionMetadataAction

  Modify revision metadata action.

### removeRevisionMetadataAction

    protected ActionNode removeRevisionMetadataAction

  Remove revision metadata action.

### readRevisionMetadataAction

    protected ActionNode readRevisionMetadataAction

  Read revision metadata action.

### readRevisionContentAction

    protected ActionNode readRevisionContentAction

  Read revision content action.

### createRevisionContentAction

    protected ActionNode createRevisionContentAction

  Create revision content action.

### modifyRevisionContentAction

    protected ActionNode modifyRevisionContentAction

  Modify revision content action.

### removeRevisionContentAction

    protected ActionNode removeRevisionContentAction

  Remove revision content action.

### bindMemberAction

    protected ActionNode bindMemberAction

  Bind/unbind actions

### unbindMemberAction

    protected ActionNode unbindMemberAction

### usersPath

    protected java.lang.String usersPath

  Users path.

### groupsPath

    protected java.lang.String groupsPath

### rolesPath

    protected java.lang.String rolesPath

### guestPath

    protected java.lang.String guestPath

  Guest user path.

### filesPath

    protected java.lang.String filesPath

  File path.

### actionsPath

    protected java.lang.String actionsPath

  File path.

### parameters

    protected java.util.Hashtable parameters

  Additional parameters.

### roleMappings

    protected java.util.Hashtable roleMappings

  Role name -> role interface mappings. Note : One name is associated to only one interface.

### roleClassMappings

    protected java.util.Hashtable roleClassMappings

  Role interface -> role name mappings. Note : One interface can be associated to multiple names, in which case only one is stored here.

### defaultProperties

    protected java.util.Hashtable defaultProperties

  List of default properties. Role name -> Vector[NodeProperty].

### emptyVector

    protected static java.util.Vector emptyVector

  Empty vector. Don't add stuff there.

### contentInterceptors

    protected ContentInterceptor[] contentInterceptors

  Content interceptors.

### autoCreateUsers

    protected boolean autoCreateUsers

  Automatically create users.

### autoCreateUsersRole

    protected java.lang.String autoCreateUsersRole

  Roles implementation to be used for automatically created users.

Constructor Detail

### NamespaceConfig

    public NamespaceConfig()

Method Detail

### getDefaultAction

    public ActionNode getDefaultAction()

  Default action accessor.

  Returns:
    ActionNode Default action

### getReadObjectAction

    public ActionNode getReadObjectAction()

  Read object action accessor.

  Returns:
    ActionNode Read object action

### getCreateObjectAction

    public ActionNode getCreateObjectAction()

  Create object action accessor.

  Returns:
    ActionNode Create object action

### getRemoveObjectAction

    public ActionNode getRemoveObjectAction()

  Remove object accessor.

  Returns:
    ActionNode Remove object action

### getGrantPermissionAction

    public ActionNode getGrantPermissionAction()

  Grant permission accessor.

  Returns:
    ActionNode Grant permission action

### getRevokePermissionAction

    public ActionNode getRevokePermissionAction()

  Revoke permission accessor.

  Returns:
    ActionNode Revoke permission action

### getReadPermissionsAction

    public ActionNode getReadPermissionsAction()

  Read permissions accessor.

  Returns:
    ActionNode Read permissions action

### getReadOwnPermissionsAction

    public ActionNode getReadOwnPermissionsAction()

### getLockObjectAction

    public ActionNode getLockObjectAction()

  Lock object accessor.

  Returns:
    ActionNode Lock object action

### getKillLockAction

    public ActionNode getKillLockAction()

  Kill lock accessor.

  Returns:
    ActionNode Kill lock action

### getReadLocksAction

    public ActionNode getReadLocksAction()

  Read locks accessor.

  Returns:
    ActionNode Read locks action

### getCreateRevisionMetadataAction

    public ActionNode getCreateRevisionMetadataAction()

  Create revision metadata accessor.

  Returns:
    ActionNode Create revision metadata action

### getReadRevisionMetadataAction

    public ActionNode getReadRevisionMetadataAction()

  Read revision metadata accessor.

  Returns:
    ActionNode Read revision metadata action

### getModifyRevisionMetadataAction

    public ActionNode getModifyRevisionMetadataAction()

  Modify revision metadata accessor.

  Returns:
    ActionNode Modify revision metadata action

### getRemoveRevisionMetadataAction

    public ActionNode getRemoveRevisionMetadataAction()

  Remove revision metadata accessor.

  Returns:
    ActionNode Remove revision metadata action

### getReadRevisionContentAction

    public ActionNode getReadRevisionContentAction()

  Read revision content accessor.

  Returns:
    ActionNode Read revision content action

### getCreateRevisionContentAction

    public ActionNode getCreateRevisionContentAction()

  Create revision content accessor.

  Returns:
    ActionNode Create revision content action

### getModifyRevisionContentAction

    public ActionNode getModifyRevisionContentAction()

  Modify revision content accessor.

  Returns:
    ActionNode Modify revision content action

### getRemoveRevisionContentAction

    public ActionNode getRemoveRevisionContentAction()

  Remove revision content accessor.

  Returns:
    ActionNode Remove revision content action

### getBindMemberAction

    public ActionNode getBindMemberAction()

  Method getBindAction

  Returns:
    an ActionNode

### getUnbindMemberAction

    public ActionNode getUnbindMemberAction()

### getUsersPath

    public java.lang.String getUsersPath()

  Users path accessor.

  Returns:
    String Users path

### getGroupsPath

    public java.lang.String getGroupsPath()

  Groups path accessor.

  Returns:
    String Groups path

### getRolesPath

    public java.lang.String getRolesPath()

  Roles path accessor.

  Returns:
    String Roles path

### getGuestPath

    public java.lang.String getGuestPath()

  Deprecated. There is now a generic SubjectNode for "guest"

  Guest path accessor.

  Returns:
    String Guest path

### getFilesPath

    public java.lang.String getFilesPath()

  Files path accessor.

  Returns:
    String Files path

### getActionsPath

    public java.lang.String getActionsPath()

  Actions path accessor.

  Returns:
    String Action path

### getDefaultProperties

    public java.util.Enumeration getDefaultProperties(java.lang.String role)

  Get default properties for a given role.

  Returns:
    Enumeration of properties

### getContentInterceptors

    ContentInterceptor[] getContentInterceptors()

  Get content interceptors.

### getParameter

    public java.lang.String getParameter(java.lang.String name)

  Get parameter value.

  Parameters:
    `name` - Parameter name
  Returns:
    String Parameter value

### getRoleMapping

    public java.lang.String getRoleMapping(java.lang.String name)

  Get role mapping. If the interface name is given, one of the names is returned. If the name is given, the interface name is returned.

  Parameters:
    `name` - Role name (or interface name)
  Returns:
    String Role interface name (or name)

### isAutoCreateUsers

    public boolean isAutoCreateUsers()

  Is automcatic user creation active ?

### isPrincipal

    public boolean isPrincipal(java.lang.String uri)

### isRole

    public boolean isRole(java.lang.String uri)

### isGroup

    public boolean isGroup(java.lang.String uri)

### getAutoCreateUsersRole

    public java.lang.String getAutoCreateUsersRole()

  Get the class name of the role which will be used to create nodes which are automatically created when isAutoCreateUsers() returns true.

### getAclInheritanceType

    public int getAclInheritanceType()

### getNestedRolesMaxDepth

    public int getNestedRolesMaxDepth()

### initializeNamespaceConfig

    void initializeNamespaceConfig(Namespace namespace,
                                   Configuration config)
                             throws InvalidNamespaceConfigurationException,
                                    SlideException

  Initialize the Namespace configuration using the given Configuration object.

  Parameters:
    `namespace` - Namespace on which we are trying to load the config
    `config` - Castor Config object
  Throws:
    `InvalidNamespaceConfigurationException` - Namespace configuration is invalid
    `SlideException` - One of the action nodes doesn't exist

### initializeNamespaceParameters

    void initializeNamespaceParameters(Namespace namespace,
                                       Configuration config)
                                 throws InvalidNamespaceConfigurationException,
                                        SlideException

  Initialize the Namespace configuration using the given Configuration object.

  Parameters:
    `namespace` - Namespace on which we are trying to load the config
    `config` - Castor Config object
  Throws:
    `InvalidNamespaceConfigurationException` - Namespace configuration is invalid
    `SlideException` - One of the action nodes doesn't exist

### initializeAsDummyConfig

    void initializeAsDummyConfig(Namespace namespace)
                           throws InvalidNamespaceConfigurationException

  Create a dummy config, used to create the base namespace data.

  Parameters:
    `namespace` - Namespace
  Throws:
    `InvalidNamespaceConfigurationException` - Namespace configuration is invalid

### initializeForTestPurposesOnly

    public void initializeForTestPurposesOnly()
                                       throws InvalidNamespaceConfigurationException

  TEST PURPOSES ONLY.

  Throws:
    `InvalidNamespaceConfigurationException`

### addParameter

    protected void addParameter(java.lang.String name,
                                java.lang.String value)

  Add a new parameter.

  Parameters:
    `name` - Parameter name
    `value` - Parameter value

### addDefaultProperty

    protected void addDefaultProperty(java.lang.String role,
                                      java.lang.String name,
                                      java.lang.String value,
                                      java.lang.String namespace)

  Add a new default property.

  Parameters:
    `role` - Role
    `name` - Property name
    `value` - Property value
    `namespace` - Property namespace

### addRoleMapping

    protected void addRoleMapping(java.lang.String name,
                                  java.lang.String value)

  Add a new role mapping.

  Parameters:
    `name` - Role mapping name
    `value` - Role mapping value

### getActionNode

    protected ActionNode getActionNode(Namespace namespace,
                                       java.lang.String actionPath)
                                throws InvalidNamespaceConfigurationException,
                                       SlideException

  Retrieve an action node.

  Parameters:
    `namespace` - The namespace, that contains the action node
    `actionPath` - Path of the action
  Throws:
    `InvalidNamespaceConfigurationException`
    `SlideException`

### toString

    public java.lang.String toString()

  Get a String representation of this domain.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD