edu.internet2.middleware.grouper.attr
Class AttributeDefSave

java.lang.Object
  extended by edu.internet2.middleware.grouper.attr.AttributeDefSave

public class AttributeDefSave
extends Object

Use this class to insert or update an attribute definition


Constructor Summary
AttributeDefSave(GrouperSession theGrouperSession)
          create a new attribute def save
 
Method Summary
 AttributeDefSave assignAttributeDefNameToEdit(String theAttributeDefNameToEdit)
          attributeDef name to edit
 AttributeDefSave assignAttributeDefPublic(boolean theBoolean)
          if assign
 AttributeDefSave assignAttributeDefType(AttributeDefType theAttributeDefType)
          if assign
 AttributeDefSave assignCreateParentStemsIfNotExist(boolean theCreateParentStemsIfNotExist)
          assign create parents if not exist
 AttributeDefSave assignDescription(String theDescription)
          assign description
 AttributeDefSave assignId(String theId)
          uuid
 AttributeDefSave assignIdIndex(Long theIdIndex)
          assign id_index
 AttributeDefSave assignMultiAssignable(boolean theBoolean)
          if assign
 AttributeDefSave assignMultiValued(boolean theBoolean)
          if assign
 AttributeDefSave assignName(String name1)
          name
 AttributeDefSave assignPrivAllAdmin(boolean thePrivAllAdmin)
          assign priv admin to be different than the defaults for grouperAll
 AttributeDefSave assignPrivAllAttrRead(boolean thePrivAllAttrRead)
          assign priv attr read to be different than the defaults for grouperAll
 AttributeDefSave assignPrivAllAttrUpdate(boolean thePrivAllAttrUpdate)
          assign priv attr update to be different than the defaults for grouperAll
 AttributeDefSave assignPrivAllOptin(boolean thePrivAllOptin)
          assign priv optin to be different than the defaults for grouperAll
 AttributeDefSave assignPrivAllOptout(boolean thePrivAllOptout)
          assign priv optout to be different than the defaults for grouperAll
 AttributeDefSave assignPrivAllRead(boolean thePrivAllRead)
          assign priv read to be different than the defaults for grouperAll
 AttributeDefSave assignPrivAllUpdate(boolean thePrivAllUpdate)
          assign priv update to be different than the defaults for grouperAll
 AttributeDefSave assignPrivAllView(boolean thePrivAllView)
          assign priv view to be different than the defaults for grouperAll
 AttributeDefSave assignSaveMode(SaveMode theSaveMode)
          assign save mode
 AttributeDefSave assignToAttributeDef(boolean theBoolean)
          if assign
 AttributeDefSave assignToAttributeDefAssn(boolean theBoolean)
          if assign
 AttributeDefSave assignToEffMembership(boolean theBoolean)
          if assign
 AttributeDefSave assignToEffMembershipAssn(boolean theBoolean)
          if assign
 AttributeDefSave assignToGroup(boolean theBoolean)
          if assign
 AttributeDefSave assignToGroupAssn(boolean theBoolean)
          if assign
 AttributeDefSave assignToImmMembership(boolean theBoolean)
          if assign
 AttributeDefSave assignToImmMembershipAssn(boolean theBoolean)
          if assign
 AttributeDefSave assignToMember(boolean theBoolean)
          if assign
 AttributeDefSave assignToMemberAssn(boolean theBoolean)
          if assign
 AttributeDefSave assignToStem(boolean theBoolean)
          if assign
 AttributeDefSave assignToStemAssn(boolean theBoolean)
          if assign
 AttributeDefSave assignValueType(AttributeDefValueType attributeDefValueType)
          if assign
 SaveResultType getSaveResultType()
          get the save type
 AttributeDef save()
           create or update an attribute def.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeDefSave

public AttributeDefSave(GrouperSession theGrouperSession)
create a new attribute def save

Parameters:
theGrouperSession -
Method Detail

assignIdIndex

public AttributeDefSave assignIdIndex(Long theIdIndex)
assign id_index

Parameters:
theIdIndex -
Returns:
this for chaining

assignAttributeDefNameToEdit

public AttributeDefSave assignAttributeDefNameToEdit(String theAttributeDefNameToEdit)
attributeDef name to edit

Parameters:
theAttributeDefNameToEdit -
Returns:
the attributeDef name to edit

assignId

public AttributeDefSave assignId(String theId)
uuid

Parameters:
theUuid -
Returns:
uuid

assignName

public AttributeDefSave assignName(String name1)
name

Parameters:
name1 -
Returns:
name

assignDescription

public AttributeDefSave assignDescription(String theDescription)
assign description

Parameters:
theDescription -
Returns:
this for chaining

assignSaveMode

public AttributeDefSave assignSaveMode(SaveMode theSaveMode)
assign save mode

Parameters:
theSaveMode -
Returns:
this for chaining

assignCreateParentStemsIfNotExist

public AttributeDefSave assignCreateParentStemsIfNotExist(boolean theCreateParentStemsIfNotExist)
assign create parents if not exist

Parameters:
theCreateParentStemsIfNotExist -
Returns:
this for chaining

assignToAttributeDef

public AttributeDefSave assignToAttributeDef(boolean theBoolean)
if assign

Parameters:
theBoolean -
Returns:
this for chaining

assignToAttributeDefAssn

