Package org.safehaus.uuid

Examples of org.safehaus.uuid.UUIDGenerator


        mapPars.put(SsoServiceInterface.USER_ID, ((UserProfile) profile).getUserUniqueIdentifier());
      }
     
      // adding SBI_EXECUTION_ID parameter
      if (!mapPars.containsKey("SBI_EXECUTION_ID")) {
        UUIDGenerator uuidGen  = UUIDGenerator.getInstance();
        UUID uuidObj = uuidGen.generateTimeBasedUUID();
        String executionId = uuidObj.toString();
        executionId = executionId.replaceAll("-", "");
        mapPars.put("SBI_EXECUTION_ID", executionId);
      }
View Full Code Here


  public StringBuffer makeTree(List objectsList, HttpServletRequest httpReq, String initialPath) {

    logger.debug("IN");
// identity string for object of the page
    UUIDGenerator uuidGen  = UUIDGenerator.getInstance();
    UUID uuid = uuidGen.generateTimeBasedUUID();
    requestIdentity = uuid.toString();
    requestIdentity = requestIdentity.replaceAll("-", "");
    httpRequest = httpReq;
    reqCont = ChannelUtilities.getRequestContainer(httpRequest);
    urlBuilder = UrlBuilderFactory.getUrlBuilder();
View Full Code Here

   * @see it.eng.spagobi.analiticalmodel.functionalitytree.presentation.ITreeHtmlGenerator#makeTree(java.util.List, javax.servlet.http.HttpServletRequest, java.lang.String)
   */
  public StringBuffer makeTree(List objectsList, HttpServletRequest httpReq, String initialPath) {
   
    // identity string for object of the page
      UUIDGenerator uuidGen  = UUIDGenerator.getInstance();
      UUID uuid = uuidGen.generateTimeBasedUUID();
      requestIdentity = uuid.toString();
      requestIdentity = requestIdentity.replaceAll("-", "");
    httpRequest = httpReq;
    reqCont = ChannelUtilities.getRequestContainer(httpRequest);
    urlBuilder = UrlBuilderFactory.getUrlBuilder();
View Full Code Here

    nextParamsMap.put("MESSAGE", "LIST_PAGE");
    nextParamsMap.put("LIST_PAGE", String.valueOf(nextPage));
    PortletURL nextUrl = createUrl(nextParamsMap);
   
    // identity string for object of the page
      UUIDGenerator uuidGen  = UUIDGenerator.getInstance();
      UUID uuid = uuidGen.generateTimeBasedUUID();
      String requestIdentity = uuid.toString();
      requestIdentity = requestIdentity.replaceAll("-", "");
    String formId = "formFilter" + requestIdentity;
   
    String valueFilter = (String) _serviceRequest.getAttribute(SpagoBIConstants.VALUE_FILTER);
View Full Code Here

   * @see it.eng.spagobi.engines.dossier.dao.IDossierDAO#init(it.eng.spagobi.analiticalmodel.document.bo.BIObject)
   */
  public String init(BIObject dossier) {
    logger.debug("IN");
    try {
      UUIDGenerator uuidGenerator = UUIDGenerator.getInstance();
      UUID uuidObj = uuidGenerator.generateTimeBasedUUID();
      String uuid = uuidObj.toString();
      File tempFolder = new File(tempBaseFolder.getAbsolutePath() + "/" + dossier.getId().toString() + "/" + uuid);
      if (tempFolder.exists()) deleteFolder(tempFolder);
      tempFolder.mkdirs();
      File template = new File(tempFolder.getAbsolutePath() + "/" + TEMPLATE_FILE_NAME);
View Full Code Here

      Map imageurl = new HashMap();
      Iterator iterImgs = images.keySet().iterator();
      while(iterImgs.hasNext()){
        String logicalName = (String) iterImgs.next();
        //String logicalNameForStoring = pathConfBook.replace('/', '_') + logicalName + ".jpg";
      UUIDGenerator uuidGenerator = UUIDGenerator.getInstance();
      UUID uuidObj = uuidGenerator.generateTimeBasedUUID();
      String uuid = uuidObj.toString();
      // TODO perche salvare su file system? tanto vale tenere in memoria le immagini, oppure scriverli sul file system e far puntare l'immagine al file
        String logicalNameForStoring = uuid + logicalName;
        byte[] content = (byte[])images.get(logicalName);
        File img = new File(tempDir, logicalNameForStoring + ".jpg");
View Full Code Here

    /* (non-Javadoc)
     * @see it.eng.spagobi.analiticalmodel.functionalitytree.presentation.ITreeHtmlGenerator#makeTree(java.util.List, javax.servlet.http.HttpServletRequest, java.lang.String)
     */
    public StringBuffer makeTree(List objectsList, HttpServletRequest httpReq, String initialPath) {
  // identity string for object of the page
  UUIDGenerator uuidGen = UUIDGenerator.getInstance();
  UUID uuid = uuidGen.generateTimeBasedUUID();
  requestIdentity = uuid.toString();
  requestIdentity = requestIdentity.replaceAll("-", "");
  httpRequest = httpReq;
  reqCont = ChannelUtilities.getRequestContainer(httpRequest);
  urlBuilder = UrlBuilderFactory.getUrlBuilder();
View Full Code Here

        }
    }
   
    List<UUID> generateUuids(UUIDMethod method, int count, String name)
    {
        UUIDGenerator gen = UUIDGenerator.getInstance();
        ArrayList<UUID> uuids = new ArrayList<UUID>(count);
        for (int i = 0; i < count; ++i) {
            UUID uuid;

            switch (method) {
            case RANDOM: // UUID using ~128 bits of randomness
                uuid = gen.generateRandomBasedUUID();
                break;
            case TIME: // UUID using time+location
                uuid = gen.generateTimeBasedUUID(mMacAddress);
                break;
            case NAME: // UUID computed from the given name
                /* Note: we do NOT use a context value, for simplicity --
                 * usually one should be used, and UUID class already
                 * specifies 4 suggested standard contexts
                 */
                uuid = gen.generateNameBasedUUID(null, name);
                break;
            default:
                throw new Error(); // never gets here
            }
            uuids.add(uuid);
View Full Code Here

TOP

Related Classes of org.safehaus.uuid.UUIDGenerator

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.