List of usage examples for java.util UUID toString
public String toString()
From source file:com.turt2live.uuid.turt2live.v1.ApiV1Service.java
@Override public String convertUuid(UUID uuid) { if (uuid == null) throw new IllegalArgumentException("UUID cannot be null"); return uuid.toString().replace("-", ""); }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskMssCF.CFAsteriskMssCFBindSecUserEMailConfirmationUuid.java
public String expandBody(MssCFGenContext genContext) { final String S_ProcName = "CFAsteriskMssCFBindSecUserEMailConfirmationUuid.expandBody() "; if (genContext == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext"); }//from w w w .j ava 2 s . c om ICFLibAnyObj genDef = genContext.getGenDef(); if (genDef == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()"); } String ret; if (genDef instanceof ICFAsteriskSecUserObj) { UUID eMailConfirmationUuid = ((ICFAsteriskSecUserObj) genDef).getOptionalEMailConfirmationUuid(); if (eMailConfirmationUuid == null) { ret = null; } else { ret = eMailConfirmationUuid.toString(); } } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody", "genContext.getGenDef()", genDef, "ICFAsteriskSecUserObj"); } return (ret); }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_2.CFEnSyntaxMssCF.CFEnSyntaxMssCFBindSecUserPasswordResetUuid.java
public String expandBody(MssCFGenContext genContext) { final String S_ProcName = "CFEnSyntaxMssCFBindSecUserPasswordResetUuid.expandBody() "; if (genContext == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext"); }// w w w . j ava 2 s . c om ICFLibAnyObj genDef = genContext.getGenDef(); if (genDef == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()"); } String ret; if (genDef instanceof ICFEnSyntaxSecUserObj) { UUID passwordResetUuid = ((ICFEnSyntaxSecUserObj) genDef).getOptionalPasswordResetUuid(); if (passwordResetUuid == null) { ret = null; } else { ret = passwordResetUuid.toString(); } } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody", "genContext.getGenDef()", genDef, "ICFEnSyntaxSecUserObj"); } return (ret); }
From source file:com.appdynamics.cloudfoundry.appdservicebroker.catalog.Service.java
@PostConstruct Service addAllPlans(/*@Value("${appd_plans}")*/ String appd_plans) throws ParseException { @SuppressWarnings("unchecked") CredentialsHolder credentialsHolder = CredentialsHolder.getInstance(); Iterator<String> keySetIterator = credentialsHolder.getPlans().iterator(); while (keySetIterator.hasNext()) { String appd_plan_name = keySetIterator.next(); UUID appd_plan_uuid = UUIDGenerator.generatePlanID(appd_plan_name); String appd_plan_id = appd_plan_uuid.toString(); credentialsHolder.mapPlanIdWithName(appd_plan_name, appd_plan_id); plan().id(appd_plan_uuid).name(appd_plan_name).description("Service Plan for " + appd_plan_name) .metadata()/*from w w w. j a va 2 s . co m*/ .bullets("JVM Performance analyzer", "Browser End User Monitoring", "Database call response time & throughput", "Performance data API access", "Synthetics Monitoring", "Software Analytics") .displayName(appd_plan_name.toUpperCase()).cost().amount("usd", 0.0).unit("MONTHLY").and().and() .free(true); } return this; }
From source file:org.ng200.openolympus.controller.task.TaskViewController.java
@RequestMapping(method = RequestMethod.POST) public String submitSolution(final HttpServletRequest request, final Model model, final Locale locale, @PathVariable("task") final Task task, final Principal principal, @Valid final SolutionDto solutionDto, final BindingResult bindingResult) throws IllegalStateException, IOException, ArchiveException { Assertions.resourceExists(task);/*from w w w .ja v a 2 s .co m*/ this.assertSuperuserOrTaskAllowed(principal, task); final User user = this.userRepository.findByUsername(principal.getName()); this.solutionDtoValidator.validate(solutionDto, bindingResult); if (bindingResult.hasErrors()) { model.addAttribute("taskDescriptionUUID", task.getDescriptionFile()); model.addAttribute("taskDescriptionURI", MessageFormat .format(TaskViewController.TASK_DESCRIPTION_PATH_TEMPLATE, task.getDescriptionFile())); model.addAttribute("localisedDescriptionFragment", "taskDescription_" + locale.getLanguage()); model.addAttribute("task", task); return "tasks/task"; } final UUID uuid = UUID.randomUUID(); final String solutionPath = MessageFormat.format(TaskViewController.SOLUTION_PATH_TEMPLATE, StorageSpace.STORAGE_PREFIX, uuid.toString(), solutionDto.getTaskFile().getOriginalFilename().replaceAll("[^a-zA-Z0-9-\\._]", "")); final File solutionFile = new File(solutionPath); solutionFile.getParentFile().mkdirs(); solutionDto.getTaskFile().transferTo(solutionFile); Solution solution = new Solution(task, user, solutionFile.getAbsolutePath(), Date.from(Instant.now())); solution = this.solutionRepository.save(solution); this.testingService.testSolutionOnAllTests(solution); return MessageFormat.format("redirect:/solution?id={0}", Long.toString(solution.getId())); }
From source file:uk.ac.imperial.presage2.db.json.JsonStorage.java
@Override protected void storeTuple(long id, String key, UUID agent, int value) { getSim(id).with("agentproperties").with(agent.toString()).put(key, value); }
From source file:org.ovirt.engine.sdk.decorators.Groups.java
/** * Fetches Group object by id.// w w w . j ava2s . c o m * * @return {@link Group } * * @throws ClientProtocolException * Signals that HTTP/S protocol error has occurred. * @throws ServerException * Signals that an oVirt api error has occurred. * @throws IOException * Signals that an I/O exception of some sort has occurred. */ @Override public Group get(UUID id) throws ClientProtocolException, ServerException, IOException { String url = SLASH + getName() + SLASH + id.toString(); return getProxy().get(url, org.ovirt.engine.sdk.entities.Group.class, Group.class); }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_1.CFAstMssCF.CFAstMssCFBindSecUserDefaultDevSecUserId.java
public String expandBody(MssCFGenContext genContext) { final String S_ProcName = "CFAstMssCFBindSecUserDefaultDevSecUserId.expandBody() "; if (genContext == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext"); }/*from ww w. j a va 2 s. co m*/ ICFLibAnyObj genDef = genContext.getGenDef(); if (genDef == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()"); } String ret; if (genDef instanceof ICFAstSecUserObj) { UUID defaultDevSecUserId = ((ICFAstSecUserObj) genDef).getOptionalDefaultDevSecUserId(); if (defaultDevSecUserId == null) { ret = null; } else { ret = defaultDevSecUserId.toString(); } } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody", "genContext.getGenDef()", genDef, "ICFAstSecUserObj"); } return (ret); }
From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_1.CFFswMssCF.CFFswMssCFBindSecUserDefaultDevSecUserId.java
public String expandBody(MssCFGenContext genContext) { final String S_ProcName = "CFFswMssCFBindSecUserDefaultDevSecUserId.expandBody() "; if (genContext == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext"); }/*from w w w . j a va 2 s.c o m*/ ICFLibAnyObj genDef = genContext.getGenDef(); if (genDef == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()"); } String ret; if (genDef instanceof ICFFswSecUserObj) { UUID defaultDevSecUserId = ((ICFFswSecUserObj) genDef).getOptionalDefaultDevSecUserId(); if (defaultDevSecUserId == null) { ret = null; } else { ret = defaultDevSecUserId.toString(); } } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody", "genContext.getGenDef()", genDef, "ICFFswSecUserObj"); } return (ret); }
From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_4.CFFreeSwitchMssCF.CFFreeSwitchMssCFBindSecUserEMailConfirmationUuid.java
public String expandBody(MssCFGenContext genContext) { final String S_ProcName = "CFFreeSwitchMssCFBindSecUserEMailConfirmationUuid.expandBody() "; if (genContext == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext"); }//from ww w. j a va 2 s . c o m ICFLibAnyObj genDef = genContext.getGenDef(); if (genDef == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()"); } String ret; if (genDef instanceof ICFFreeSwitchSecUserObj) { UUID eMailConfirmationUuid = ((ICFFreeSwitchSecUserObj) genDef).getOptionalEMailConfirmationUuid(); if (eMailConfirmationUuid == null) { ret = null; } else { ret = eMailConfirmationUuid.toString(); } } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody", "genContext.getGenDef()", genDef, "ICFFreeSwitchSecUserObj"); } return (ret); }