@@ -108,7 +108,7 @@ public class RequestUserAction extends MutatingApiAction<RequestUserForm>
108108 @ Override
109109 public void validateForm (RequestUserForm form , Errors errors )
110110 {
111- Container mccContainer = MccManager .get ().getMCCContainer ();
111+ Container mccContainer = MccManager .get ().getMCCContainer (getContainer () );
112112 if (mccContainer == null )
113113 {
114114 errors .reject (ERROR_MSG , "The MCC project has not been set on this server. This is an administrator error." );
@@ -165,17 +165,17 @@ public Object execute(RequestUserForm form, BindException errors) throws Excepti
165165 row .put ("title" , form .getTitle ());
166166 row .put ("institution" , form .getInstitution ());
167167 row .put ("reason" , form .getReason ());
168- row .put ("container" , MccManager .get ().getMCCContainer ().getId ());
168+ row .put ("container" , MccManager .get ().getMCCContainer (getContainer () ).getId ());
169169
170170 Table .insert (UserManager .getGuestUser (), ti , row );
171171
172- Set <Address > emails = MccManager .get ().getNotificationUserEmails ();
172+ Set <Address > emails = MccManager .get ().getNotificationUserEmails (getContainer () );
173173 if (emails != null && !emails .isEmpty ())
174174 {
175175 try
176176 {
177177 MailHelper .MultipartMessage mail = MailHelper .createMultipartMessage ();
178- Container c = MccManager .get ().getMCCContainer ();
178+ Container c = MccManager .get ().getMCCContainer (getContainer () );
179179 if (c == null )
180180 {
181181 c = getContainer ();
@@ -299,7 +299,7 @@ public class ApproveUserRequestsAction extends MutatingApiAction<ApproveUserRequ
299299 @ Override
300300 public void validateForm (ApproveUserRequestsForm form , Errors errors )
301301 {
302- Container mccContainer = MccManager .get ().getMCCContainer ();
302+ Container mccContainer = MccManager .get ().getMCCContainer (getContainer () );
303303 if (mccContainer == null )
304304 {
305305 errors .reject (ERROR_MSG , "The MCC project has not been set on this server. This is an administrator error." );
@@ -390,7 +390,7 @@ public Object execute(ApproveUserRequestsForm form, BindException errors) throws
390390 allUsers .add (st .getUser ());
391391 }
392392
393- Container mccContainer = MccManager .get ().getMCCContainer ();
393+ Container mccContainer = MccManager .get ().getMCCContainer (getContainer () );
394394 for (User u : existingUsersGivenAccess )
395395 {
396396 boolean isLDAP = AuthenticationManager .isLdapEmail (new ValidEmail (u .getEmail ()));
@@ -460,7 +460,7 @@ public class RequestHelpAction extends MutatingApiAction<RequestHelpForm>
460460 @ Override
461461 public void validateForm (RequestHelpForm form , Errors errors )
462462 {
463- Container mccContainer = MccManager .get ().getMCCContainer ();
463+ Container mccContainer = MccManager .get ().getMCCContainer (getContainer () );
464464 if (mccContainer == null )
465465 {
466466 errors .reject (ERROR_MSG , "The MCC project has not been set on this server. This is an administrator error." );
@@ -487,7 +487,7 @@ public void validateForm(RequestHelpForm form, Errors errors)
487487 @ Override
488488 public Object execute (RequestHelpForm form , BindException errors ) throws Exception
489489 {
490- Set <Address > emails = MccManager .get ().getNotificationUserEmails ();
490+ Set <Address > emails = MccManager .get ().getNotificationUserEmails (getContainer () );
491491 if (emails != null && !emails .isEmpty ())
492492 {
493493 try
@@ -568,7 +568,7 @@ public boolean handlePost(Object o, BindException errors) throws Exception
568568 }
569569
570570 // Ensure groups have target roles:
571- Container requestContainer = MccManager .get ().getMCCRequestContainer ();
571+ Container requestContainer = MccManager .get ().getMCCRequestContainer (getContainer () );
572572 if (requestContainer != null )
573573 {
574574 Group requestGroup = GroupManager .getGroup (ContainerManager .getRoot (), MccManager .REQUEST_GROUP_NAME , GroupEnumType .SITE );
@@ -604,7 +604,7 @@ public boolean handlePost(Object o, BindException errors) throws Exception
604604 }
605605 }
606606
607- Container dataContainer = MccManager .get ().getMCCContainer ();
607+ Container dataContainer = MccManager .get ().getMCCContainer (getContainer () );
608608 if (dataContainer != null )
609609 {
610610 Group adminGroup = GroupManager .getGroup (ContainerManager .getRoot (), MccManager .ADMIN_GROUP_NAME , GroupEnumType .SITE );
@@ -622,13 +622,13 @@ public boolean handlePost(Object o, BindException errors) throws Exception
622622 @ Override
623623 public void validateCommand (Object o , Errors errors )
624624 {
625- Container mccContainer = MccManager .get ().getMCCContainer ();
625+ Container mccContainer = MccManager .get ().getMCCContainer (getContainer () );
626626 if (mccContainer == null )
627627 {
628628 errors .reject (ERROR_MSG , "The MCC data container property has not been set" );
629629 }
630630
631- Container requestContainer = MccManager .get ().getMCCRequestContainer ();
631+ Container requestContainer = MccManager .get ().getMCCRequestContainer (getContainer () );
632632 if (requestContainer == null )
633633 {
634634 errors .reject (ERROR_MSG , "The MCC request container property has not been set" );
@@ -760,7 +760,7 @@ public Object execute(NotifyReviewersForm form, BindException errors) throws Exc
760760 mail .setFrom ("mcc-do-not-reply@ohsu.edu" );
761761 mail .setSubject ("MCC Animal Request Reviews" );
762762
763- Container rc = MccManager .get ().getMCCRequestContainer ();
763+ Container rc = MccManager .get ().getMCCRequestContainer (getContainer () );
764764 DetailsURL url = DetailsURL .fromString ("/mcc/rabRequestReview.view" , rc );
765765 mail .setEncodedHtmlContent ("You have been assigned one or more MCC Animal Requests to review. <a href=\" " + AppProps .getInstance ().getBaseServerUrl () + url .getActionURL () + "\" >Please click here to view and complete these assignments</a>" );
766766 mail .addRecipients (Message .RecipientType .BCC , emails .toArray (new Address [0 ]));
0 commit comments