test_class.declarator: LOGGER = Logger.getLogger(GeoStoreClientTest.class)
test_class.modifier: private final static
test_class.original_string: private final static Logger LOGGER = Logger.getLogger(GeoStoreClientTest.class);
test_class.type: Logger
test_class.var_name: LOGGER
test_class.declarator: DEFAULTCATEGORYNAME = "TestCategory1"
test_class.modifier: final
test_class.original_string: final String DEFAULTCATEGORYNAME = "TestCategory1";
test_class.type: String
test_class.var_name: DEFAULTCATEGORYNAME
test_class.file: src/modules/rest/client/src/test/java/it/geosolutions/geostore/services/rest/GeoStoreClientTest.java
test_class.identifier: GeoStoreClientTest
test_class.superclass: extends BaseGeoStoreClientTest
test_case.body: @Test
      public void testGetShortResource() {
  
          final String DATA = "we wish you a merry xmas and a happy new year";
  
          UserGroup g1 = createUserGroup("g1xyz");
  
          createUser("u1", Role.USER, "u1", g1);
          createUser("u2", Role.USER, "u2", g1);
  
          createDefaultCategory();
  
          RESTResource r1 = buildResource("r1", DEFAULTCATEGORYNAME);
  
          GeoStoreClient c1 = createClient("u1", "u1");
          GeoStoreClient c2 = createClient("u2", "u2");
  
          long rId1 = c1.insert(r1);
  
          // make sure data has been saved
          {
              ShortResource res = client.getShortResource(rId1);
              assertEquals("r1", res.getName());
          }
  
          // proper user loads resource
          {
              ShortResource loaded = c1.getShortResource(rId1);
              assertEquals("r1", loaded.getName());
              assertTrue(loaded.isCanEdit());
              assertTrue(loaded.isCanDelete());
          }
  
          // other user loads resource
          {
              try {
                  ShortResource loaded = c2.getShortResource(rId1);
                  assertEquals("r1", loaded.getName());
              } catch (UniformInterfaceException ex) {
                  assertEquals(Status.FORBIDDEN, ex.getResponse().getClientResponseStatus());
              }
              // 403
          }
  
          SecurityRule sr = new SecurityRule();
          sr.setGroup(g1);
          sr.setCanRead(true);
          sr.setCanWrite(false);
  
          SecurityRuleList srlist = new SecurityRuleList(Collections.singletonList(sr));
          c1.updateSecurityRules(rId1, srlist);
  
          // other user loads resource
          {
              ShortResource loaded = c2.getShortResource(rId1);
              assertEquals("r1", loaded.getName());
              assertFalse(loaded.isCanEdit());
          }
  
      }
test_case.class_method_signature: GeoStoreClientTest.testGetShortResource()
test_case.full_signature: @Test public void testGetShortResource()
test_case.identifier: testGetShortResource
test_case.invocations: createUserGroup createUser createUser createDefaultCategory buildResource createClient createClient insert getShortResource assertEquals getName getShortResource assertEquals getName assertTrue isCanEdit assertTrue isCanDelete getShortResource assertEquals getName assertEquals getClientResponseStatus getResponse setGroup setCanRead setCanWrite singletonList updateSecurityRules getShortResource assertEquals getName assertFalse isCanEdit
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetShortResource()
focal_class.declarator: username = null
focal_class.modifier: private
focal_class.original_string: private String username = null;
focal_class.type: String
focal_class.var_name: username
focal_class.declarator: password = null
focal_class.modifier: private
focal_class.original_string: private String password = null;
focal_class.type: String
focal_class.var_name: password
focal_class.declarator: geostoreRestUrl = null
focal_class.modifier: private
focal_class.original_string: private String geostoreRestUrl = null;
focal_class.type: String
focal_class.var_name: geostoreRestUrl
focal_class.file: src/modules/rest/client/src/main/java/it/geosolutions/geostore/services/rest/GeoStoreClient.java
focal_class.identifier: GeoStoreClient
focal_class.class_method_signature: GeoStoreClient.GeoStoreClient()
focal_class.full_signature: public  GeoStoreClient()
focal_class.identifier: GeoStoreClient
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  GeoStoreClient()
focal_class.class_method_signature: GeoStoreClient.searchResources(SearchFilter searchFilter)
focal_class.full_signature: @Deprecated public ShortResourceList searchResources(SearchFilter searchFilter)
focal_class.identifier: searchResources
focal_class.modifiers: @Deprecated public
focal_class.parameters: (SearchFilter searchFilter)
focal_class.return: ShortResourceList
focal_class.signature: ShortResourceList searchResources(SearchFilter searchFilter)
focal_class.class_method_signature: GeoStoreClient.searchResources(SearchFilter searchFilter,
              Integer page, Integer entries,
              Boolean includeAttributes, Boolean includeData)
