Class AttributeAssignBaseDelegate
java.lang.Object
edu.internet2.middleware.grouper.attr.assign.AttributeAssignBaseDelegate
- Direct Known Subclasses:
AttributeAssignAttrAssignDelegate
,AttributeAssignAttributeDefDelegate
,AttributeAssignEffMshipDelegate
,AttributeAssignGroupDelegate
,AttributeAssignMemberDelegate
,AttributeAssignMembershipDelegate
,AttributeAssignStemDelegate
delegate privilege calls from attribute defs
-
Field Summary
Modifier and TypeFieldDescriptionstatic long
cache hits for testingstatic long
cache misses for testing -
Method Summary
Modifier and TypeMethodDescriptionaddAttribute
(AttributeDefName attributeDefName) add a multi assignable attributeaddAttribute
(String action, AttributeDefName attributeDefName) add a multi assignable attributeaddAttributeById
(String attributeDefNameId) add a multi assignable attributeaddAttributeById
(String action, String attributeDefNameId) add a multi assignable attributeaddAttributeByName
(String attributeDefNameName) add a multi assignable attributeaddAttributeByName
(String action, String attributeDefNameName) add a multi assignable attributevoid
assertCanDelegateAttributeDefName
(String action, AttributeDefName attributeDefName) make sure the user can delegate the attributevoid
assertCanGrantAttributeDefName
(String action, AttributeDefName attributeDefName) make sure the user can grant delegation to the attributeabstract void
assertCanReadAttributeDef
(AttributeDef attributeDef) make sure the user can read the attribute (including looking at object if necessary)void
assertCanReadAttributeDefName
(AttributeDefName attributeDefName) make sure the user can read the attribute (including looking at object if necessary)abstract void
assertCanUpdateAttributeDefName
(AttributeDefName attributeDefName) make sure the user can update the attribute (including looking at object if necessary)void
assertScopeOk
(AttributeDef attributeDef) assignAttribute
(AttributeDefName attributeDefName) assignAttribute
(String action, AttributeDefName attributeDefName) assignAttribute
(String action, AttributeDefName attributeDefName, PermissionAllowed permissionAllowed) assignAttributeById
(String attributeDefNameId) assignAttributeById
(String action, String attributeDefNameId) assignAttributeByName
(String attributeDefNameName) assignAttributeByName
(String action, String attributeDefNameName) static void
clear the cache if we are assigning attributesdelegateAttribute
(AttributeDefName attributeDefName, boolean assign, AttributeAssignDelegateOptions attributeAssignDelegateOptions) delegateAttribute
(String action, AttributeDefName attributeDefName, boolean assign, AttributeAssignDelegateOptions attributeAssignDelegateOptions) delegateAttributeById
(String attributeDefNameId, boolean assign, AttributeAssignDelegateOptions attributeAssignDelegateOptions) delegateAttributeById
(String action, String attributeDefNameId, boolean assign, AttributeAssignDelegateOptions attributeAssignDelegateOptions) delegateAttributeByName
(String attributeDefNameName, boolean assign, AttributeAssignDelegateOptions attributeAssignDelegateOptions) delegateAttributeByName
(String action, String attributeDefNameName, boolean assign, AttributeAssignDelegateOptions attributeAssignDelegateOptions) protected Set<AttributeAssign>
return the cache of all attribute assigns, might be null if not cachingabstract AttributeAssignable
get the assignable objectfind the assignments of any name associated with an owner this is the javabean equivalent to retrieveAssignmentsgetAttributeOrAncestorAttribute
(String attributeFlagName, boolean checkSecurity) see if a group or parent or ancestor folder has an attribute.getAttributeOrAncestorAttribute
(String attributeFlagName, boolean checkSecurity, String uuidOfMetadataAttributeDefName0, String metadataValue0) see if a group or parent or ancestor folder has an attribute.getAttributeOrAncestorAttribute
(String attributeFlagName, boolean checkSecurity, String uuidOfMetadataAttributeDefName0, String metadataValue0, String uuidOfMetadataAttributeDefName1, String metadataValue1) see if a group or parent or ancestor folder has an attribute.boolean
hasAttribute
(AttributeDefName attributeDefName) boolean
hasAttribute
(String action, AttributeDefName attributeDefName) boolean
hasAttributeById
(String attributeDefNameId) boolean
hasAttributeById
(String action, String attributeDefNameId) boolean
hasAttributeByName
(String attributeDefNameName) see if the groupboolean
hasAttributeByName
(String action, String attributeDefNameName) see if the groupboolean
hasAttributeOrAncestorHasAttribute
(String attributeFlagName, boolean checkSecurity) see if a group or parent or ancestor folder has an attribute.internal_addAttributeHelper
(String action, AttributeDefName attributeDefName, boolean checkSecurity, String uuid) add a multi assignable attributeinternal_assignAttributeHelper
(String action, AttributeDefName attributeDefName, boolean checkSecurity, String uuid, PermissionAllowed permissionAllowed) removeAttribute
(AttributeDefName attributeDefName) removeAttribute
(String action, AttributeDefName attributeDefName) removeAttributeByAssignId
(String assignId) remove an attribute assign by idremoveAttributeByAssignId
(String assignId, boolean checkSecurity) removeAttributeById
(String attributeDefNameId) removeAttributeById
(String action, String attributeDefNameId) removeAttributeByName
(String attributeDefNameName) removeAttributeByName
(String action, String attributeDefNameName) retrieveAssignment
(String action, AttributeDefName attributeDefName, boolean checkSecurity, boolean exceptionIfNull) retrieve an assignment (should be single assign)find the assignments of any name associated with an ownerretrieveAssignments
(AttributeDef attributeDef) find the assignments of any name associated with a defretrieveAssignments
(AttributeDefName attributeDefName) retrieveAssignmentsByAttributeDefId
(String attributeDefId) retrieveAttributes
(AttributeDef attributeDef) retrieveAttributesByAttributeDef
(String nameOfAttributeDef) retrieveAttributesByAttributeDefId
(String attributeDefId) protected void
setAllAttributeAssignsForCache
(Set<AttributeAssign> allAttributeAssignsForCache) abstract String
toString()
-
Field Details
-
allAttributeAssignsCacheHitsForTest
public static long allAttributeAssignsCacheHitsForTestcache hits for testing -
allAttributeAssignsCacheMissesForTest
public static long allAttributeAssignsCacheMissesForTestcache misses for testing
-
-
Method Details
-
assertCanReadAttributeDefName
make sure the user can read the attribute (including looking at object if necessary)- Parameters:
attributeDefName
-
-
assertCanReadAttributeDef
make sure the user can read the attribute (including looking at object if necessary)- Parameters:
attributeDef
-
-
assertCanUpdateAttributeDefName
make sure the user can update the attribute (including looking at object if necessary)- Parameters:
attributeDefName
-
-
assertCanDelegateAttributeDefName
make sure the user can delegate the attribute- Parameters:
action
-attributeDefName
-
-
assertCanGrantAttributeDefName
make sure the user can grant delegation to the attribute- Parameters:
action
-attributeDefName
-
-
assignAttribute
- Parameters:
attributeDefName
-- Returns:
- the result including if added or already there
-
assignAttributeByName
- Parameters:
attributeDefNameName
-- Returns:
- the result including if added or already there
-
assignAttributeById
- Parameters:
attributeDefNameId
-- Returns:
- the result including if added or already there
-
hasAttributeById
- Parameters:
attributeDefNameId
-- Returns:
- true if has attribute, false if not
-
hasAttribute
- Parameters:
attributeDefName
-- Returns:
- true if has attribute, false if not
-
retrieveAssignment
public AttributeAssign retrieveAssignment(String action, AttributeDefName attributeDefName, boolean checkSecurity, boolean exceptionIfNull) retrieve an assignment (should be single assign)- Parameters:
action
-attributeDefName
-checkSecurity
-exceptionIfNull
-- Returns:
- the assignment
-
hasAttributeByName
see if the group- Parameters:
attributeDefNameName
-- Returns:
- true if has attribute, false if not
-
retrieveAssignmentsByAttributeDefId
- Parameters:
attributeDefId
-- Returns:
- the assignments for a def name
-
retrieveAttributesByAttributeDefId
- Parameters:
attributeDefId
-- Returns:
- the assignments for a def
-
retrieveAttributesByAttributeDef
- Parameters:
nameOfAttributeDef
-- Returns:
- the attributes for a def
-
retrieveAssignmentsByAttributeDef
- Parameters:
name
- is the name of the attribute def- Returns:
- the assignments for a def
-
retrieveAssignments
find the assignments of any name associated with a def- Parameters:
attributeDef
-- Returns:
- the set of assignments or the empty set
-
retrieveAssignments
- Parameters:
attributeDefName
-- Returns:
- the assignments for a def name
-
retrieveAttributes
- Parameters:
attributeDef
-- Returns:
- the attributes for a def
-
removeAttribute
- Parameters:
attributeDefName
-- Returns:
- if removed or already not assigned
-
getAllAttributeAssignsForCache
return the cache of all attribute assigns, might be null if not caching- Returns:
- the allAttributeAssignsCache
-
setAllAttributeAssignsForCache
- Parameters:
allAttributeAssignsForCache
- the Set of attributes to put in cache
-
removeAttributeById
- Parameters:
attributeDefNameId
-- Returns:
- if added or already there
-
removeAttributeByName
- Parameters:
attributeDefNameName
-- Returns:
- if added or already there
-
assignAttribute
- Parameters:
action
- is the action on the assignment (null means default action)attributeDefName
-- Returns:
- the result including if added or already there
-
assignAttribute
public AttributeAssignResult assignAttribute(String action, AttributeDefName attributeDefName, PermissionAllowed permissionAllowed) - Parameters:
action
- is the action on the assignment (null means default action)attributeDefName
-permissionAllowed
- if permission then if allowed or disallowed- Returns:
- the result including if added or already there
-
internal_assignAttributeHelper
public AttributeAssignResult internal_assignAttributeHelper(String action, AttributeDefName attributeDefName, boolean checkSecurity, String uuid, PermissionAllowed permissionAllowed) - Parameters:
action
- is the action on the assignment (null means default action)attributeDefName
-checkSecurity
-uuid
- uuid of the assignmentpermissionAllowed
- if permission this is the allowed flag- Returns:
- the result including if added or already there
-
assignAttributeById
- Parameters:
action
- is the action on the assignment (null means default action)attributeDefNameId
-- Returns:
- the result including if added or already there
-
assignAttributeByName
- Parameters:
action
- is the action on the assignment (null means default action)attributeDefNameName
-- Returns:
- the result including if added or already there
-
hasAttribute
- Parameters:
action
- is the action on the assignment (null means default action)attributeDefName
-- Returns:
- true if has attribute, false if not
-
hasAttributeById
- Parameters:
action
- is the action on the assignment (null means default action)attributeDefNameId
-- Returns:
- true if has attribute, false if not
-
hasAttributeByName
see if the group- Parameters:
action
- is the action on the assignment (null means default action)attributeDefNameName
-- Returns:
- true if has attribute, false if not
-
removeAttribute
- Parameters:
action
- is the action on the assignment (null means default action)attributeDefName
-- Returns:
- if removed or already not assigned
-
removeAttributeById
- Parameters:
action
- is the action on the assignment (null means default action)attributeDefNameId
-- Returns:
- if added or already there
-
removeAttributeByAssignId
remove an attribute assign by id- Parameters:
assignId
-- Returns:
- if removed or already gone
-
removeAttributeByAssignId
- Parameters:
checkSecurity
-assignId
-- Returns:
- if removed or already gone
-
removeAttributeByName
- Parameters:
action
- is the action on the assignment (null means default action)attributeDefNameName
-- Returns:
- if added or already there
-
toString
-
delegateAttribute
public AttributeAssignResult delegateAttribute(AttributeDefName attributeDefName, boolean assign, AttributeAssignDelegateOptions attributeAssignDelegateOptions) - Parameters:
attributeDefName
-assign
- true to assign, false to unassignattributeAssignDelegateOptions
- if there are more options, null if not- Returns:
- the result including if added or already there
-
delegateAttribute
public AttributeAssignResult delegateAttribute(String action, AttributeDefName attributeDefName, boolean assign, AttributeAssignDelegateOptions attributeAssignDelegateOptions) - Parameters:
action
- is the action on the assignment (null means default action)attributeDefName
-assign
- true to assign, false to unassignattributeAssignDelegateOptions
- if there are more options, null if not- Returns:
- the result including if added or already there
-
delegateAttributeById
public AttributeAssignResult delegateAttributeById(String attributeDefNameId, boolean assign, AttributeAssignDelegateOptions attributeAssignDelegateOptions) - Parameters:
attributeDefNameId
-assign
- true to assign, false to unassignattributeAssignDelegateOptions
- if there are more options, null if not- Returns:
- the result including if added or already there
-
delegateAttributeById
public AttributeAssignResult delegateAttributeById(String action, String attributeDefNameId, boolean assign, AttributeAssignDelegateOptions attributeAssignDelegateOptions) - Parameters:
action
- is the action on the assignment (null means default action)attributeDefNameId
-assign
- true to assign, false to unassignattributeAssignDelegateOptions
- if there are more options, null if not- Returns:
- the result including if added or already there
-
delegateAttributeByName
public AttributeAssignResult delegateAttributeByName(String attributeDefNameName, boolean assign, AttributeAssignDelegateOptions attributeAssignDelegateOptions) - Parameters:
attributeDefNameName
-assign
- true to assign, false to unassignattributeAssignDelegateOptions
- if there are more options, null if not- Returns:
- the result including if added or already there
-
delegateAttributeByName
public AttributeAssignResult delegateAttributeByName(String action, String attributeDefNameName, boolean assign, AttributeAssignDelegateOptions attributeAssignDelegateOptions) - Parameters:
action
- is the action on the assignment (null means default action)assign
- true to assign, false to unassignattributeAssignDelegateOptions
- if there are more options, null if notattributeDefNameName
-- Returns:
- the result including if added or already there
-
addAttribute
add a multi assignable attribute- Parameters:
attributeDefName
-- Returns:
- the result including if added or already there
-
addAttribute
add a multi assignable attribute- Parameters:
action
- is the action on the assignment (null means default action)attributeDefName
-- Returns:
- the result including if added or already there
-
addAttributeById
add a multi assignable attribute- Parameters:
attributeDefNameId
-- Returns:
- the result including if added or already there
-
addAttributeById
add a multi assignable attribute- Parameters:
action
- is the action on the assignment (null means default action)attributeDefNameId
-- Returns:
- the result including if added or already there
-
addAttributeByName
add a multi assignable attribute- Parameters:
attributeDefNameName
-- Returns:
- the result including if added or already there
-
addAttributeByName
add a multi assignable attribute- Parameters:
action
- is the action on the assignment (null means default action)attributeDefNameName
-- Returns:
- the result including if added or already there
-
assertScopeOk
- Parameters:
attributeDef
-
-
getAttributeAssignable
get the assignable object- Returns:
- the assignable object
-
internal_addAttributeHelper
public AttributeAssignResult internal_addAttributeHelper(String action, AttributeDefName attributeDefName, boolean checkSecurity, String uuid) add a multi assignable attribute- Parameters:
action
- is the action on the assignment (null means default action)attributeDefName
-checkSecurity
-uuid
- uuid of the assignment- Returns:
- the result including if added or already there
-
retrieveAttributes
- Returns:
- the attributes for an owner
-
getAttributeAssigns
find the assignments of any name associated with an owner this is the javabean equivalent to retrieveAssignments- Returns:
- the set of assignments or the empty set
-
retrieveAssignments
find the assignments of any name associated with an owner- Returns:
- the set of assignments or the empty set
-
clearObjectHasAttributeCache
public static void clearObjectHasAttributeCache()clear the cache if we are assigning attributes -
hasAttributeOrAncestorHasAttribute
see if a group or parent or ancestor folder has an attribute. this can run securely.- Parameters:
attributeFlagName
-checkSecurity
-- Returns:
- true if group or stem has attribute
-
getAttributeOrAncestorAttribute
public AttributeAssignable getAttributeOrAncestorAttribute(String attributeFlagName, boolean checkSecurity) see if a group or parent or ancestor folder has an attribute. this can run securely.- Parameters:
attributeFlagName
-checkSecurity
-- Returns:
- true if group or stem has attribute
-
getAttributeOrAncestorAttribute
public AttributeAssignable getAttributeOrAncestorAttribute(String attributeFlagName, boolean checkSecurity, String uuidOfMetadataAttributeDefName0, String metadataValue0) see if a group or parent or ancestor folder has an attribute. this can run securely.- Parameters:
attributeFlagName
-checkSecurity
-- Returns:
- true if group or stem has attribute
-
getAttributeOrAncestorAttribute
public AttributeAssignable getAttributeOrAncestorAttribute(String attributeFlagName, boolean checkSecurity, String uuidOfMetadataAttributeDefName0, String metadataValue0, String uuidOfMetadataAttributeDefName1, String metadataValue1) see if a group or parent or ancestor folder has an attribute. this can run securely.- Parameters:
attributeFlagName
-checkSecurity
-uuidOfMetadataAttributeDefName0
- uuid of an attributeDefName metadata attribute (null means dont check)metadataValue0
- string value of the metadata attributeuuidOfMetadataAttributeDefName1
- uuid of a second attributeDefName metadata attribute (null means dont check)metadataValue1
- string value of a second metadata attribuet- Returns:
- true if group or stem has attribute
-