Search in sources :

Example 1 with CenterSearchInput

use of org.mifos.dto.screen.CenterSearchInput in project head by mifos.

the class GroupTransferAction method loadParents.

@TransactionDemarcate(joinToken = true)
public ActionForward loadParents(ActionMapping mapping, @SuppressWarnings("unused") ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    CenterSearchInput centerSearchInput = new CenterSearchInput();
    centerSearchInput.setOfficeId(getUserContext(request).getBranchId());
    centerSearchInput.setGroupInput(GroupConstants.GROUP_TRANSFER_INPUT);
    SessionUtils.setAttribute(GroupConstants.CENTER_SEARCH_INPUT, centerSearchInput, request.getSession());
    return mapping.findForward(ActionForwards.loadParents_success.toString());
}
Also used : CenterSearchInput(org.mifos.dto.screen.CenterSearchInput) TransactionDemarcate(org.mifos.framework.util.helpers.TransactionDemarcate)

Example 2 with CenterSearchInput

use of org.mifos.dto.screen.CenterSearchInput in project head by mifos.

the class GroupServiceFacadeWebTier method isCenterHierarchyConfigured.

@Override
public CenterHierarchySearchDto isCenterHierarchyConfigured() {
    MifosUser user = (MifosUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    UserContext userContext = toUserContext(user);
    boolean isCenterHierarchyExists = ClientRules.getCenterHierarchyExists();
    CenterSearchInput searchInputs = new CenterSearchInput(userContext.getBranchId(), GroupConstants.CREATE_NEW_GROUP);
    return new CenterHierarchySearchDto(isCenterHierarchyExists, searchInputs);
}
Also used : UserContext(org.mifos.security.util.UserContext) CenterHierarchySearchDto(org.mifos.dto.screen.CenterHierarchySearchDto) MifosUser(org.mifos.security.MifosUser) CenterSearchInput(org.mifos.dto.screen.CenterSearchInput)

Aggregations

CenterSearchInput (org.mifos.dto.screen.CenterSearchInput)2 CenterHierarchySearchDto (org.mifos.dto.screen.CenterHierarchySearchDto)1 TransactionDemarcate (org.mifos.framework.util.helpers.TransactionDemarcate)1 MifosUser (org.mifos.security.MifosUser)1 UserContext (org.mifos.security.util.UserContext)1