focal_class.full_signature: public ResourceList searchResources(SearchFilter searchFilter,
              Integer page, Integer entries,
              Boolean includeAttributes, Boolean includeData)
focal_class.identifier: searchResources
focal_class.modifiers: public
focal_class.parameters: (SearchFilter searchFilter,
              Integer page, Integer entries,
              Boolean includeAttributes, Boolean includeData)
focal_class.return: ResourceList
focal_class.signature: ResourceList searchResources(SearchFilter searchFilter,
              Integer page, Integer entries,
              Boolean includeAttributes, Boolean includeData)
focal_class.class_method_signature: GeoStoreClient.addQParam(WebResource wb, String key, Object value)
focal_class.full_signature: protected WebResource addQParam(WebResource wb, String key, Object value)
focal_class.identifier: addQParam
focal_class.modifiers: protected
focal_class.parameters: (WebResource wb, String key, Object value)
focal_class.return: WebResource
focal_class.signature: WebResource addQParam(WebResource wb, String key, Object value)
focal_class.class_method_signature: GeoStoreClient.insert(RESTResource resource)
focal_class.full_signature: public Long insert(RESTResource resource)
focal_class.identifier: insert
focal_class.modifiers: public
focal_class.parameters: (RESTResource resource)
focal_class.return: Long
focal_class.signature: Long insert(RESTResource resource)
focal_class.class_method_signature: GeoStoreClient.getResource(Long id, boolean full)
focal_class.full_signature: public Resource getResource(Long id, boolean full)
focal_class.identifier: getResource
focal_class.modifiers: public
focal_class.parameters: (Long id, boolean full)
focal_class.return: Resource
focal_class.signature: Resource getResource(Long id, boolean full)
focal_class.class_method_signature: GeoStoreClient.getResource(Long id)
focal_class.full_signature: public Resource getResource(Long id)
focal_class.identifier: getResource
focal_class.modifiers: public
focal_class.parameters: (Long id)
focal_class.return: Resource
focal_class.signature: Resource getResource(Long id)
focal_class.class_method_signature: GeoStoreClient.deleteResource(Long id)
focal_class.full_signature: public void deleteResource(Long id)
focal_class.identifier: deleteResource
focal_class.modifiers: public
focal_class.parameters: (Long id)
focal_class.return: void
focal_class.signature: void deleteResource(Long id)
focal_class.class_method_signature: GeoStoreClient.updateResource(Long id, RESTResource resource)
focal_class.full_signature: public void updateResource(Long id, RESTResource resource)
focal_class.identifier: updateResource
focal_class.modifiers: public
focal_class.parameters: (Long id, RESTResource resource)
focal_class.return: void
focal_class.signature: void updateResource(Long id, RESTResource resource)
focal_class.class_method_signature: GeoStoreClient.getAllShortResource(Integer page, Integer entries)
focal_class.full_signature: public ShortResourceList getAllShortResource(Integer page, Integer entries)
focal_class.identifier: getAllShortResource
focal_class.modifiers: public
focal_class.parameters: (Integer page, Integer entries)
focal_class.return: ShortResourceList
focal_class.signature: ShortResourceList getAllShortResource(Integer page, Integer entries)
focal_class.class_method_signature: GeoStoreClient.getSecurityRules(Long resourceId)
focal_class.full_signature: public SecurityRuleList getSecurityRules(Long resourceId)
focal_class.identifier: getSecurityRules
focal_class.modifiers: public
focal_class.parameters: (Long resourceId)
focal_class.return: SecurityRuleList
focal_class.signature: SecurityRuleList getSecurityRules(Long resourceId)
focal_class.class_method_signature: GeoStoreClient.updateSecurityRules(Long resourceId, SecurityRuleList rules)
focal_class.full_signature: public void updateSecurityRules(Long resourceId, SecurityRuleList rules)
focal_class.identifier: updateSecurityRules
focal_class.modifiers: public
focal_class.parameters: (Long resourceId, SecurityRuleList rules)
focal_class.return: void
focal_class.signature: void updateSecurityRules(Long resourceId, SecurityRuleList rules)
focal_class.class_method_signature: GeoStoreClient.getData(Long id)
focal_class.full_signature: public String getData(Long id)
focal_class.identifier: getData
focal_class.modifiers: public
focal_class.parameters: (Long id)
focal_class.return: String
focal_class.signature: String getData(Long id)
focal_class.class_method_signature: GeoStoreClient.getData(Long id, MediaType acceptMediaType)
focal_class.full_signature: public String getData(Long id, MediaType acceptMediaType)
focal_class.identifier: getData
focal_class.modifiers: public
focal_class.parameters: (Long id, MediaType acceptMediaType)
focal_class.return: String
focal_class.signature: String getData(Long id, MediaType acceptMediaType)
focal_class.class_method_signature: GeoStoreClient.getRawData(Long id, RawFormat decodeFrom)
focal_class.full_signature: public byte[] getRawData(Long id, RawFormat decodeFrom)
focal_class.identifier: getRawData
focal_class.modifiers: public
focal_class.parameters: (Long id, RawFormat decodeFrom)
focal_class.return: byte[]
focal_class.signature: byte[] getRawData(Long id, RawFormat decodeFrom)
focal_class.class_method_signature: GeoStoreClient.getRawData(Class<T> clazz, Long id, RawFormat decodeFrom)
focal_class.full_signature: public T getRawData(Class<T> clazz, Long id, RawFormat decodeFrom)
focal_class.identifier: getRawData
focal_class.modifiers: public
focal_class.parameters: (Class<T> clazz, Long id, RawFormat decodeFrom)
focal_class.return: T
focal_class.signature: T getRawData(Class<T> clazz, Long id, RawFormat decodeFrom)
focal_class.class_method_signature: GeoStoreClient.setData(Long id, String data)
focal_class.full_signature: public void setData(Long id, String data)
focal_class.identifier: setData
focal_class.modifiers: public
focal_class.parameters: (Long id, String data)
focal_class.return: void
focal_class.signature: void setData(Long id, String data)
focal_class.class_method_signature: GeoStoreClient.updateData(Long id, String data)
focal_class.full_signature: public void updateData(Long id, String data)
focal_class.identifier: updateData
focal_class.modifiers: public
focal_class.parameters: (Long id, String data)
focal_class.return: void
focal_class.signature: void updateData(Long id, String data)
focal_class.class_method_signature: GeoStoreClient.insert(RESTCategory category)
focal_class.full_signature: public Long insert(RESTCategory category)
focal_class.identifier: insert
focal_class.modifiers: public
focal_class.parameters: (RESTCategory category)
focal_class.return: Long
focal_class.signature: Long insert(RESTCategory category)
focal_class.class_method_signature: GeoStoreClient.getCategory(Long id)
focal_class.full_signature: public Category getCategory(Long id)
focal_class.identifier: getCategory
focal_class.modifiers: public
focal_class.parameters: (Long id)
focal_class.return: Category
focal_class.signature: Category getCategory(Long id)
focal_class.class_method_signature: GeoStoreClient.getCategoryCount(String nameLike)
focal_class.full_signature: public Long getCategoryCount(String nameLike)
focal_class.identifier: getCategoryCount
focal_class.modifiers: public
focal_class.parameters: (String nameLike)
focal_class.return: Long
focal_class.signature: Long getCategoryCount(String nameLike)
focal_class.class_method_signature: GeoStoreClient.getCategories(Integer page, Integer entries)
focal_class.full_signature: public CategoryList getCategories(Integer page, Integer entries)
focal_class.identifier: getCategories
focal_class.modifiers: public
focal_class.parameters: (Integer page, Integer entries)
focal_class.return: CategoryList
focal_class.signature: CategoryList getCategories(Integer page, Integer entries)
focal_class.class_method_signature: GeoStoreClient.getCategories()
focal_class.full_signature: public CategoryList getCategories()
focal_class.identifier: getCategories
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: CategoryList
focal_class.signature: CategoryList getCategories()
focal_class.class_method_signature: GeoStoreClient.deleteCategory(Long id)
focal_class.full_signature: public void deleteCategory(Long id)
focal_class.identifier: deleteCategory
focal_class.modifiers: public
focal_class.parameters: (Long id)
focal_class.return: void
focal_class.signature: void deleteCategory(Long id)
focal_class.class_method_signature: GeoStoreClient.searchUserGroup(Integer start,Integer limit, String nameLike, boolean all)
focal_class.full_signature: public ExtGroupList searchUserGroup(Integer start,Integer limit, String nameLike, boolean all)
focal_class.identifier: searchUserGroup
focal_class.modifiers: public
focal_class.parameters: (Integer start,Integer limit, String nameLike, boolean all)
focal_class.return: ExtGroupList
focal_class.signature: ExtGroupList searchUserGroup(Integer start,Integer limit, String nameLike, boolean all)
focal_class.class_method_signature: GeoStoreClient.searchUserGroup(Integer start,Integer limit, String nameLike)
focal_class.full_signature: public ExtGroupList searchUserGroup(Integer start,Integer limit, String nameLike)
focal_class.identifier: searchUserGroup
focal_class.modifiers: public
focal_class.parameters: (Integer start,Integer limit, String nameLike)
focal_class.return: ExtGroupList
focal_class.signature: ExtGroupList searchUserGroup(Integer start,Integer limit, String nameLike)
focal_class.class_method_signature: GeoStoreClient.getShortResource(long id)
focal_class.full_signature: public ShortResource getShortResource(long id)
focal_class.identifier: getShortResource
focal_class.modifiers: public
focal_class.parameters: (long id)
focal_class.return: ShortResource
focal_class.signature: ShortResource getShortResource(long id)
focal_class.class_method_signature: GeoStoreClient.getBaseWebResource()
focal_class.full_signature: protected WebResource getBaseWebResource()
focal_class.identifier: getBaseWebResource
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: WebResource
focal_class.signature: WebResource getBaseWebResource()
focal_class.class_method_signature: GeoStoreClient.getBaseWebResource(Object... path)
focal_class.full_signature: protected WebResource getBaseWebResource(Object... path)
focal_class.identifier: getBaseWebResource
focal_class.modifiers: protected
focal_class.parameters: (Object... path)
focal_class.return: WebResource
focal_class.signature: WebResource getBaseWebResource(Object... path)
focal_class.class_method_signature: GeoStoreClient.getPassword()
focal_class.full_signature: public String getPassword()
focal_class.identifier: getPassword
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getPassword()
focal_class.class_method_signature: GeoStoreClient.setPassword(String password)
focal_class.full_signature: public void setPassword(String password)
focal_class.identifier: setPassword
focal_class.modifiers: public
focal_class.parameters: (String password)
focal_class.return: void
focal_class.signature: void setPassword(String password)
focal_class.class_method_signature: GeoStoreClient.getUsername()
focal_class.full_signature: public String getUsername()
focal_class.identifier: getUsername
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getUsername()
focal_class.class_method_signature: GeoStoreClient.setUsername(String username)
focal_class.full_signature: public void setUsername(String username)
focal_class.identifier: setUsername
focal_class.modifiers: public
focal_class.parameters: (String username)
focal_class.return: void
focal_class.signature: void setUsername(String username)
focal_class.class_method_signature: GeoStoreClient.getGeostoreRestUrl()
focal_class.full_signature: public String getGeostoreRestUrl()
focal_class.identifier: getGeostoreRestUrl
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getGeostoreRestUrl()
focal_class.class_method_signature: GeoStoreClient.setGeostoreRestUrl(String geostoreRestUrl)
focal_class.full_signature: public void setGeostoreRestUrl(String geostoreRestUrl)
focal_class.identifier: setGeostoreRestUrl
focal_class.modifiers: public
focal_class.parameters: (String geostoreRestUrl)
focal_class.return: void
focal_class.signature: void setGeostoreRestUrl(String geostoreRestUrl)
focal_method.body: public ShortResource getShortResource(long id)
      {
          WebResource wr = getBaseWebResource("extjs", "resource", id);
          return wr.get(ShortResource.class);
      }
focal_method.class_method_signature: GeoStoreClient.getShortResource(long id)
focal_method.full_signature: public ShortResource getShortResource(long id)
focal_method.identifier: getShortResource
focal_method.invocations: getBaseWebResource get
focal_method.modifiers: public
focal_method.parameters: (long id)
focal_method.return: ShortResource
focal_method.signature: ShortResource getShortResource(long id)