Class ProvisioningUpdatable

java.lang.Object
edu.internet2.middleware.grouper.app.provisioning.ProvisioningUpdatable
Direct Known Subclasses:
ProvisioningEntity, ProvisioningGroup, ProvisioningMembership

public abstract class ProvisioningUpdatable extends Object
  • Constructor Details

    • ProvisioningUpdatable

      public ProvisioningUpdatable(Map<String,Integer> attributeNameToIndex)
      Parameters:
      attributeNameToIndex -
  • Method Details

    • toString

      public abstract String toString(boolean includeDataActions)
    • retrieveAttributes

      public Map<String,ProvisioningAttribute> retrieveAttributes()
    • internal_retrieveAttributeNameToIndex

      public Map<String,Integer> internal_retrieveAttributeNameToIndex()
    • isGrouperTargetObject

      public boolean isGrouperTargetObject()
      if this is the grouper translated object
      Returns:
      true if grouper target side
    • getMatchingIdAttributeNameToValues

      public List<ProvisioningUpdatableAttributeAndValue> getMatchingIdAttributeNameToValues()
      matching ids
      Returns:
    • setMatchingIdAttributeNameToValues

      public void setMatchingIdAttributeNameToValues(List<ProvisioningUpdatableAttributeAndValue> matchingIdAttributeNameToValues)
      matching ids
      Parameters:
      matchingIdAttributeNameToValues -
    • getSearchIdAttributeNameToValues

      public List<ProvisioningUpdatableAttributeAndValue> getSearchIdAttributeNameToValues()
      search ids
      Returns:
    • setSearchIdAttributeNameToValues

      public void setSearchIdAttributeNameToValues(List<ProvisioningUpdatableAttributeAndValue> searchIdAttributeNameToValues)
      search ids
      Parameters:
      searchIdAttributeNameToValues -
    • objectTypeName

      public abstract String objectTypeName()
      get the object type name, e.g. group, entity, membership
      Returns:
      the object type name
    • retriveAttributeConfig

      public GrouperProvisioningConfigurationAttribute retriveAttributeConfig(String attributeName)
      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

      public ProvisioningUpdatableWrapper getProvisioningWrapper()
    • getGrouperProvisioner

      public GrouperProvisioner getGrouperProvisioner()
      if this object is hooked up to a wrapper and hooked up to a provisioner, then return that provisioner
      Returns:
      the provisioner
    • fromJsonForCache

      public void fromJsonForCache(String json)
      convert from cached json string to hydrate this object
      Parameters:
      json -
    • getTruncatedAttributes

      public List<String> getTruncatedAttributes()
    • toJsonForCache

      public String toJsonForCache()
      convert to json for cache, keep under 4k, keep track of truncated fields
      Returns:
      the json of this group for cache
    • _internal_toJsonForCache

      public String _internal_toJsonForCache(String membershipAttribute)
      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

      public String provisioningUpdatableTypeShort()
    • canInsertAttribute

      public abstract boolean canInsertAttribute(String name)
    • canUpdateAttribute

      public abstract boolean canUpdateAttribute(String name)
    • canDeleteAttribute

      public abstract boolean canDeleteAttribute(String name)
    • 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

      public Boolean 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

      public void setProvisioned(Boolean provisioned)
      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

      public static List<ProvisioningUpdatable> clone(List<ProvisioningUpdatable> provisioningUpdatables)
      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

      public void addInternal_objectChange(ProvisioningObjectChange provisioningObjectChange)
      Parameters:
      provisioningObjectChange -
    • getInternal_objectChanges

      public Collection<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

      public void retainAttributes(Collection<String> attributeNames)
    • retrieveProvisioningAttribute

      public ProvisioningAttribute retrieveProvisioningAttribute(String attributeName)
    • hasAttribute

      public boolean hasAttribute(String attributeName)
    • 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

      public void addAttributeValue(String name, Object value)
      this is a multivalued attribute using sets
      Parameters:
      name -
      value -
    • assignAttributeValue

      public void assignAttributeValue(String name, Object value)
      Parameters:
      name -
      value -
    • removeAttribute

      public boolean removeAttribute(String name)
      Parameters:
      name -
      value -
    • retrieveAttributeValue

      public Object retrieveAttributeValue(String name)
      Parameters:
      name -
      value -
    • retrieveAttributeValueString

      public String retrieveAttributeValueString(String name)
      Parameters:
      name -
      value -
    • retrieveAttributeValueSet

      public Set<?> retrieveAttributeValueSet(String name)
      Parameters:
      name -
      value -
    • retrieveAttributeValueSetForMemberships

      public Set<?> retrieveAttributeValueSetForMemberships()
      Parameters:
      name -
      value -
    • retrieveAttributeValueInteger

      public Integer retrieveAttributeValueInteger(String name)
      Parameters:
      name -
      value -
    • retrieveAttributeValueLong

      public Long retrieveAttributeValueLong(String name)
      Parameters:
      name -
      value -
    • retrieveAttributeValueBoolean

      public Boolean retrieveAttributeValueBoolean(String name)
      Parameters:
      name -
      value -
    • getException

      public Exception getException()
      if there is a problem syncing this object to the target set the exception here
      Returns:
    • setException

      public void setException(Exception internal_exception)
      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

      public static String stringValueWithType(Object value)
    • cloneUpdatable

      public void cloneUpdatable(ProvisioningUpdatable provisioningUpdatable, String ignoreAttribute)
      deep clone the fields in this object
      Parameters:
      ignoreAttribute - is the attribute name to ignore, e.g. the membership attribute
    • clearAttribute

      public void clearAttribute(String name)
      Parameters:
      groupMembershipAttribute -