Package org.butor.json

Examples of org.butor.json.CommonRequestArgs


  }

  @Override
  @Transactional
  public void updateRole(Context ctx, Role role) {
    CommonRequestArgs cra = ctx.getRequest();
    if (Strings.isNullOrEmpty(role.getId())) {
      ApplicationException.exception(
          CommonMessageID.MISSING_ARG.getMessage("roleId"));
    }
    if (Strings.isNullOrEmpty(role.getDescription())) {
View Full Code Here


  }

  @Override
  @Transactional
  public void deleteRole(Context ctx, RoleKey roleKey) {
    CommonRequestArgs cra = ctx.getRequest();
    if (!authDao.hasAccess(systemId, secFunc, AccessMode.WRITE, cra)) {
      ApplicationException.exception(DAOMessageID.UNAUTHORIZED.getMessage());
    }
    roleKey.setIdType("role");
    if (roleDao.isRoleRefered(roleKey.getId(), cra)) {
View Full Code Here

  private AuthModel authModel;
  private SqlQueryGenerator sqlQueryGenerator;

  @Override
  public void generateSqlQuery(Context ctx, String sqlCall) {
    CommonRequestArgs cra = ctx.getRequest();
    if (!authModel.hasAccess(PortalConstants.SYSTEM_ID, PortalConstants.SEC_FUNC_PORTAL_SUPPORT, AccessMode.READ, cra)) {
      ApplicationException.exception(DAOMessageID.UNAUTHORIZED.getMessage());
    }
    ResponseHandler<Object> rh = ctx.getResponseHandler();
    if (Strings.isNullOrEmpty(sqlCall)) {
View Full Code Here

  private AttrSetDao attrSetDao;

  @Override
  public void readProfile(Context<AttrSet> ctx) {
    ResponseHandler<AttrSet> rh = ctx.getResponseHandler();
    CommonRequestArgs cra = ctx.getRequest();
    List<AttrSet> profile = readProfile(cra);
    ResponseHandlerHelper.addList(profile, rh);
  }
View Full Code Here

  }

  @Override
  public void updateAttr(Context<AttrSet> ctx, AttrSet attr) {
    ResponseHandler<AttrSet> rh = ctx.getResponseHandler();
    CommonRequestArgs cra = ctx.getRequest();
    AttrSet as = updateAttr(attr, cra);
    rh.addRow(as);
  }
View Full Code Here

  }


  @Override
  public void deleteAttr(Context ctx, AttrSet attr) {
    CommonRequestArgs cra = ctx.getRequest();
    deleteAttr(attr, cra);
  }
View Full Code Here

import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;

public class AuthDaoWithHistoryImpl extends org.butor.auth.dao.AuthDaoImpl implements DaoWithHistory {
  @Override
  public Object getRowForHistory(MapSqlParameterSource params) {
    CommonRequestArgs cra = new CommonRequestArgs();
    cra.setUserId((String)params.getValue("userId"));
    cra.setLang((String)params.getValue("lang"));
    cra.setReqId((String)params.getValue("reqId"));
    cra.setSessionId((String)params.getValue("sessionId"));

    int authId = (Integer)params.getValue("authId");
    return readAuth(authId, cra);
  }
View Full Code Here

import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;

public class DescDaoWithHistoryImpl extends org.butor.auth.dao.DescDaoImpl implements DaoWithHistory {
  @Override
  public Object getRowForHistory(MapSqlParameterSource params) {
    CommonRequestArgs cra = new CommonRequestArgs();
    cra.setUserId((String)params.getValue("userId"));
    cra.setLang((String)params.getValue("lang"));
    cra.setReqId((String)params.getValue("reqId"));
    cra.setSessionId((String)params.getValue("sessionId"));

    String idType = (String)params.getValue("idType");
    String id = (String)params.getValue("id");
    DescKey dk = new DescKey(id, idType);
    return readDesc(dk, cra);
View Full Code Here

      ctx_.getResponseHandler().addMessage(new Message(0, MessageType.ERROR, msg));
      return;
    }

    try {
      final CommonRequestArgs cr = new CommonRequestArgs();
      cr.setLang(req.getLang());
      cr.setReqId(req.getReqId());
      cr.setSessionId(req.getSessionId());
      cr.setUserId(req.getUserId());
      Context ctx = new Context() {
        @Override
        public ResponseHandler<?> getResponseHandler() {
          return ctx_.getResponseHandler();
        }
View Full Code Here

    }
  }
 
 
  private CommonRequestArgs createCommonRequestArgs() {
    CommonRequestArgs newReq = new CommonRequestArgs();
    BeanUtils.copyProperties(cra,newReq);
    String oriRequestId = cra.getReqId();
    newReq.setReqId(oriRequestId+"-"+reqIdSeq++);
    return newReq;
  }
View Full Code Here

TOP

Related Classes of org.butor.json.CommonRequestArgs

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.