public AttributeDefSave assignToAttributeDefAssn(boolean theBoolean)
if assign

Parameters:
theBoolean -
Returns:
this for chaining

assignToEffMembership

public AttributeDefSave assignToEffMembership(boolean theBoolean)
if assign

Parameters:
theBoolean -
Returns:
this for chaining

assignToEffMembershipAssn

public AttributeDefSave assignToEffMembershipAssn(boolean theBoolean)
if assign

Parameters:
theBoolean -
Returns:
this for chaining

assignToGroup

public AttributeDefSave assignToGroup(boolean theBoolean)
if assign

Parameters:
theBoolean -
Returns:
this for chaining

assignToGroupAssn

public AttributeDefSave assignToGroupAssn(boolean theBoolean)
if assign

Parameters:
theBoolean -
Returns:
this for chaining

assignToImmMembership

public AttributeDefSave assignToImmMembership(boolean theBoolean)
if assign

Parameters:
theBoolean -
Returns:
this for chaining

assignToImmMembershipAssn

public AttributeDefSave assignToImmMembershipAssn(boolean theBoolean)
if assign

Parameters:
theBoolean -
Returns:
this for chaining

assignToMember

public AttributeDefSave assignToMember(boolean theBoolean)
if assign

Parameters:
theBoolean -
Returns:
this for chaining

assignToMemberAssn

public AttributeDefSave assignToMemberAssn(boolean theBoolean)
if assign

Parameters:
theBoolean -
Returns:
this for chaining

assignToStem

public AttributeDefSave assignToStem(boolean theBoolean)
if assign

Parameters:
theBoolean -
Returns:
this for chaining

assignToStemAssn

public AttributeDefSave assignToStemAssn(boolean theBoolean)
if assign

Parameters:
theBoolean -
Returns:
this for chaining

assignAttributeDefPublic

public AttributeDefSave assignAttributeDefPublic(boolean theBoolean)
if assign

Parameters:
theBoolean -
Returns:
this for chaining

assignAttributeDefType

public AttributeDefSave assignAttributeDefType(AttributeDefType theAttributeDefType)
if assign

Parameters:
theBoolean -
Returns:
this for chaining

assignMultiAssignable

public AttributeDefSave assignMultiAssignable(boolean theBoolean)
if assign

Parameters:
theBoolean -
Returns:
this for chaining

assignMultiValued

public AttributeDefSave assignMultiValued(boolean theBoolean)
if assign

Parameters:
theBoolean -
Returns:
self for chaining

assignValueType

public AttributeDefSave assignValueType(AttributeDefValueType attributeDefValueType)
if assign

Parameters:
theBoolean -
Returns:
this for chaining

getSaveResultType

public SaveResultType getSaveResultType()
get the save type

Returns:
save type

save

public AttributeDef save()
                  throws StemNotFoundException,
                         InsufficientPrivilegeException,
                         StemAddException
 create or update an attribute def.  Note this will not rename an attribute def at this time (might in future)
 
 Steps:
 
 1. Find the attributeDef by attributeDefNameToEdit
 2. Internally set all the fields of the attributeDef (no need to reset if already the same)
 3. Store the attributeDef (insert or update) if needed
 4. Return the attributeDef object
 
 This runs in a tx so that if part of it fails the whole thing fails, and potentially the outer
 transaction too
 

Returns:
the attributeDef
Throws:
StemNotFoundException
InsufficientPrivilegeException
StemAddException

assignPrivAllAdmin

public AttributeDefSave assignPrivAllAdmin(boolean thePrivAllAdmin)
assign priv admin to be different than the defaults for grouperAll

Parameters:
thePrivAllAdmin -
Returns:
this for chaining

assignPrivAllAttrRead

public AttributeDefSave assignPrivAllAttrRead(boolean thePrivAllAttrRead)
assign priv attr read to be different than the defaults for grouperAll

Parameters:
thePrivAllAttrRead -
Returns:
this for chaining

assignPrivAllAttrUpdate

public AttributeDefSave assignPrivAllAttrUpdate(boolean thePrivAllAttrUpdate)
assign priv attr update to be different than the defaults for grouperAll

Parameters:
thePrivAllAttrUpdate -
Returns:
this for chaining

assignPrivAllOptin

public AttributeDefSave assignPrivAllOptin(boolean thePrivAllOptin)
assign priv optin to be different than the defaults for grouperAll

Parameters:
thePrivAllOptin -
Returns:
this for chaining

assignPrivAllOptout

public AttributeDefSave assignPrivAllOptout(boolean thePrivAllOptout)
assign priv optout to be different than the defaults for grouperAll

Parameters:
thePrivAllOptout -
Returns:
this for chaining

assignPrivAllRead

public AttributeDefSave assignPrivAllRead(boolean thePrivAllRead)
assign priv read to be different than the defaults for grouperAll

Parameters:
thePrivAllRead -
Returns:
this for chaining

assignPrivAllUpdate

public AttributeDefSave assignPrivAllUpdate(boolean thePrivAllUpdate)
assign priv update to be different than the defaults for grouperAll

Parameters:
thePrivAllUpdate -
Returns:
this for chaining

assignPrivAllView

public AttributeDefSave assignPrivAllView(boolean thePrivAllView)
assign priv view to be different than the defaults for grouperAll

Parameters:
thePrivAllView -
Returns:
this for chaining