public abstract class AttributeAssignBaseDelegate extends Object
Modifier and Type | Field and Description |
---|---|
static long |
allAttributeAssignsCacheHitsForTest
cache hits for testing
|
static long |
allAttributeAssignsCacheMissesForTest
cache misses for testing
|
Modifier and Type | Method and Description |
---|---|
AttributeAssignResult |
addAttribute(AttributeDefName attributeDefName)
add a multi assignable attribute
|
AttributeAssignResult |
addAttribute(String action,
AttributeDefName attributeDefName)
add a multi assignable attribute
|
AttributeAssignResult |
addAttributeById(String attributeDefNameId)
add a multi assignable attribute
|
AttributeAssignResult |
addAttributeById(String action,
String attributeDefNameId)
add a multi assignable attribute
|
AttributeAssignResult |
addAttributeByName(String attributeDefNameName)
add a multi assignable attribute
|
AttributeAssignResult |
addAttributeByName(String action,
String attributeDefNameName)
add a multi assignable attribute
|
void |
assertCanDelegateAttributeDefName(String action,
AttributeDefName attributeDefName)
make sure the user can delegate the attribute
|
void |
assertCanGrantAttributeDefName(String action,
AttributeDefName attributeDefName)
make sure the user can grant delegation to the attribute
|
abstract 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) |
AttributeAssignResult |
assignAttribute(AttributeDefName attributeDefName) |
AttributeAssignResult |
assignAttribute(String action,
AttributeDefName attributeDefName) |
AttributeAssignResult |
assignAttribute(String action,
AttributeDefName attributeDefName,
PermissionAllowed permissionAllowed) |
AttributeAssignResult |
assignAttributeById(String attributeDefNameId) |
AttributeAssignResult |
assignAttributeById(String action,
String attributeDefNameId) |
AttributeAssignResult |
assignAttributeByName(String attributeDefNameName) |
AttributeAssignResult |
assignAttributeByName(String action,
String attributeDefNameName) |
static void |
clearObjectHasAttributeCache()
clear the cache if we are assigning attributes
|
AttributeAssignResult |
delegateAttribute(AttributeDefName attributeDefName,
boolean assign,
AttributeAssignDelegateOptions attributeAssignDelegateOptions) |
AttributeAssignResult |
delegateAttribute(String action,
AttributeDefName attributeDefName,
boolean assign,
AttributeAssignDelegateOptions attributeAssignDelegateOptions) |
AttributeAssignResult |
delegateAttributeById(String attributeDefNameId,
boolean assign,
AttributeAssignDelegateOptions attributeAssignDelegateOptions) |
AttributeAssignResult |
delegateAttributeById(String action,
String attributeDefNameId,
boolean assign,
AttributeAssignDelegateOptions attributeAssignDelegateOptions) |
AttributeAssignResult |
delegateAttributeByName(String attributeDefNameName,
boolean assign,
AttributeAssignDelegateOptions attributeAssignDelegateOptions) |
AttributeAssignResult |
delegateAttributeByName(String action,
String attributeDefNameName,
boolean assign,
AttributeAssignDelegateOptions attributeAssignDelegateOptions) |
protected Set<AttributeAssign> |
getAllAttributeAssignsForCache()
return the cache of all attribute assigns, might be null if not caching
|
abstract AttributeAssignable |
getAttributeAssignable()
get the assignable object
|
Set<AttributeAssign> |
getAttributeAssigns()
find the assignments of any name associated with an owner
this is the javabean equivalent to retrieveAssignments
|
AttributeAssignable |
getAttributeOrAncestorAttribute(String attributeFlagName,
boolean checkSecurity)
see if a group or parent or ancestor folder has an attribute.
|
AttributeAssignable |
getAttributeOrAncestorAttribute(String attributeFlagName,
boolean checkSecurity,
String uuidOfMetadataAttributeDefName0,
String metadataValue0)
see if a group or parent or ancestor folder has an attribute.
|
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.
|
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 group
|
boolean |
hasAttributeByName(String action,
String attributeDefNameName)
see if the group
|
boolean |
hasAttributeOrAncestorHasAttribute(String attributeFlagName,
boolean checkSecurity)
see if a group or parent or ancestor folder has an attribute.
|
AttributeAssignResult |
internal_addAttributeHelper(String action,
AttributeDefName attributeDefName,
boolean checkSecurity,
String uuid)
add a multi assignable attribute
|
AttributeAssignResult |
internal_assignAttributeHelper(String action,
AttributeDefName attributeDefName,
boolean checkSecurity,
String uuid,
PermissionAllowed permissionAllowed) |
AttributeAssignResult |
removeAttribute(AttributeDefName attributeDefName) |
AttributeAssignResult |
removeAttribute(String action,
AttributeDefName attributeDefName) |
AttributeAssignResult |
removeAttributeByAssignId(String assignId)
remove an attribute assign by id
|
AttributeAssignResult |
removeAttributeByAssignId(String assignId,
boolean checkSecurity) |
AttributeAssignResult |
removeAttributeById(String attributeDefNameId) |
AttributeAssignResult |
removeAttributeById(String action,
String attributeDefNameId) |
AttributeAssignResult |
removeAttributeByName(String attributeDefNameName) |
AttributeAssignResult |
removeAttributeByName(String action,
String attributeDefNameName) |
AttributeAssign |
retrieveAssignment(String action,
AttributeDefName attributeDefName,
boolean checkSecurity,
boolean exceptionIfNull)
retrieve an assignment (should be single assign)
|
Set<AttributeAssign> |
retrieveAssignments()
find the assignments of any name associated with an owner
|
Set<AttributeAssign> |
retrieveAssignments(AttributeDef attributeDef)
find the assignments of any name associated with a def
|
Set<AttributeAssign> |
retrieveAssignments(AttributeDefName attributeDefName) |
Set<AttributeAssign> |
retrieveAssignmentsByAttributeDef(String name) |
Set<AttributeAssign> |
retrieveAssignmentsByAttributeDefId(String attributeDefId) |
Set<AttributeDefName> |
retrieveAttributes() |
Set<AttributeDefName> |
retrieveAttributes(AttributeDef attributeDef) |
Set<AttributeDefName> |
retrieveAttributesByAttributeDef(String nameOfAttributeDef) |
Set<AttributeDefName> |
retrieveAttributesByAttributeDefId(String attributeDefId) |
protected void |
setAllAttributeAssignsForCache(Set<AttributeAssign> allAttributeAssignsForCache) |
abstract String |
toString() |
public static long allAttributeAssignsCacheHitsForTest
public static long allAttributeAssignsCacheMissesForTest
public void assertCanReadAttributeDefName(AttributeDefName attributeDefName)
attributeDefName
- public abstract void assertCanReadAttributeDef(AttributeDef attributeDef)
attributeDef
- public abstract void assertCanUpdateAttributeDefName(AttributeDefName attributeDefName)
attributeDefName
- public void assertCanDelegateAttributeDefName(String action, AttributeDefName attributeDefName)
action
- attributeDefName
- public void assertCanGrantAttributeDefName(String action, AttributeDefName attributeDefName)
action
- attributeDefName
- public AttributeAssignResult assignAttribute(AttributeDefName attributeDefName)
attributeDefName
- public AttributeAssignResult assignAttributeByName(String attributeDefNameName)
attributeDefNameName
- public AttributeAssignResult assignAttributeById(String attributeDefNameId)
attributeDefNameId
- public boolean hasAttributeById(String attributeDefNameId)
attributeDefNameId
- public boolean hasAttribute(AttributeDefName attributeDefName)
attributeDefName
- public AttributeAssign retrieveAssignment(String action, AttributeDefName attributeDefName, boolean checkSecurity, boolean exceptionIfNull)
action
- attributeDefName
- checkSecurity
- exceptionIfNull
- public boolean hasAttributeByName(String attributeDefNameName)
attributeDefNameName
- public Set<AttributeAssign> retrieveAssignmentsByAttributeDefId(String attributeDefId)
attributeDefId
- public Set<AttributeDefName> retrieveAttributesByAttributeDefId(String attributeDefId)
attributeDefId
- public Set<AttributeDefName> retrieveAttributesByAttributeDef(String nameOfAttributeDef)
nameOfAttributeDef
- public Set<AttributeAssign> retrieveAssignmentsByAttributeDef(String name)
name
- is the name of the attribute defpublic Set<AttributeAssign> retrieveAssignments(AttributeDef attributeDef)
attributeDef
- public Set<AttributeAssign> retrieveAssignments(AttributeDefName attributeDefName)
attributeDefName
- public Set<AttributeDefName> retrieveAttributes(AttributeDef attributeDef)
attributeDef
- public AttributeAssignResult removeAttribute(AttributeDefName attributeDefName)
attributeDefName
- protected Set<AttributeAssign> getAllAttributeAssignsForCache()
protected void setAllAttributeAssignsForCache(Set<AttributeAssign> allAttributeAssignsForCache)
allAttributeAssignsForCache
- the Set of attributes to put in cachepublic AttributeAssignResult removeAttributeById(String attributeDefNameId)
attributeDefNameId
- public AttributeAssignResult removeAttributeByName(String attributeDefNameName)
attributeDefNameName
- public AttributeAssignResult assignAttribute(String action, AttributeDefName attributeDefName)
action
- is the action on the assignment (null means default action)attributeDefName
- public AttributeAssignResult assignAttribute(String action, AttributeDefName attributeDefName, PermissionAllowed permissionAllowed)
action
- is the action on the assignment (null means default action)attributeDefName
- permissionAllowed
- if permission then if allowed or disallowedpublic AttributeAssignResult internal_assignAttributeHelper(String action, AttributeDefName attributeDefName, boolean checkSecurity, String uuid, PermissionAllowed permissionAllowed)
action
- is the action on the assignment (null means default action)attributeDefName
- checkSecurity
- uuid
- uuid of the assignmentpermissionAllowed
- if permission this is the allowed flagpublic AttributeAssignResult assignAttributeById(String action, String attributeDefNameId)
action
- is the action on the assignment (null means default action)attributeDefNameId
- public AttributeAssignResult assignAttributeByName(String action, String attributeDefNameName)
action
- is the action on the assignment (null means default action)attributeDefNameName
- public boolean hasAttribute(String action, AttributeDefName attributeDefName)
action
- is the action on the assignment (null means default action)attributeDefName
- public boolean hasAttributeById(String action, String attributeDefNameId)
action
- is the action on the assignment (null means default action)attributeDefNameId
- public boolean hasAttributeByName(String action, String attributeDefNameName)
action
- is the action on the assignment (null means default action)attributeDefNameName
- public AttributeAssignResult removeAttribute(String action, AttributeDefName attributeDefName)
action
- is the action on the assignment (null means default action)attributeDefName
- public AttributeAssignResult removeAttributeById(String action, String attributeDefNameId)
action
- is the action on the assignment (null means default action)attributeDefNameId
- public AttributeAssignResult removeAttributeByAssignId(String assignId)
assignId
- public AttributeAssignResult removeAttributeByAssignId(String assignId, boolean checkSecurity)
checkSecurity
- assignId
- public AttributeAssignResult removeAttributeByName(String action, String attributeDefNameName)
action
- is the action on the assignment (null means default action)attributeDefNameName
- public abstract String toString()
toString
in class Object
Object.toString()
public AttributeAssignResult delegateAttribute(AttributeDefName attributeDefName, boolean assign, AttributeAssignDelegateOptions attributeAssignDelegateOptions)
attributeDefName
- assign
- true to assign, false to unassignattributeAssignDelegateOptions
- if there are more options, null if notpublic AttributeAssignResult delegateAttribute(String action, AttributeDefName attributeDefName, boolean assign, AttributeAssignDelegateOptions attributeAssignDelegateOptions)
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 notpublic AttributeAssignResult delegateAttributeById(String attributeDefNameId, boolean assign, AttributeAssignDelegateOptions attributeAssignDelegateOptions)
attributeDefNameId
- assign
- true to assign, false to unassignattributeAssignDelegateOptions
- if there are more options, null if notpublic AttributeAssignResult delegateAttributeById(String action, String attributeDefNameId, boolean assign, AttributeAssignDelegateOptions attributeAssignDelegateOptions)
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 notpublic AttributeAssignResult delegateAttributeByName(String attributeDefNameName, boolean assign, AttributeAssignDelegateOptions attributeAssignDelegateOptions)
attributeDefNameName
- assign
- true to assign, false to unassignattributeAssignDelegateOptions
- if there are more options, null if notpublic AttributeAssignResult delegateAttributeByName(String action, String attributeDefNameName, boolean assign, AttributeAssignDelegateOptions attributeAssignDelegateOptions)
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
- public AttributeAssignResult addAttribute(AttributeDefName attributeDefName)
attributeDefName
- public AttributeAssignResult addAttribute(String action, AttributeDefName attributeDefName)
action
- is the action on the assignment (null means default action)attributeDefName
- public AttributeAssignResult addAttributeById(String attributeDefNameId)
attributeDefNameId
- public AttributeAssignResult addAttributeById(String action, String attributeDefNameId)
action
- is the action on the assignment (null means default action)attributeDefNameId
- public AttributeAssignResult addAttributeByName(String attributeDefNameName)
attributeDefNameName
- public AttributeAssignResult addAttributeByName(String action, String attributeDefNameName)
action
- is the action on the assignment (null means default action)attributeDefNameName
- public void assertScopeOk(AttributeDef attributeDef)
attributeDef
- public abstract AttributeAssignable getAttributeAssignable()
public AttributeAssignResult internal_addAttributeHelper(String action, AttributeDefName attributeDefName, boolean checkSecurity, String uuid)
action
- is the action on the assignment (null means default action)attributeDefName
- checkSecurity
- uuid
- uuid of the assignmentpublic Set<AttributeDefName> retrieveAttributes()
public Set<AttributeAssign> getAttributeAssigns()
public Set<AttributeAssign> retrieveAssignments()
public static void clearObjectHasAttributeCache()
public boolean hasAttributeOrAncestorHasAttribute(String attributeFlagName, boolean checkSecurity)
attributeFlagName
- checkSecurity
- public AttributeAssignable getAttributeOrAncestorAttribute(String attributeFlagName, boolean checkSecurity)
attributeFlagName
- checkSecurity
- public AttributeAssignable getAttributeOrAncestorAttribute(String attributeFlagName, boolean checkSecurity, String uuidOfMetadataAttributeDefName0, String metadataValue0)
attributeFlagName
- checkSecurity
- public AttributeAssignable getAttributeOrAncestorAttribute(String attributeFlagName, boolean checkSecurity, String uuidOfMetadataAttributeDefName0, String metadataValue0, String uuidOfMetadataAttributeDefName1, String metadataValue1)
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 attribuetCopyright © 2016 Internet2. All rights reserved.