Examples of groupId()


Examples of org.activiti.engine.identity.GroupQuery.groupId()

  @RequestMapping(value="/identity/groups", method = RequestMethod.GET, produces = "application/json")
  public DataResponse getGroups(@RequestParam Map<String,String> allRequestParams, HttpServletRequest request) {
    GroupQuery query = identityService.createGroupQuery();
   
    if (allRequestParams.containsKey("id")) {
      query.groupId(allRequestParams.get("id"));
    }
    if (allRequestParams.containsKey("name")) {
      query.groupName(allRequestParams.get("name"));
    }
    if (allRequestParams.containsKey("nameLike")) {
View Full Code Here

Examples of org.camunda.bpm.engine.identity.GroupQuery.groupId()

  @Test
  public void testGetSingleGroup() {   
    Group sampleGroup = MockProvider.createMockGroup();
    GroupQuery sampleGroupQuery = mock(GroupQuery.class);
    when(identityServiceMock.createGroupQuery()).thenReturn(sampleGroupQuery);
    when(sampleGroupQuery.groupId(MockProvider.EXAMPLE_GROUP_ID)).thenReturn(sampleGroupQuery);
    when(sampleGroupQuery.singleResult()).thenReturn(sampleGroup);
   
    given().pathParam("id", MockProvider.EXAMPLE_GROUP_ID)
      .then().expect().statusCode(Status.OK.getStatusCode())
      .body("id", equalTo(MockProvider.EXAMPLE_GROUP_ID))
View Full Code Here

Examples of org.camunda.bpm.engine.identity.GroupQuery.groupId()

    String fullGroupUrl = "http://localhost:" + PORT + TEST_RESOURCE_ROOT_PATH + "/group/" + MockProvider.EXAMPLE_GROUP_ID;
   
    Group sampleGroup = MockProvider.createMockGroup();
    GroupQuery sampleGroupQuery = mock(GroupQuery.class);
    when(identityServiceMock.createGroupQuery()).thenReturn(sampleGroupQuery);
    when(sampleGroupQuery.groupId(MockProvider.EXAMPLE_GROUP_ID)).thenReturn(sampleGroupQuery);
    when(sampleGroupQuery.singleResult()).thenReturn(sampleGroup);
   
    given()
        .pathParam("id", MockProvider.EXAMPLE_GROUP_ID)
    .then()
View Full Code Here

Examples of org.camunda.bpm.engine.identity.GroupQuery.groupId()

    when(authorizationServiceMock.isUserAuthorized(MockProvider.EXAMPLE_USER_ID, null, UPDATE, GROUP, MockProvider.EXAMPLE_GROUP_ID)).thenReturn(false);
   
    Group sampleGroup = MockProvider.createMockGroup();
    GroupQuery sampleGroupQuery = mock(GroupQuery.class);
    when(identityServiceMock.createGroupQuery()).thenReturn(sampleGroupQuery);
    when(sampleGroupQuery.groupId(MockProvider.EXAMPLE_GROUP_ID)).thenReturn(sampleGroupQuery);
    when(sampleGroupQuery.singleResult()).thenReturn(sampleGroup);
   
    given()
        .pathParam("id", MockProvider.EXAMPLE_GROUP_ID)
    .then()
View Full Code Here

Examples of org.camunda.bpm.engine.identity.GroupQuery.groupId()

    when(authorizationServiceMock.isUserAuthorized(MockProvider.EXAMPLE_USER_ID, null, UPDATE, GROUP, MockProvider.EXAMPLE_GROUP_ID)).thenReturn(false);
   
    Group sampleGroup = MockProvider.createMockGroup();
    GroupQuery sampleGroupQuery = mock(GroupQuery.class);
    when(identityServiceMock.createGroupQuery()).thenReturn(sampleGroupQuery);
    when(sampleGroupQuery.groupId(MockProvider.EXAMPLE_GROUP_ID)).thenReturn(sampleGroupQuery);
    when(sampleGroupQuery.singleResult()).thenReturn(sampleGroup);
   
    given()
        .pathParam("id", MockProvider.EXAMPLE_GROUP_ID)
    .then()
View Full Code Here

Examples of org.camunda.bpm.engine.identity.GroupQuery.groupId()

 
  @Test
  public void testGetNonExistingGroup() {   
    GroupQuery sampleGroupQuery = mock(GroupQuery.class);
    when(identityServiceMock.createGroupQuery()).thenReturn(sampleGroupQuery);
    when(sampleGroupQuery.groupId(anyString())).thenReturn(sampleGroupQuery);
    when(sampleGroupQuery.singleResult()).thenReturn(null);
   
    given().pathParam("id", "aNonExistingGroup")
      .then().expect().statusCode(Status.NOT_FOUND.getStatusCode()).contentType(ContentType.JSON)
      .body("type", equalTo(InvalidRequestException.class.getSimpleName()))
View Full Code Here

Examples of org.camunda.bpm.engine.identity.GroupQuery.groupId()

  public void testUpdateExistingGroup() {   
    Group initialGroup = MockProvider.createMockGroup();
    Group groupUpdate = MockProvider.createMockGroupUpdate();
    GroupQuery sampleGroupQuery = mock(GroupQuery.class);
    when(identityServiceMock.createGroupQuery()).thenReturn(sampleGroupQuery);
    when(sampleGroupQuery.groupId(MockProvider.EXAMPLE_GROUP_ID)).thenReturn(sampleGroupQuery);
    when(sampleGroupQuery.singleResult()).thenReturn(initialGroup);
   
    given().pathParam("id", MockProvider.EXAMPLE_GROUP_ID)
      .body(GroupDto.fromGroup(groupUpdate)).contentType(ContentType.JSON)
      .then().expect().statusCode(Status.NO_CONTENT.getStatusCode())     
View Full Code Here

Examples of org.camunda.bpm.engine.identity.GroupQuery.groupId()

  @Test
  public void testUpdateNonExistingGroup() {
    Group groupUpdate = MockProvider.createMockGroupUpdate();
    GroupQuery sampleGroupQuery = mock(GroupQuery.class);
    when(identityServiceMock.createGroupQuery()).thenReturn(sampleGroupQuery);
    when(sampleGroupQuery.groupId("aNonExistingGroup")).thenReturn(sampleGroupQuery);   
    // this time the query returns null
    when(sampleGroupQuery.singleResult()).thenReturn(null);
   
    given().pathParam("id", "aNonExistingGroup")
      .body(GroupDto.fromGroup(groupUpdate)).contentType(ContentType.JSON)
View Full Code Here

Examples of org.kie.api.cdi.KReleaseId.groupId()


                    KReleaseId kReleaseId = ip.getAnnotated().getAnnotation( KReleaseId.class );
                    ReleaseId releaseId = null;
                    if ( kReleaseId != null ) {
                        releaseId = ks.newReleaseId(kReleaseId.groupId(),
                                                    kReleaseId.artifactId(),
                                                    kReleaseId.version());
                        gavs.put(releaseId,
                                  null );
                    }
View Full Code Here

Examples of org.kie.api.cdi.KReleaseId.groupId()

        for (Field field : targetClass.getDeclaredFields()) {

            KReleaseId kReleaseId = field.getAnnotation(KReleaseId.class);
            ReleaseId specificReleaseId = null;
            if ( kReleaseId != null ) {
                specificReleaseId = ks.newReleaseId(kReleaseId.groupId(),
                        kReleaseId.artifactId(),
                        kReleaseId.version());
            } else {
                specificReleaseId = this.releaseId;
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.