Class EntitySave
java.lang.Object
edu.internet2.middleware.grouper.entity.EntitySave
Use this class to insert or update an entity
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionassignCreateParentStemsIfNotExist
(boolean theCreateParentStemsIfNotExist) assign create parents if not existassignDescription
(String theDescription) assign descriptionassignDisplayExtension
(String theDisplayExtension) display extensionassignDisplayName
(String theDisplayName) assignEntityNameToEdit
(String theGroupNameToEdit) group name to editassignName
(String name1) nameassignSaveMode
(SaveMode theSaveMode) assign save modeassignUuid
(String theUuid) uuidget the save typesave()
create or update a group.
-
Constructor Details
-
EntitySave
create a new entity save- Parameters:
theGrouperSession
-
-
-
Method Details
-
assignEntityNameToEdit
group name to edit- Parameters:
theGroupNameToEdit
-- Returns:
- the group name to edit
-
assignUuid
uuid- Parameters:
theUuid
-- Returns:
- uuid
-
assignDisplayName
- Parameters:
theDisplayName
-- Returns:
- this for chaining
-
assignName
name- Parameters:
name1
-- Returns:
- name
-
assignDisplayExtension
display extension- Parameters:
theDisplayExtension
-- Returns:
- this for chaining
-
assignDescription
assign description- Parameters:
theDescription
-- Returns:
- this for chaining
-
assignSaveMode
assign save mode- Parameters:
theSaveMode
-- Returns:
- this for chaining
-
assignCreateParentStemsIfNotExist
assign create parents if not exist- Parameters:
theCreateParentStemsIfNotExist
-- Returns:
- this for chaining
-
getSaveResultType
get the save type- Returns:
- save type
-
save
create or update a group. Note this will not rename a group at this time (might in future) This is a static method since setters to Group objects persist to the DB Steps: 1. Find the group by groupNameToEdit 2. Internally set all the fields of the stem (no need to reset if already the same) 3. Store the group (insert or update) if needed 4. Return the group 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 group
- Throws:
StemNotFoundException
InsufficientPrivilegeException
StemAddException
GroupModifyException
GroupNotFoundException
GroupAddException
-