com.trackstudio.securedkernel
Class SecuredAclAdapterManager

java.lang.Object
  extended by com.trackstudio.securedkernel.SecuredAclAdapterManager

public class SecuredAclAdapterManager
extends java.lang.Object

This manager is used for creating and deleting of access control list rules


Constructor Summary
SecuredAclAdapterManager()
           
 
Method Summary
 java.lang.String createAcl(SessionContext sc, java.lang.String taskId, java.lang.String toUserId, java.lang.String userId, java.lang.String groupId)
          Create a new acl rule for task, user or group.
 void deleteAcl(SessionContext sc, java.lang.String aclId)
          Delete acl rule
 java.util.ArrayList getAclList(SessionContext sc, java.lang.String taskId)
          Get access control list for the task
 java.util.ArrayList getAllowedGroups(SessionContext sc, java.lang.String taskId)
          Get grups whose members can access to specified task
 java.util.ArrayList getAllowedPrstatusList(SessionContext sc, java.lang.String taskId, java.lang.String userId)
          Для заданного пользователя и статуса, начиная с заданной задачи и вверх достаем наборы ACL, привязанные к задаче (assigned ACL) через этого пользователя, т.е.
 java.util.ArrayList getAssignedUserList(SessionContext sc, java.lang.String userId)
          Get users assigned for the specified user
 java.util.ArrayList getEffectiveStatuses(SessionContext sc, java.lang.String taskId, java.lang.String forUser)
           
 java.util.ArrayList getGroupAclList(SessionContext sc, java.lang.String prstatusId)
          Get acl rules for the specified user group
 java.util.ArrayList getHandlerForFilter(SessionContext sc, java.lang.String taskId)
          Get possible handlers for filter
 java.util.ArrayList getHandlerStatusesForFilter(SessionContext sc, java.lang.String taskId)
          Get possible user groups for task filter
 java.util.ArrayList getTaskList(SessionContext sc, java.lang.String userId)
          Get allowed tasks for user
 java.util.ArrayList getUserAclList(SessionContext sc, java.lang.String userId)
          Get access control list for the user
 java.util.ArrayList getUserAllowedPrstatusList(SessionContext sc, java.lang.String toUserId, java.lang.String userId)
          Get list of user groups for whom an access for specified user is allowed by acl.
 java.util.ArrayList getUserEffectiveStatuses(SessionContext sc, java.lang.String toUserId, java.lang.String forUserId)
          Возвращает effective statuses
 java.util.ArrayList getUserEffectiveStatusesList(SessionContext sc, java.lang.String userId)
          Get list of effective statuses for user
 java.util.ArrayList getUserList(SessionContext sc, java.lang.String taskId)
          Get allowed users for task
 void pasteAcls(SessionContext sc, java.lang.String taskId, java.lang.String[] aclIds, java.lang.String operation)
          Paste acl rules into task
 void updateAcl(SessionContext sc, java.lang.String aclId, java.lang.String prstatusId, boolean override)
          Update acl rule
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecuredAclAdapterManager

public SecuredAclAdapterManager()
Method Detail

getAclList

public java.util.ArrayList getAclList(SessionContext sc,
                                      java.lang.String taskId)
                               throws GranException
Get access control list for the task

Parameters:
sc - session context
taskId - task's id
Returns:
list of SecuredAclBean
Throws:
GranException

getUserAclList

public java.util.ArrayList getUserAclList(SessionContext sc,
                                          java.lang.String userId)
                                   throws GranException
Get access control list for the user

Parameters:
sc - session context
userId - user's id
Returns:
list of SecuredAclBean
Throws:
GranException

deleteAcl

public void deleteAcl(SessionContext sc,
                      java.lang.String aclId)
               throws GranException
Delete acl rule

Parameters:
sc - session context
aclId - acl's id
Throws:
GranException

createAcl

public java.lang.String createAcl(SessionContext sc,
                                  java.lang.String taskId,
                                  java.lang.String toUserId,
                                  java.lang.String userId,
                                  java.lang.String groupId)
                           throws GranException
Create a new acl rule for task, user or group.

Parameters:
sc - session context
taskId - task's id for which acl rule will be created.
toUserId - user's id. For this user acl rule will act.
userId - user's id for which acl rule will be created.
groupId - group's id for which acl rule will be created.
Returns:
acl's id
Throws:
GranException

updateAcl

public void updateAcl(SessionContext sc,
                      java.lang.String aclId,
                      java.lang.String prstatusId,
                      boolean override)
               throws GranException
Update acl rule

Parameters:
sc - session context
aclId - acl's id
prstatusId - id of a new user status
override - new override value. If true, properties of parent acl rule will be overridden
Throws:
GranException

