Class ProvisioningUpdatable
java.lang.Object
edu.internet2.middleware.grouper.app.provisioning.ProvisioningUpdatable
- Direct Known Subclasses:
ProvisioningEntity
,ProvisioningGroup
,ProvisioningMembership
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription_internal_toJsonForCache
(String membershipAttribute) convert to json for cache, keep under 4k, keep track of truncated fieldsvoid
addAttributeValue
(String name, Object value) this is a multivalued attribute using setsvoid
addAttributeValueForMembership
(Object value, ProvisioningMembershipWrapper provisioningMembershipWrapper, boolean requireMembershipWrapper) add attribute value for membership, assume this happens in a translation, and link the membership with the attribute (to track when it gets saved to target or error handling)void
addInternal_objectChange
(ProvisioningObjectChange provisioningObjectChange) void
assignAttributeValue
(String name, Object value) attributeNamesDifferentForCache
(ProvisioningUpdatable provisioningUpdatable, String membershipAttribute) see which attribute names are different when comparing to a cached object from json note if there is a truncated field, consider that so the same prefix is okabstract boolean
canDeleteAttribute
(String name) abstract boolean
canInsertAttribute
(String name) abstract boolean
canUpdateAttribute
(String name) void
clearAttribute
(String name) static List<ProvisioningUpdatable>
clone
(List<ProvisioningUpdatable> provisioningUpdatables) do a deep clone of the datavoid
cloneUpdatable
(ProvisioningUpdatable provisioningUpdatable, String ignoreAttribute) deep clone the fields in this objectvoid
fromJsonForCache
(String json) convert from cached json string to hydrate this objectif there is a problem syncing this object to the target set the exception hereif this object is hooked up to a wrapper and hooked up to a provisioner, then return that provisionermultikey is either the string "field", "attribute", the second param is field name or attribute name third param is "insert", "update", or "delete" and the value is the old valuematching idsif this object has been provisioned or deprovisioned successfully, set this to true.search idsboolean
hasAttribute
(String attributeName) boolean
isEmpty()
see if this object is empty e.g.boolean
if this is the grouper translated objectboolean
after translation, toss this objectabstract String
get the object type name, e.g.boolean
removeAttribute
(String name) void
retainAttributes
(Collection<String> attributeNames) retrieveAttributeValue
(String name) Set<?>
Set<?>
retrieveProvisioningAttribute
(String attributeName) retriveAttributeConfig
(String attributeName) get the config for an attribute based on name if a wrapper object is associated with this objectvoid
setException
(Exception internal_exception) if there is a problem syncing this object to the target set the exception herevoid
setMatchingIdAttributeNameToValues
(List<ProvisioningUpdatableAttributeAndValue> matchingIdAttributeNameToValues) matching idsvoid
setProvisioned
(Boolean provisioned) if this object has been provisioned or deprovisioned successfully, set this to true.void
setRemoveFromList
(boolean removeFromList) after translation, toss this objectvoid
setSearchIdAttributeNameToValues
(List<ProvisioningUpdatableAttributeAndValue> searchIdAttributeNameToValues) search idsstatic String
stringValueWithType
(Object value) convert to json for cache, keep under 4k, keep track of truncated fieldsabstract String
toString
(boolean includeDataActions) protected boolean
toStringAppendField
(StringBuilder result, boolean firstField, String fieldName, Object fieldValue) protected boolean
toStringAppendField
(StringBuilder result, boolean firstField, String fieldName, Object fieldValue, boolean appendIfEmpty) protected boolean
toStringProvisioningUpdatable
(StringBuilder result, boolean firstField, boolean includeObjectChanges)
-
Constructor Details
-
ProvisioningUpdatable
- Parameters:
attributeNameToIndex
-
-
-
Method Details
-
toString
-
retrieveAttributes
-
internal_retrieveAttributeNameToIndex
-
isGrouperTargetObject
public boolean isGrouperTargetObject()if this is the grouper translated object- Returns:
- true if grouper target side
-
getMatchingIdAttributeNameToValues
matching ids- Returns:
-
setMatchingIdAttributeNameToValues
public void setMatchingIdAttributeNameToValues(List<ProvisioningUpdatableAttributeAndValue> matchingIdAttributeNameToValues) matching ids- Parameters:
matchingIdAttributeNameToValues
-
-
getSearchIdAttributeNameToValues
search ids- Returns:
-
setSearchIdAttributeNameToValues
public void setSearchIdAttributeNameToValues(List<ProvisioningUpdatableAttributeAndValue> searchIdAttributeNameToValues) search ids- Parameters:
searchIdAttributeNameToValues
-
-
objectTypeName
get the object type name, e.g. group, entity, membership- Returns:
- the object type name
-
retriveAttributeConfig
get the config for an attribute based on name if a wrapper object is associated with this object- Parameters:
attributeName
-- Returns:
- the attribute configuration
-
getProvisioningWrapper
-
getGrouperProvisioner
if this object is hooked up to a wrapper and hooked up to a provisioner, then return that provisioner- Returns:
- the provisioner
-
fromJsonForCache
convert from cached json string to hydrate this object- Parameters:
json
-
-
getTruncatedAttributes
-
toJsonForCache
convert to json for cache, keep under 4k, keep track of truncated fields- Returns:
- the json of this group for cache
-
_internal_toJsonForCache
convert to json for cache, keep under 4k, keep track of truncated fields- Returns:
- the json of this group for cache
-
attributeNamesDifferentForCache
public Set<String> attributeNamesDifferentForCache(ProvisioningUpdatable provisioningUpdatable, String membershipAttribute) see which attribute names are different when comparing to a cached object from json note if there is a truncated field, consider that so the same prefix is ok- Parameters:
provisioningUpdatable
-membershipAttribute
-- Returns:
- the changed fields
-
provisioningUpdatableTypeShort
-
canInsertAttribute
-
canUpdateAttribute
-
canDeleteAttribute
-
isEmpty
public boolean isEmpty()see if this object is empty e.g. after translating if empty then dont keep track of group since the translation might have affected another object- Returns:
- true if empty
-
getProvisioned
if this object has been provisioned or deprovisioned successfully, set this to true. e.g. if the insert/update/delete was successful, this should be "true" otherwise set to false and set the exception field- Returns:
- if provisioned
-
setProvisioned
if this object has been provisioned or deprovisioned successfully, set this to true. e.g. if the insert/update/delete was successful, this should be "true" otherwise set to false and set the exception field- Parameters:
provisioned
-
-
clone
do a deep clone of the data- Parameters:
provisioningUpdatables
-- Returns:
- the cloned list
-
isRemoveFromList
public boolean isRemoveFromList()after translation, toss this object- Returns:
-
setRemoveFromList
public void setRemoveFromList(boolean removeFromList) after translation, toss this object- Parameters:
removeFromList
-
-
addInternal_objectChange
- Parameters:
provisioningObjectChange
-
-
getInternal_objectChanges
multikey is either the string "field", "attribute", the second param is field name or attribute name third param is "insert", "update", or "delete" and the value is the old value- Returns:
-
retainAttributes
-
retrieveProvisioningAttribute
-
hasAttribute
-
addAttributeValueForMembership
public void addAttributeValueForMembership(Object value, ProvisioningMembershipWrapper provisioningMembershipWrapper, boolean requireMembershipWrapper) add attribute value for membership, assume this happens in a translation, and link the membership with the attribute (to track when it gets saved to target or error handling)- Parameters:
name
-value
-
-
addAttributeValue
this is a multivalued attribute using sets- Parameters:
name
-value
-
-
assignAttributeValue
- Parameters:
name
-value
-
-
removeAttribute
- Parameters:
name
-value
-
-
retrieveAttributeValue
- Parameters:
name
-value
-
-
retrieveAttributeValueString
- Parameters:
name
-value
-
-
retrieveAttributeValueSet
- Parameters:
name
-value
-
-
retrieveAttributeValueSetForMemberships
- Parameters:
name
-value
-
-
retrieveAttributeValueInteger
- Parameters:
name
-value
-
-
retrieveAttributeValueLong
- Parameters:
name
-value
-
-
retrieveAttributeValueBoolean
- Parameters:
name
-value
-
-
getException
if there is a problem syncing this object to the target set the exception here- Returns:
-
setException
if there is a problem syncing this object to the target set the exception here- Parameters:
internal_exception
-
-
toStringProvisioningUpdatable
protected boolean toStringProvisioningUpdatable(StringBuilder result, boolean firstField, boolean includeObjectChanges) -
toStringAppendField
protected boolean toStringAppendField(StringBuilder result, boolean firstField, String fieldName, Object fieldValue) -
toStringAppendField
protected boolean toStringAppendField(StringBuilder result, boolean firstField, String fieldName, Object fieldValue, boolean appendIfEmpty) - Parameters:
result
-firstField
-fieldName
-fieldValue
-- Returns:
-
stringValueWithType
-
cloneUpdatable
deep clone the fields in this object- Parameters:
ignoreAttribute
- is the attribute name to ignore, e.g. the membership attribute
-
clearAttribute
- Parameters:
groupMembershipAttribute
-
-