Interface KimTypeService
- All Known Subinterfaces:
DelegationTypeService,GroupTypeService,PermissionTypeService,ResponsibilityTypeService,RoleTypeService
public interface KimTypeService
This is the base service interface for handling type-specific behavior. Types can be attached
to various objects (currently groups and roles) in KIM to add additional attributes and
modify their behavior.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Method Summary
Modifier and TypeMethodDescriptiongetAttributeDefinitions(String kimTypeId) Gets a List ofKimAttributeFieldfor a kim type id.Gets the name of a workflow document type that should be passed to kew when resolving responsibilities for routing.getWorkflowRoutingAttributes(String nodeName) Gets an unmodifiable list of attribute names identifying the attribute qualifiers that are provided to the KIM responsibility service when resolving responsibility-based routing at the node with the given name.validateAttributes(String kimTypeId, Map<String, String> attributes) This method validates the passed in attributes for a kimTypeId generating a List ofRemotableAttributeError.validateAttributesAgainstExisting(String kimTypeId, Map<String, String> newAttributes, Map<String, String> oldAttributes) This method validates the passed in attributes for a kimTypeId generating a List ofRemotableAttributeError.validateUniqueAttributes(String kimTypeId, Map<String, String> newAttributes, Map<String, String> oldAttributes) This method validates the passed in attributes for a kimTypeId generating a List ofRemotableAttributeError.validateUnmodifiableAttributes(String kimTypeId, Map<String, String> originalAttributes, Map<String, String> newAttributes) This method validates the passed in attributes for a kimTypeId generating a List ofRemotableAttributeError.
-
Method Details
-
getWorkflowDocumentTypeName
String getWorkflowDocumentTypeName()Gets the name of a workflow document type that should be passed to kew when resolving responsibilities for routing. This name will be passed as a qualifier with the "documentTypeName" key. return null to indicate that there is no custom workflow document needed for this type.- Returns:
- the doc type name or null.
-
getWorkflowRoutingAttributes
Gets an unmodifiable list of attribute names identifying the attribute qualifiers that are provided to the KIM responsibility service when resolving responsibility-based routing at the node with the given name. Returns an empty list, indicating that no attributes from this type should be passed to workflow.- Parameters:
nodeName- the name of the node to retrieve attribute names for. Cannot be null or blank.- Returns:
- an unmodifiable list should not return null.
- Throws:
IllegalArgumentException- if the nodeName is null or blank.RiceIllegalArgumentException
-
getAttributeDefinitions
List<KimAttributeField> getAttributeDefinitions(String kimTypeId) throws RiceIllegalArgumentException Gets a List ofKimAttributeFieldfor a kim type id. The order of the attribute fields in the list can be used as a hint to a ui framework consuming these attributes as to how to organize these fields.- Parameters:
kimTypeId- the kimTypeId to retrieve fields for. Cannot be null or blank.- Returns:
- an immutable list of KimAttributeField. Will not return null.
- Throws:
IllegalArgumentException- if the kimTypeId is null or blankRiceIllegalArgumentException
-
validateAttributes
List<RemotableAttributeError> validateAttributes(String kimTypeId, Map<String, String> attributes) throws RiceIllegalArgumentExceptionThis method validates the passed in attributes for a kimTypeId generating a List ofRemotableAttributeError. The order of the attribute errors in the list can be used as a hint to a ui framework consuming these errors as to how to organize these errors.- Parameters:
kimTypeId- the kimTypeId that is associated with the attributes. Cannot be null or blank.attributes- the kim type attributes to validate. Cannot be null.- Returns:
- an immutable list of RemotableAttributeError. Will not return null.
- Throws:
IllegalArgumentException- if the kimTypeId is null or blank or the attributes are nullRiceIllegalArgumentException
-
validateAttributesAgainstExisting
List<RemotableAttributeError> validateAttributesAgainstExisting(String kimTypeId, Map<String, String> newAttributes, Map<String, throws RiceIllegalArgumentExceptionString> oldAttributes) This method validates the passed in attributes for a kimTypeId generating a List ofRemotableAttributeError. This method used the oldAttributes to aid in validation. This is useful for validating "new" or "updated" attributes. The order of the attribute errors in the list can be used as a hint to a ui framework consuming these errors as to how to organize these errors.- Parameters:
kimTypeId- the kimTypeId that is associated with the attributes. Cannot be null or blank.newAttributes- the kim type attributes to validate. Cannot be null.oldAttributes- the old kim type attributes to use for validation. Cannot be null.- Returns:
- an immutable list of RemotableAttributeError. Will not return null.
- Throws:
IllegalArgumentException- if the kimTypeId is null or blank or the newAttributes or oldAttributes are nullRiceIllegalArgumentException
-
validateUniqueAttributes
List<RemotableAttributeError> validateUniqueAttributes(String kimTypeId, Map<String, String> newAttributes, Map<String, throws RiceIllegalArgumentExceptionString> oldAttributes) This method validates the passed in attributes for a kimTypeId generating a List ofRemotableAttributeError. This method used the oldAttributes to aid in validation. This method specifically determines if attributes should be unique and verifying them against other attributes that have been set to determine uniqueness The order of the attribute errors in the list can be used as a hint to a ui framework consuming these errors as to how to organize these errors.- Parameters:
kimTypeId- the kimTypeId that is associated with the attributes. Cannot be null or blank.newAttributes- the kim type attributes to validate. Cannot be null.oldAttributes- the old kim type attributes to use for validation. Cannot be null.- Returns:
- an immutable list of RemotableAttributeError. Will not return null.
- Throws:
IllegalArgumentException- if the kimTypeId is null or blank or the newAttributes or oldAttributes are nullRiceIllegalArgumentException
-
validateUnmodifiableAttributes
List<RemotableAttributeError> validateUnmodifiableAttributes(String kimTypeId, Map<String, String> originalAttributes, Map<String, throws RiceIllegalArgumentExceptionString> newAttributes) This method validates the passed in attributes for a kimTypeId generating a List ofRemotableAttributeError. This method used the oldAttributes to aid in validation. This method specifically validates that the new attribute values have not been changed if they are unmodifiable. The order of the attribute errors in the list can be used as a hint to a ui framework consuming these errors as to how to organize these errors.- Parameters:
kimTypeId- the kimTypeId that is associated with the attributes. Cannot be null or blank.newAttributes- the kim type attributes to validate. Cannot be null.originalAttributes- the old kim type attributes to use for validation. Cannot be null.- Returns:
- an immutable list of RemotableAttributeError. Will not return null.
- Throws:
IllegalArgumentException- if the kimTypeId is null or blank or the newAttributes or oldAttributes are nullRiceIllegalArgumentException
-