getAllowedPrstatusList

public java.util.ArrayList getAllowedPrstatusList(SessionContext sc,
                                                  java.lang.String taskId,
                                                  java.lang.String userId)
                                           throws GranException
Для заданного пользователя и статуса, начиная с заданной задачи и вверх достаем наборы ACL, привязанные к задаче (assigned ACL) через этого пользователя, т.е. не через prstatus. Из этих ACL достаем prstatusы, добавляем к ним собственный статус пользователя.

Parameters:
sc - session context
taskId - task's id
userId - user's id
Returns:
array of Prstatus
Throws:
GranException
See Also:
Prstatus

getEffectiveStatuses

public java.util.ArrayList getEffectiveStatuses(SessionContext sc,
                                                java.lang.String taskId,
                                                java.lang.String forUser)
                                         throws GranException
Throws:
GranException

getUserAllowedPrstatusList

public java.util.ArrayList getUserAllowedPrstatusList(SessionContext sc,
                                                      java.lang.String toUserId,
                                                      java.lang.String userId)
                                               throws GranException
Get list of user groups for whom an access for specified user is allowed by acl.

Parameters:
sc - session context
toUserId - user's id for whom access should be allowed
userId - user's id
Returns:
array of Prstatus
Throws:
GranException
See Also:
Prstatus

getUserEffectiveStatuses

public java.util.ArrayList getUserEffectiveStatuses(SessionContext sc,
                                                    java.lang.String toUserId,
                                                    java.lang.String forUserId)
                                             throws GranException
Возвращает effective statuses

Parameters:
sc -
toUserId - к какому пользователю (текущий пользователь)
forUserId - с т.з. какого пользователя
Returns:
Throws:
GranException

getHandlerForFilter

public java.util.ArrayList getHandlerForFilter(SessionContext sc,
                                               java.lang.String taskId)
                                        throws GranException
Get possible handlers for filter

Parameters:
sc -
Returns:
array of user's ids
Throws:
GranException

getHandlerStatusesForFilter

public java.util.ArrayList getHandlerStatusesForFilter(SessionContext sc,
                                                       java.lang.String taskId)
                                                throws GranException
Get possible user groups for task filter

Parameters:
sc - session context
Returns:
map where key is Prstatus id and value is Prstatus name
Throws:
GranException

getUserEffectiveStatusesList

public java.util.ArrayList getUserEffectiveStatusesList(SessionContext sc,
                                                        java.lang.String userId)
                                                 throws GranException
Get list of effective statuses for user

Parameters:
sc - session context
userId - user's id
Returns:
list of SecuredUserBean
Throws:
GranException

getUserList

public java.util.ArrayList getUserList(SessionContext sc,
                                       java.lang.String taskId)
                                throws GranException
Get allowed users for task

Parameters:
sc - session context
taskId - task's id
Returns:
array of SecuredUserBean
Throws:
GranException
See Also:
SecuredUserBean

getTaskList

public java.util.ArrayList getTaskList(SessionContext sc,
                                       java.lang.String userId)
                                throws GranException
Get allowed tasks for user

Parameters:
sc - session context
userId - user's id
Returns:
array of TaskCacheItem
Throws:
GranException
See Also:
TaskCacheItem

getAssignedUserList

public java.util.ArrayList getAssignedUserList(SessionContext sc,
                                               java.lang.String userId)
                                        throws GranException
Get users assigned for the specified user

Parameters:
sc - session context
userId - user's id
Returns:
array of SecuredUserBean
Throws:
GranException
See Also:
SecuredUserBean

getGroupAclList

public java.util.ArrayList getGroupAclList(SessionContext sc,
                                           java.lang.String prstatusId)
                                    throws GranException
Get acl rules for the specified user group

Parameters:
sc -
prstatusId - id of user grup
Returns:
array of SecuredAclBean
Throws:
GranException
See Also:
SecuredAclBean

pasteAcls

public void pasteAcls(SessionContext sc,
                      java.lang.String taskId,
                      java.lang.String[] aclIds,
                      java.lang.String operation)
               throws GranException
Paste acl rules into task

Parameters:
sc - session context
taskId - task's id
aclIds - array of acl ids
operation - if equals to "CUT", acl rules will be deleted from the source task
Throws:
GranException

getAllowedGroups

public java.util.ArrayList getAllowedGroups(SessionContext sc,
                                            java.lang.String taskId)
                                     throws GranException
Get grups whose members can access to specified task

Parameters:
sc - session context
taskId - task's id
Returns:
array of group ids
Throws:
GranException


Copyright © 2002-2008 TrackStudio, Ltd. All Rights Reserved.