org.kuali.kfs.sec.document
Class SecurityModelMaintainableImpl

java.lang.Object
  extended by org.kuali.rice.kns.maintenance.KualiMaintainableImpl
      extended by org.kuali.kfs.sys.document.FinancialSystemMaintainable
          extended by org.kuali.kfs.sec.document.SecurityModelMaintainableImpl
All Implemented Interfaces:
Serializable, org.kuali.rice.kns.lookup.SelectiveReferenceRefresher, org.kuali.rice.kns.maintenance.Maintainable

public class SecurityModelMaintainableImpl
extends FinancialSystemMaintainable

Maintainable implementation for the Security Model maintenance document. Hooks into Post processing to create a KIM role from Model and assigns users/permissions to role based on Model

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
boClass, businessObject, businessObjectAuthorizationService, businessObjectDictionaryService, businessObjectMetaDataService, businessObjectService, dataDictionaryService, docTypeName, documentHelperService, documentNumber, encryptionService, inactiveRecordDisplay, maintenanceAction, maintenanceDocumentDictionaryService, maintenanceDocumentService, newCollectionLines, persistenceStructureService, personService
 
Constructor Summary
SecurityModelMaintainableImpl()
           
 
Method Summary
protected  void assignOrUpdateModelMembers(SecurityModel securityModel)
          Iterates through the model member list and assign members to the model role or updates the membership
protected  void assignOrUpdateModelMembershipToDefinitionRoles(SecurityModel oldSecurityModel, SecurityModel newSecurityModel, boolean newMaintenanceAction)
          Iterates through the model definition list and assigns the model role to the definition role if necessary or updates the current member assignment
protected  void createOrUpdateModelRole(SecurityModel oldSecurityModel, SecurityModel newSecurityModel)
          Creates a new role for the model (if the model is new), otherwise updates the role
protected  void createPrincipalSecurityRecords(String memberId, String memberTypeCode)
          Creates security principal records for model members (if necessary) so that they will appear on security principal lookup for editing
 void doRouteStatusChange(org.kuali.rice.kns.bo.DocumentHeader documentHeader)
           
protected  void inactivateModelRole(SecurityModel newSecurityModel)
          Saves the given security model setting the active indicator to false
protected  boolean isDefinitionInModel(String definitionName, SecurityModel securityModel)
          Determines whether the given definition is part of the SecurityModel associated definitions
 void processAfterCopy(org.kuali.rice.kns.document.MaintenanceDocument document, Map<String,String[]> parameters)
          Override to clear out KIM role id on copy
 void refresh(String refreshCaller, Map fieldValues, org.kuali.rice.kns.document.MaintenanceDocument document)
           
 
Methods inherited from class org.kuali.kfs.sys.document.FinancialSystemMaintainable
answerSplitNodeQuestion, populateChartOfAccountsCodeFields, processAfterPost, processBeforeAddLine, refreshReferences
 
Methods inherited from class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
addMultipleValueLookupResults, addNewLineToCollection, clearBusinessObjectOfRestrictedValues, clearCollectionRestrictedValues, clearFieldRestrictedValues, decryptEncryptedData, deleteBusinessObject, generateAllAffectedReferences, generateMaintenanceLocks, getAffectedReferencesFromLookup, getAllRefreshableReferences, getBoClass, getBusinessObject, getBusinessObjectAuthorizationService, getBusinessObjectDictionaryService, getBusinessObjectMetaDataService, getBusinessObjectService, getCoreSections, getCustomLockDescriptor, getDataDictionaryService, getDocumentHelperService, getDocumentTitle, getDocumentTypeName, getDuplicateIdentifierFieldsFromDataDictionary, getEncryptionService, getInactiveRecordDisplay, getLockingDocumentId, getMaintainableTitle, getMaintenanceAction, getMaintenanceDocumentDictionaryService, getMaintenanceDocumentService, getMultiValueIdentifierList, getNewCollectionLine, getPersistenceStructureService, getPersonService, getSections, getShowInactiveRecords, getWorkflowEngineDocumentIdsToLock, hasBusinessObjectExisted, initNewCollectionLine, isBoNotesEnabled, isExternalBusinessObject, isOldBusinessObjectInDocument, isRelationshipRefreshable, performCollectionForceUpperCase, performFieldForceUpperCase, performFieldForceUpperCase, performForceUpperCase, populateBusinessObject, populateNewCollectionLines, populateNewSubCollectionLines, prepareBusinessObject, prepareBusinessObjectForAdditionFromMultipleValueLookup, prepareForSave, processAfterAddLine, processAfterEdit, processAfterNew, processAfterRetrieve, saveBusinessObject, setBoClass, setBusinessObject, setDocumentNumber, setGenerateBlankRequiredValues, setGenerateDefaultValues, setMaintenanceAction, setNewCollectionLineDefaultValues, setShowInactiveRecords, setupNewFromExisting, shouldFieldBeEncrypted, useCustomLockDescriptors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityModelMaintainableImpl

