Package com.centraview.administration.authorization

Examples of com.centraview.administration.authorization.SecurityProfileList


   * @param list
   * @return CustomViewList
   */
  public SecurityProfileList createEmptyObject(SecurityProfileList list)
  {
    SecurityProfileList dummy = new SecurityProfileList();
    dummy.setListType(list.getListType());
    dummy.setPrimaryMemberType(list.getPrimaryMemberType());
    dummy.setPrimaryTable(list.getPrimaryTable());
    dummy.setSortMember(list.getSortMember());
    dummy.setSortType(list.getSortType());
    dummy.setPrimaryMember(list.getPrimaryMember());
    dummy.setStartAT(list.getStartAT());
    dummy.setEndAT(list.getEndAT());
    dummy.setBeginIndex(0);
    dummy.setEndIndex(0);

    return dummy;
  }// end of createEmptyObject*/
 
View Full Code Here


  public SecurityProfileList getSecurityProfileList(int userID, int startATparam, int EndAtparam,
      String searchString, String sortColumn)
  {
    if ((searchString != null) && ((searchString.trim()).length() > 0)) {
      SecurityProfileList dl = new SecurityProfileList();
      dl.setStartAT(startATparam);
      dl.setEndAT(EndAtparam);
      dl.setSortMember(sortColumn);
      dl.setSortType('A');
      dl.setSearchString(searchString);
      dl.setListType("SecurityProfile");

      long currentListID = this.getNextListID();
      dl.setListID(currentListID);

      displayLists.put(new Long(currentListID), dl);

      return this.getSecurityProfileList(userID, dl);

    } else {
      SecurityProfileList returnDL = null;
      try {
        HashMap hm = new HashMap();
        hm.put("startATparam", new Integer(startATparam));
        hm.put("EndAtparam", new Integer(EndAtparam));
        hm.put("searchString", searchString);
        hm.put("sortmem", sortColumn);
        hm.put("sortType", new Character('A'));
        HashMap listMap = null;

        try {

          AuthorizationHome aa = (AuthorizationHome)CVUtility.getHomeObject(
              "com.centraview.administration.authorization.AuthorizationHome", "Authorization");
          Authorization remote = (Authorization)aa.create();
          remote.setDataSource(this.dataSource);

          returnDL = remote.getSecurityProfileList(userID, hm);

        } catch (Exception e) {
          System.out.println("[Exception][MarketingListEJB] Exception thrown in x: " + e);
        }

        returnDL.setListType("SecurityProfile");
        returnDL.setTotalNoOfRecords(returnDL.size());

        long currentListID = this.getNextListID();
        returnDL.setListID(currentListID);
        returnDL.setStartAT(startATparam);
        returnDL.setEndAT(EndAtparam);

        SecurityProfileList emptyDL = createEmptyObject(returnDL);
        emptyDL.setTotalNoOfRecords(returnDL.getTotalNoOfRecords());
        emptyDL.setListID(currentListID);
        emptyDL.setListType("SecurityProfile");
        emptyDL.setStartAT(returnDL.getStartAT());
        emptyDL.setEndAT(returnDL.getEndAT());

        displayLists.put(new Long(currentListID), emptyDL);
      } catch (Exception e) {
        e.printStackTrace();
      }
View Full Code Here

   * @return CustomViewList
   */
  public SecurityProfileList getSecurityProfileList(int userid, DisplayList DLparam)
  {

    SecurityProfileList returnDL = null;
    SecurityProfileList paramDL = (SecurityProfileList)DLparam;

    int listSize = paramDL.getTotalNoOfRecords();
    int startAT = paramDL.getStartAT();
    int EndAt = paramDL.getEndAT();

    String powerString = paramDL.getPowerString();
    String searchString = paramDL.getSearchString();
    String sortColumn = paramDL.getSortMember();

    HashMap hm = new HashMap();
    hm.put("startATparam", new Integer(Math.max(startAT - 100, 1)));
    hm.put("EndAtparam", new Integer(Math.min(EndAt + 100, listSize)));
    hm.put("searchString", searchString);
    hm.put("sortmem", paramDL.getSortMember());
    hm.put("sortType", new Character(paramDL.getSortType()));

    try {
      AuthorizationHome aa = (AuthorizationHome)CVUtility.getHomeObject(
          "com.centraview.administration.authorization.AuthorizationHome", "Authorization");
      Authorization remote = (Authorization)aa.create();
      remote.setDataSource(this.dataSource);
      returnDL = remote.getSecurityProfileList(userid, hm);

    } catch (Exception e) {
      System.out.println("[Exception][MarketingListEJB] Exception thrown in x: " + e);
    }

    returnDL.setListType("SecurityProfile");
    returnDL.setListID(paramDL.getListID());
    returnDL.setStartAT(paramDL.getStartAT());
    returnDL.setEndAT(paramDL.getEndAT());
    returnDL.setSortType(paramDL.getSortType());
    returnDL.setSearchString(searchString);

    returnDL.setPowerString(powerString);

    if (searchString != null && searchString.startsWith("SIMPLE :"))
View Full Code Here

TOP

Related Classes of com.centraview.administration.authorization.SecurityProfileList

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.