Package crushftp.handlers

Examples of crushftp.handlers.Common


    attributes.put("storageconsumed",fileData.length()+"");
    attributes.put("version",fiop[1]);
    attributes.put("f1version",fiop[1]);
    attributes.remove("localversion");

    Common common_code = new Common();
    common_code.writeXMLObject(home+"users/"+credentials.getProperty("username")+"/dc/"+object.getAttributeValue("resourceguid")+"/info.XML",info,"props");
    common_code.writeXMLObject(home+"users/"+credentials.getProperty("username")+"/dc/"+object.getAttributeValue("resourceguid")+"/attributes.XML",attributes,"props");

    Properties localInfo = new Properties();
    Properties localAttributes = getAttributes(home+"users/"+credentials.getProperty("username")+"/dc/"+object.getAttributeValue("resourceguid")+"/"+machineGuid+"/");
    if (localAttributes == null) localAttributes = new Properties();
    localAttributes.put("localversion",fiop[1]);
    new File(home+"users/"+credentials.getProperty("username")+"/dc/"+object.getAttributeValue("resourceguid")+"/"+machineGuid+"/").mkdirs();
    common_code.writeXMLObject(home+"users/"+credentials.getProperty("username")+"/dc/"+object.getAttributeValue("resourceguid")+"/"+machineGuid+"/info.XML",localInfo,"props");
    common_code.writeXMLObject(home+"users/"+credentials.getProperty("username")+"/dc/"+object.getAttributeValue("resourceguid")+"/"+machineGuid+"/attributes.XML",localAttributes,"props");

    fileData = "";

    updateMachineSyncDates(credentials, machineGuid);
View Full Code Here


      attributes.put("umi","0");
      attributes.put("flag_autotrigger","0");

    }

    Common common_code = new Common();
    common_code.writeXMLObject(home+"users/"+credentials.getProperty("username")+"/device/"+guid+"/info.XML",info,"props");
    common_code.writeXMLObject(home+"users/"+credentials.getProperty("username")+"/device/"+guid+"/attributes.XML",attributes,"props");

    Element object2 = new Element("object");
    transaction.addContent(object2);
    loadObject(object2,home+"users/"+credentials.getProperty("username")+"/device/"+guid+"/");

    attributes.put("createdate", sdf_createDate.format(new Date()));
    common_code.writeXMLObject(home+"users/"+credentials.getProperty("username")+"/device/"+guid+"/attributes.XML",attributes,"props");


    addSuccess(transaction);
  }
View Full Code Here

    if (attributes.containsKey("localversion"))
    {
      localVersion = attributes.getProperty("localversion");
      attributes.remove("localversion");
    }
    Common common_code = new Common();
    common_code.writeXMLObject(home+"users/"+credentials.getProperty("username")+"/dc/"+guid+"/info.XML",info,"props");
    common_code.writeXMLObject(home+"users/"+credentials.getProperty("username")+"/dc/"+guid+"/attributes.XML",attributes,"props");

    if (localVersion != null)
    {
      String machineGuid = locktokens.getProperty(locktoken);

      new File(home+"users/"+credentials.getProperty("username")+"/dc/"+object.getAttributeValue("resourceguid")+"/"+machineGuid+"/").mkdirs();
      Properties localAttributes = getAttributes(home+"users/"+credentials.getProperty("username")+"/dc/"+guid+"/"+machineGuid+"/");
      if (localAttributes == null) localAttributes = new Properties();
      localAttributes.put("localversion",localVersion);
      common_code.writeXMLObject(home+"users/"+credentials.getProperty("username")+"/dc/"+object.getAttributeValue("resourceguid")+"/"+machineGuid+"/attributes.XML",localAttributes,"props");
    }

    loadObject(object2,home+"users/"+credentials.getProperty("username")+"/dc/"+guid+"/");
    object2.removeChildren("attribute");
View Full Code Here

    attributes.put("lastmoddate",httpSession.sdf_rfc1123.format(new Date()));

    Common.recurseDelete(home+"users/"+credentials.getProperty("username")+"/dc/"+guid+"/",false);
    new File(home+"users/"+credentials.getProperty("username")+"/dc/"+guid+"/").mkdirs();

    Common common_code = new Common();
    common_code.writeXMLObject(home+"users/"+credentials.getProperty("username")+"/dc/"+guid+"/info.XML",info,"props");
    common_code.writeXMLObject(home+"users/"+credentials.getProperty("username")+"/dc/"+guid+"/attributes.XML",attributes,"props");

    Element object2 = new Element("object");
    transaction.addContent(object2);
    loadObject(object2,home+"users/"+credentials.getProperty("username")+"/dc/"+guid+"/");
    object2.removeChildren("attribute");
View Full Code Here

      attributes.put("f1version","0");
      attributes.put("version","0");
      attributes.put("baseversion","0");
    }

    Common common_code = new Common();
    common_code.writeXMLObject(path+guid+"/info.XML",info,"props");
    common_code.writeXMLObject(path+guid+"/attributes.XML",attributes,"props");
  }
View Full Code Here

    if (!attributes.containsKey("firstsyncdate"))
    {
      attributes.put("firstsyncdate", sdf_createDate.format(new Date()));
    }
    attributes.put("lastsyncdate", sdf_createDate.format(new Date()));
    Common common_code = new Common();
    common_code.writeXMLObject(home+"users/"+credentials.getProperty("username")+"/device/"+machineGuid+"/attributes.XML",attributes,"props");
  }
View Full Code Here

          System.setProperty("java.awt.headless", "true");
          new CrushFTPD();
        }
        else if (args[0].toUpperCase().equals("-P"))
        {
          System.out.println(new Common().encode_pass(args[2],args[1]));
        }
      }
      else
        new CrushFTPGUI();
    }
View Full Code Here

TOP

Related Classes of crushftp.handlers.Common

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.