Package org.xdams.user.bean

Examples of org.xdams.user.bean.UserBean


    String physDoc = MyRequest.getParameter("physDoc", parameterMap);
    UploadBean uploadBean = (UploadBean) modelMap.get("uploadBean");
    List<String> confControl = new ArrayList<String>();
    confControl.add("upload");
    try {
      UserBean userBean = (UserBean) modelMap.get("userBean");
      confBean = (ConfBean) modelMap.get("confBean");
      WorkFlowBean workFlowBean = (WorkFlowBean) modelMap.get("workFlowBean");
      xwconn = connectionManager.getConnection(workFlowBean.getArchive());
      MultiEditingManager editingManager = new MultiEditingManager(parameterMap, confBean, userBean, workFlowBean);
      editingManager.setTheXML(new XMLBuilder(xwconn.getSingleXMLFromNumDoc(Integer.parseInt(physDoc)), "ISO-8859-1"));
      confBean = editingManager.rewriteMultipleConf(confControl);
      LoadUploadBean.loadUploadBean(uploadBean, confBean.getTheXMLConfUpload(), modelMap);
      System.out.println(uploadBean);
      // da prendere dentro workflowBean
      String archiveName = workFlowBean.getAlias();
      String domainName = userBean.getAccountRef();
      for (int i = 0; i < uploadBean.getCommandLine().size(); i++) {
        UploadCommandLine uploadCommandLine = uploadBean.getCommandLine().get(i);
        try {
          File fileUploadTempPath = new File(uploadCommandLine.getUploadTempPath());
          if (!(fileUploadTempPath.exists())) {
View Full Code Here


    XWConnection xwconn = null;
    ConnectionManager connectionManager = new ConnectionManager();
    ConfBean confBean = null;
    HttpServletRequest request = null;
    try {
      UserBean userBean = (UserBean) modelMap.get("userBean");
      confBean = (ConfBean) modelMap.get("confBean");
      WorkFlowBean workFlowBean = (WorkFlowBean) modelMap.get("workFlowBean");
      String thePne = workFlowBean.getArchive().getPne();
      request = workFlowBean.getRequest();
      MyRequest myRequest = new MyRequest(request);
View Full Code Here

    String pathToView = MyRequest.getParameter("pathToView", parameterMap);
    UploadBean uploadBean = (UploadBean) modelMap.get("uploadBean");
    List<String> confControl = new ArrayList<String>();
    confControl.add("upload");
    try {
      UserBean userBean = (UserBean) modelMap.get("userBean");
      confBean = (ConfBean) modelMap.get("confBean");
      WorkFlowBean workFlowBean = (WorkFlowBean) modelMap.get("workFlowBean");
      xwconn = connectionManager.getConnection(workFlowBean.getArchive());
      MultiEditingManager editingManager = new MultiEditingManager(parameterMap, confBean, userBean, workFlowBean);
      editingManager.setTheXML(new XMLBuilder(xwconn.getSingleXMLFromNumDoc(Integer.parseInt(physDoc)), "ISO-8859-1"));
View Full Code Here

  private XMLBuilder theXMLDoc = null;

  public int doStartTag() {
    try {
      ConfBean confBean = (ConfBean) pageContext.findAttribute("confBean");
      UserBean userBean = (UserBean) pageContext.findAttribute("userBean");
      JspWriter out = pageContext.getOut();
      // media.conf.xml
      XMLBuilder theXMLConfMedia = confBean.getTheXMLConfMedia();
      MediaBean mediaBean = new MediaBean();
      //System.out.println("AttachmentViewer.doStartTag() "+getMediaBuilder().getXML("ISO-8859-1"));
View Full Code Here

  public void userLoad(Model model) {
    if (!model.containsAttribute("userBean")) {
      UserDetails userDetails = null;
      try {
        userDetails = (UserDetails) ((SecurityContext) SecurityContextHolder.getContext()).getAuthentication().getPrincipal();
        UserBean userBean = LoadUserManager.executeLoad(userDetails, authenticationType);
        model.addAttribute("userBean", userBean);
      } catch (Exception e) {

      }
    }
View Full Code Here

  public int doStartTag() {
    try {

      ConfBean confBean = (ConfBean) pageContext.findAttribute("confBean");

      UserBean userBean = (UserBean) pageContext.findAttribute("userBean");

      ViewBean viewBean = (ViewBean) pageContext.findAttribute("viewBean");

      EditingBean editingBean = (EditingBean) pageContext.findAttribute("editingBean");
View Full Code Here

        userDetails = (UserDetails) ((SecurityContext) SecurityContextHolder.getContext()).getAuthentication().getPrincipal();
        if (authenticationType.isLoadUserSpeedUp()) {
          String xmlUsers = ConfManager.getConfString(userDetails.getAccount() + "-security/users.xml");
          String xmlArchives = ConfManager.getConfString(userDetails.getAccount() + "-security/accounts.xml");
          String xmlrole = ConfManager.getConfString(userDetails.getAccount() + "-security/role.xml");
          UserBean userBean = LoadUserSpeedUp.loadUserByString(xmlUsers, xmlArchives, xmlrole, userDetails.getId(), userDetails.getAccount());
          model.addAttribute("userBean", userBean);
        } else {
          XMLBuilder xmlUsers = ConfManager.getConfXML(userDetails.getAccount() + "-security/users.xml");
          XMLBuilder xmlArchives = ConfManager.getConfXML(userDetails.getAccount() + "-security/accounts.xml");
          XMLBuilder xmlrole = ConfManager.getConfXML(userDetails.getAccount() + "-security/role.xml");
          UserBean userBean = LoadUser.loadUser(xmlUsers, xmlArchives, xmlrole, userDetails.getId(), userDetails.getAccount());
          model.addAttribute("userBean", userBean);
        }
      } catch (Exception e) {

      }
View Full Code Here

  public int doStartTag() {
    try {

      ConfBean confBean = (ConfBean) pageContext.findAttribute("confBean");

      UserBean userBean = (UserBean) pageContext.findAttribute("userBean");

      ViewBean viewBean = (ViewBean) pageContext.findAttribute("viewBean");

      WorkFlowBean workFlowBean = (WorkFlowBean) pageContext.findAttribute("workFlowBean");
View Full Code Here

public class LoadUser {

  public static UserBean loadUser(XMLBuilder xmlUsers, XMLBuilder xmlArchives, XMLBuilder xmlrole, String username, String account) {

    UserBean userBean = new UserBean();
    try {
      userBean.setName(xmlUsers.valoreNodo("/root/user[@id='" + username + "' and @account='" + account + "']/@name"));
      userBean.setLastName(xmlUsers.valoreNodo("/root/user[@id='" + username + "' and @account='" + account + "']/@lastName"));
      userBean.setId(xmlUsers.valoreNodo("/root/user[@id='" + username + "' and @account='" + account + "']/@id"));
      userBean.setEmail(xmlUsers.valoreNodo("/root/user[@id='" + username + "' and @account='" + account + "']/@email"));
      userBean.setLanguage(xmlUsers.valoreNodo("/root/user[@id='" + username + "' and @account='" + account + "']/@language"));
      userBean.setAccountRef(xmlUsers.valoreNodo("/root/user[@id='" + username + "' and @account='" + account + "']/@account"));
      userBean.setFatherAccountRef(xmlUsers.valoreNodo("/root/user[@id='" + username + "' and @account='" + account + "']/@fatherAccount"));
      userBean.setPwd(xmlUsers.valoreNodo("/root/user[@id='" + username + "' and @account='" + account + "']/@pwd"));
      userBean.setRole(xmlUsers.valoreNodo("/root/user[@id='" + username + "' and @account='" + account + "']/@role"));
      int countArchiveUser = xmlUsers.contaNodi("/root/user[@id='" + username + "' and @account='" + account + "']/archive");
      for (int i = 0; i < countArchiveUser; i++) {
        Archive archive = new Archive();
        String archAliasUser = xmlUsers.valoreNodo("/root/user[@id='" + username + "' and @account='" + account + "']/archive[" + (i + 1) + "]/@alias");
        String archAlias = xmlArchives.valoreNodo("/root/account[@id='" + account + "']/archiveGroup/archive[@alias='" + archAliasUser + "']/@alias");
        if (archAlias.equals(archAliasUser)) {
          String archGrp = xmlArchives.valoreNodo("/root/account[@id='" + account + "']/archiveGroup[child::archive/@alias='" + archAlias + "']/@name");
          archive.setGroupName(archGrp);
          archive.setRole(xmlUsers.valoreNodo("/root/user[@id='" + username + "' and @account='" + account + "']/archive[@alias='" + archAlias + "']/@role"));
          archive.setArchiveDescr(xmlArchives.valoreNodo("/root/account[@id='" + account + "']/archiveGroup/archive[@alias='" + archAlias + "']/text()"));
          archive.setAlias(archAlias);
          archive.setHost(xmlArchives.valoreNodo("/root/account[@id='" + account + "']/archiveGroup/archive[@alias='" + archAlias + "']/@host"));
          archive.setIco(xmlArchives.valoreNodo("/root/account[@id='" + account + "']/archiveGroup/archive[@alias='" + archAlias + "']/@ico"));
          archive.setPne(xmlArchives.valoreNodo("/root/account[@id='" + account + "']/archiveGroup/archive[@alias='" + archAlias + "']/@pne"));
          archive.setPort(xmlArchives.valoreNodo("/root/account[@id='" + account + "']/archiveGroup/archive[@alias='" + archAlias + "']/@port"));
          archive.setWebapp(xmlArchives.valoreNodo("/root/account[@id='" + account + "']/archiveGroup/archive[@alias='" + archAlias + "']/@webapp"));
          archive.setType(xmlArchives.valoreNodo("/root/account[@id='" + account + "']/archiveGroup/archive[@alias='" + archAlias + "']/@type"));
          userBean.putArchives(archAlias, archive);
          userBean.addArchives(archive);
        }
      }
      Account accountBean = new Account();
      accountBean.setDescrAccount(xmlArchives.valoreNodo("/root/account[@id='" + account + "']/@descrAccount"));
      accountBean.setId(xmlArchives.valoreNodo("/root/account[@id='" + account + "']/@id"));
      accountBean.setFatherAccount(xmlArchives.valoreNodo("/root/account[@id='" + account + "']/@fatherAccount"));
      userBean.setAccount(accountBean);
     
     
      if (userBean.getAccount().equals("") || userBean.getId().equals("")) {
        return null;
      }

      System.out.println(userBean);
View Full Code Here

    return returnValue;
  }

  public static UserBean loadUserByString(String xmlUsers, String xmlArchives, String xmlrole, String username, String account) {

    UserBean userBean = new UserBean();
    try {

      xmlUsers = xmlUsers.replaceAll("(?s)<!--.*?-->", "");
      xmlArchives = xmlArchives.replaceAll("(?s)<!--.*?-->", "");

      String myUser = extractUser(username, account, xmlUsers)[0];
      String myUserAttribute = extractUser(username, account, xmlUsers)[1];
      Account accountBean = new Account();
      Map<String, Archive> archiveAllMap = extractArchiveList(account, xmlArchives, accountBean);
      List<Archive> archiveUserList = extractArchiveUserList(username, account, myUser);
//      System.out.println(myUser);
//System.out.println(myUserAttribute);
      userBean.setName(valueAttribute(myUserAttribute, "name"));
      userBean.setLastName(valueAttribute(myUserAttribute, "lastName"));
      userBean.setId(valueAttribute(myUserAttribute, "id"));
      userBean.setEmail(valueAttribute(myUserAttribute, "email"));
      userBean.setLanguage(valueAttribute(myUserAttribute, "language"));
      userBean.setAccountRef(valueAttribute(myUserAttribute, "account"));
      userBean.setFatherAccountRef(valueAttribute(myUserAttribute, "fatherAccount"));
      userBean.setPwd(valueAttribute(myUserAttribute, "pwd"));
      userBean.setRole(valueAttribute(myUserAttribute, "role"));

      for (Archive archive : archiveUserList) {
        String archAlias = archive.getAlias();
        if (archiveAllMap.containsKey(archAlias)) {
          Archive archiveNew = archiveAllMap.get(archAlias);
          archiveNew.setRole(archive.getRole());
          userBean.putArchives(archAlias, archiveNew);
          userBean.addArchives(archiveNew);
        }
      }
      userBean.setAccount(accountBean);
      if (userBean.getAccount().equals("") || userBean.getId().equals("")) {
        return null;
      }

//      System.out.println(userBean);
      return userBean;
View Full Code Here

TOP

Related Classes of org.xdams.user.bean.UserBean

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.