public SecurityModelMaintainableImpl()
Method Detail

refresh

public void refresh(String refreshCaller,
                    Map fieldValues,
                    org.kuali.rice.kns.document.MaintenanceDocument document)
Specified by:
refresh in interface org.kuali.rice.kns.maintenance.Maintainable
Overrides:
refresh in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
See Also:
KualiMaintainableImpl.refresh(java.lang.String, java.util.Map, org.kuali.rice.kns.document.MaintenanceDocument)

doRouteStatusChange

public void doRouteStatusChange(org.kuali.rice.kns.bo.DocumentHeader documentHeader)
Specified by:
doRouteStatusChange in interface org.kuali.rice.kns.maintenance.Maintainable
Overrides:
doRouteStatusChange in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
See Also:
KualiMaintainableImpl.doRouteStatusChange(org.kuali.rice.kns.bo.DocumentHeader)

createOrUpdateModelRole

protected void createOrUpdateModelRole(SecurityModel oldSecurityModel,
                                       SecurityModel newSecurityModel)
Creates a new role for the model (if the model is new), otherwise updates the role

Parameters:
oldSecurityModel - SecurityModel record before updates
newSecurityModel - SecurityModel after updates

inactivateModelRole

protected void inactivateModelRole(SecurityModel newSecurityModel)
Saves the given security model setting the active indicator to false

Parameters:
newSecurityModel - SecurityModel to inactivate

assignOrUpdateModelMembershipToDefinitionRoles

protected void assignOrUpdateModelMembershipToDefinitionRoles(SecurityModel oldSecurityModel,
                                                              SecurityModel newSecurityModel,
                                                              boolean newMaintenanceAction)
Iterates through the model definition list and assigns the model role to the definition role if necessary or updates the current member assignment

Parameters:
oldSecurityModel - SecurityModel record before updates
newSecurityModel - SecurityModel whose membership should be updated
newMaintenanceAction - boolean indicating whether this is a new record (old side will not contain data)

assignOrUpdateModelMembers

protected void assignOrUpdateModelMembers(SecurityModel securityModel)
Iterates through the model member list and assign members to the model role or updates the membership

Parameters:
securityModel - SecurityModel whose member list should be updated

createPrincipalSecurityRecords

protected void createPrincipalSecurityRecords(String memberId,
                                              String memberTypeCode)
Creates security principal records for model members (if necessary) so that they will appear on security principal lookup for editing

Parameters:
memberId - String member id of model role
memberTypeCode - String member type code for member

isDefinitionInModel

protected boolean isDefinitionInModel(String definitionName,
                                      SecurityModel securityModel)
Determines whether the given definition is part of the SecurityModel associated definitions

Parameters:
definitionName - name of definition to look for
securityModel - SecurityModel to check
Returns:
boolean true if the definition is in the security model, false if not

processAfterCopy

public void processAfterCopy(org.kuali.rice.kns.document.MaintenanceDocument document,
                             Map<String,String[]> parameters)
Override to clear out KIM role id on copy

Specified by:
processAfterCopy in interface org.kuali.rice.kns.maintenance.Maintainable
Overrides:
processAfterCopy in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
See Also:
KualiMaintainableImpl.processAfterCopy(org.kuali.rice.kns.document.MaintenanceDocument, java.util.Map)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.