List of usage examples for java.util UUID fromString
public static UUID fromString(String name)
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAst.CFAstSecUserPKey.java
public CFAstSecUserPKey() { requiredSecUserId = UUID.fromString(CFAstSecUserBuff.SECUSERID_INIT_VALUE.toString()); }
From source file:org.openlmis.fulfillment.web.OrderNumberConfigurationControllerIntegrationTest.java
@Before public void setUp() { this.setUpBootstrapData(); ProgramDto programDto = new ProgramDto(); programDto.setId(UUID.fromString("35316636-6264-6331-2d34-3933322d3462")); programDto.setCode("code"); Order order = new Order(); order.setId(UUID.randomUUID()); order.setExternalId(UUID.randomUUID()); order.setEmergency(true);/*from w w w. j av a 2 s. c o m*/ order.setFacilityId(facility); order.setProcessingPeriodId(UUID.fromString("a510d22f-f370-46c7-88e2-981573c427f5")); order.setCreatedById(UUID.randomUUID()); order.setProgramId(programDto.getId()); order.setRequestingFacilityId(facility); order.setReceivingFacilityId(facility); order.setSupplyingFacilityId(facility); order.setOrderCode("order_code"); order.setStatus(OrderStatus.ORDERED); order.setQuotedCost(BigDecimal.ONE); firstOrderNumberConfiguration = new OrderNumberConfiguration("prefix", true, true, true); secondOrderNumberConfiguration = new OrderNumberConfiguration("prefix", false, false, false); given(orderRepository.findOne(order.getId())).willReturn(order); given(orderRepository.exists(order.getId())).willReturn(true); given(orderNumberConfigurationRepository.save(any(OrderNumberConfiguration.class))) .willAnswer(new SaveAnswer<OrderNumberConfiguration>()); }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAcc.CFAccSecUserPKey.java
public CFAccSecUserPKey() { requiredSecUserId = UUID.fromString(CFAccSecUserBuff.SECUSERID_INIT_VALUE.toString()); }
From source file:net.cyberninjapiggy.apocalyptic.misc.UUIDFetcher.java
public Map<String, UUID> call() throws Exception { Map<String, UUID> uuidMap = new HashMap<>(); String body = buildBody(names); for (int i = 1; i < MAX_SEARCH; i++) { HttpURLConnection connection = createConnection(i); writeBody(connection, body);/*from ww w . j av a2 s. co m*/ JSONObject jsonObject = (JSONObject) jsonParser .parse(new InputStreamReader(connection.getInputStream())); JSONArray array = (JSONArray) jsonObject.get("profiles"); Number count = (Number) jsonObject.get("size"); if (count.intValue() == 0) { break; } for (Object profile : array) { JSONObject jsonProfile = (JSONObject) profile; String id = (String) jsonProfile.get("id"); String name = (String) jsonProfile.get("name"); UUID uuid = UUID.fromString(id.substring(0, 8) + "-" + id.substring(8, 12) + "-" + id.substring(12, 16) + "-" + id.substring(16, 20) + "-" + id.substring(20, 32)); uuidMap.put(name, uuid); } } return uuidMap; }
From source file:net.sourceforge.msscodefactory.cfensyntax.v2_1.CFEnSyntax.CFEnSyntaxSecSessionPKey.java
public CFEnSyntaxSecSessionPKey() { requiredSecSessionId = UUID.fromString(CFEnSyntaxSecSessionBuff.SECSESSIONID_INIT_VALUE.toString()); }
From source file:gemlite.core.internal.domain.utilClass.FileDataSource.java
@Override public UUID getUUID(String name) { return UUID.fromString(rs.readString(name)); }
From source file:com.haulmont.cuba.core.jmx.PasswordEncryptionSupport.java
@Override public String getPasswordHash(String userId, String password) { UUID userUUID;// w w w . java 2s . co m try { userUUID = UUID.fromString(userId); } catch (Exception e) { return "Invalid user Id"; } return passwordEncryption.getPasswordHash(userUUID, password); }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAst.CFAstSecSessionPKey.java
public CFAstSecSessionPKey() { requiredSecSessionId = UUID.fromString(CFAstSecSessionBuff.SECSESSIONID_INIT_VALUE.toString()); }
From source file:com.spectralogic.ds3client.helpers.RequestMatchers.java
public static GetJobChunksReadyForClientProcessingSpectraS3Request hasJobId(final UUID jobId) { return argThat(new TypeSafeMatcher<GetJobChunksReadyForClientProcessingSpectraS3Request>() { @Override//from w ww.j a v a 2 s.co m public void describeTo(final Description description) { describeRequest(jobId, description); } @Override protected boolean matchesSafely(final GetJobChunksReadyForClientProcessingSpectraS3Request item) { return jobId.equals(UUID.fromString(item.getJob())); } @Override protected void describeMismatchSafely(final GetJobChunksReadyForClientProcessingSpectraS3Request item, final Description mismatchDescription) { describeRequest(UUID.fromString(item.getJob()), mismatchDescription); } private void describeRequest(final UUID jobIdValue, final Description description) { description.appendText("GetAvailableJobChunksRequest with job id: ").appendValue(jobIdValue); } }); }
From source file:io.gravitee.gateway.standalone.TransformRequestContentGatewayTest.java
@Test public void call_override_request_content() throws Exception { org.apache.http.client.fluent.Request request = org.apache.http.client.fluent.Request .Post("http://localhost:8082/echo/helloworld"); request.bodyString(BODY_CONTENT + " {#request.id}", ContentType.TEXT_PLAIN); org.apache.http.client.fluent.Response response = request.execute(); HttpResponse returnResponse = response.returnResponse(); assertEquals(HttpStatus.SC_OK, returnResponse.getStatusLine().getStatusCode()); String responseContent = StringUtils.copy(returnResponse.getEntity().getContent()); String[] parts = responseContent.split(":"); assertTrue(responseContent.startsWith(BODY_CONTENT)); assertTrue(UUID.fromString(parts[1].substring(1)) != null); }