Ejemplo n.º 1
0
  /**
   * Create the original set of ProtocolBase Users for a new ProtocolBase Document. The creator the
   * protocol is assigned to the PROTOCOL_AGGREGATOR role.
   */
  @Override
  protected void initialDocumentSave(KualiDocumentFormBase form) throws Exception {

    // Assign the creator of the protocol the AGGREGATOR role.
    ProtocolFormBase protocolForm = (ProtocolFormBase) form;
    ProtocolDocumentBase doc = protocolForm.getProtocolDocument();
    String userId = GlobalVariables.getUserSession().getPrincipalId();

    // hack to indicate whether to send the Protocol Created notification later
    protocolForm.setShowNotificationEditor(true);

    initialDocumentSaveAddRolesHook(userId, doc.getProtocol());

    // Add the users defined in the access control list for the protocol's lead unit
    Permissionable permissionable = protocolForm.getProtocolDocument().getProtocol();
    UnitAclLoadService unitAclLoadService = getUnitAclLoadService();
    unitAclLoadService.loadUnitAcl(permissionable, userId);

    // moved      sendNotification(protocolForm);
  }
Ejemplo n.º 2
0
 protected List<String> getUnitRulesMessages(ProtocolDocumentBase protocolDoc) {
   KrmsRulesExecutionService rulesService =
       KcServiceLocator.getService(KrmsRulesExecutionService.class);
   return rulesService.processUnitValidations(
       protocolDoc.getProtocol().getLeadUnitNumber(), protocolDoc);
 }