test_class.file: src/core/services-impl/src/test/java/it/geosolutions/geostore/services/ResourceServiceImplTest.java
test_class.identifier: ResourceServiceImplTest
test_class.superclass: extends ServiceTestBase
test_case.body: @Test
      public void testGetSecurityRules() throws Exception {
      	long userId = createUser("user1", Role.USER, "password");
      	User user = new User();
      	user.setId(userId);
      	
      	long groupId = createGroup("group1");
      	UserGroup group = new UserGroup();
      	group.setId(groupId);
      	
      	List<SecurityRule> rules = new ArrayList<>();
      	
      	SecurityRule rule = new SecurityRule();
      	rule.setUser(user);
      	rule.setCanRead(true);
      	rules.add(rule);
      	
      	rule = new SecurityRule();
      	rule.setCanRead(true);
      	rule.setCanWrite(true);
      	rule.setGroup(group);
      	rules.add(rule);
      	
      	long resourceId = createResource("name1", "description1", "MAP", rules);
      	
      	List<SecurityRule> writtenRules = resourceService.getSecurityRules(resourceId);
      	
      	assertEquals(2, writtenRules.size());
      	
      	SecurityRule userRule = writtenRules.get(0);
  		assertNotNull(userRule.getUser());
      	assertNull(userRule.getGroup());
      	assertEquals((Long)userId, userRule.getUser().getId());
      	assertEquals((Long)resourceId, userRule.getResource().getId());
      	
      	SecurityRule groupRule = writtenRules.get(1);
  		assertNotNull(groupRule.getGroup());
      	assertNull(groupRule.getUser());
      	assertEquals((Long)groupId, groupRule.getGroup().getId());
      	assertEquals((Long)resourceId, groupRule.getResource().getId());
      	
      }
test_case.class_method_signature: ResourceServiceImplTest.testGetSecurityRules()
test_case.full_signature: @Test public void testGetSecurityRules()
test_case.identifier: testGetSecurityRules
test_case.invocations: createUser setId createGroup setId setUser setCanRead add setCanRead setCanWrite setGroup add createResource getSecurityRules assertEquals size get assertNotNull getUser assertNull getGroup assertEquals getId getUser assertEquals getId getResource get assertNotNull getGroup assertNull getUser assertEquals getId getGroup assertEquals getId getResource
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetSecurityRules()
focal_class.declarator: LOGGER = Logger.getLogger(ResourceServiceImpl.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = Logger.getLogger(ResourceServiceImpl.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: userGroupDAO
focal_class.modifier: private
focal_class.original_string: private UserGroupDAO userGroupDAO;
focal_class.type: UserGroupDAO
focal_class.var_name: userGroupDAO
focal_class.declarator: resourceDAO
focal_class.modifier: private
focal_class.original_string: private ResourceDAO resourceDAO;
focal_class.type: ResourceDAO
focal_class.var_name: resourceDAO
focal_class.declarator: attributeDAO
focal_class.modifier: private
focal_class.original_string: private AttributeDAO attributeDAO;
focal_class.type: AttributeDAO
focal_class.var_name: attributeDAO
focal_class.declarator: storedDataDAO
focal_class.modifier: private
focal_class.original_string: private StoredDataDAO storedDataDAO;
focal_class.type: StoredDataDAO
focal_class.var_name: storedDataDAO
focal_class.declarator: categoryDAO
focal_class.modifier: private
focal_class.original_string: private CategoryDAO categoryDAO;
focal_class.type: CategoryDAO
focal_class.var_name: categoryDAO
focal_class.declarator: securityDAO
focal_class.modifier: private
focal_class.original_string: private SecurityDAO securityDAO;
focal_class.type: SecurityDAO
focal_class.var_name: securityDAO
focal_class.file: src/core/services-impl/src/main/java/it/geosolutions/geostore/services/ResourceServiceImpl.java
focal_class.identifier: ResourceServiceImpl
focal_class.interfaces: implements ResourceService
focal_class.class_method_signature: ResourceServiceImpl.setSecurityDAO(SecurityDAO securityDAO)
focal_class.full_signature: public void setSecurityDAO(SecurityDAO securityDAO)
focal_class.identifier: setSecurityDAO
focal_class.modifiers: public
focal_class.parameters: (SecurityDAO securityDAO)
focal_class.return: void
focal_class.signature: void setSecurityDAO(SecurityDAO securityDAO)
focal_class.class_method_signature: ResourceServiceImpl.setStoredDataDAO(StoredDataDAO storedDataDAO)
focal_class.full_signature: public void setStoredDataDAO(StoredDataDAO storedDataDAO)
focal_class.identifier: setStoredDataDAO
focal_class.modifiers: public
focal_class.parameters: (StoredDataDAO storedDataDAO)
focal_class.return: void
focal_class.signature: void setStoredDataDAO(StoredDataDAO storedDataDAO)
focal_class.class_method_signature: ResourceServiceImpl.setResourceDAO(ResourceDAO resourceDAO)
focal_class.full_signature: public void setResourceDAO(ResourceDAO resourceDAO)
focal_class.identifier: setResourceDAO
focal_class.modifiers: public
focal_class.parameters: (ResourceDAO resourceDAO)
focal_class.return: void
focal_class.signature: void setResourceDAO(ResourceDAO resourceDAO)
focal_class.class_method_signature: ResourceServiceImpl.setAttributeDAO(AttributeDAO attributeDAO)
focal_class.full_signature: public void setAttributeDAO(AttributeDAO attributeDAO)
focal_class.identifier: setAttributeDAO
focal_class.modifiers: public
focal_class.parameters: (AttributeDAO attributeDAO)
focal_class.return: void
focal_class.signature: void setAttributeDAO(AttributeDAO attributeDAO)
focal_class.class_method_signature: ResourceServiceImpl.setCategoryDAO(CategoryDAO categoryDAO)
focal_class.full_signature: public void setCategoryDAO(CategoryDAO categoryDAO)
focal_class.identifier: setCategoryDAO
focal_class.modifiers: public
focal_class.parameters: (CategoryDAO categoryDAO)
focal_class.return: void
focal_class.signature: void setCategoryDAO(CategoryDAO categoryDAO)
focal_class.class_method_signature: ResourceServiceImpl.setUserGroupDAO(UserGroupDAO userGroupDAO)
focal_class.full_signature: public void setUserGroupDAO(UserGroupDAO userGroupDAO)
focal_class.identifier: setUserGroupDAO
focal_class.modifiers: public
focal_class.parameters: (UserGroupDAO userGroupDAO)
focal_class.return: void
focal_class.signature: void setUserGroupDAO(UserGroupDAO userGroupDAO)
focal_class.class_method_signature: ResourceServiceImpl.insert(Resource resource)
focal_class.full_signature: @Override public long insert(Resource resource)
focal_class.identifier: insert
focal_class.modifiers: @Override public
focal_class.parameters: (Resource resource)
focal_class.return: long
focal_class.signature: long insert(Resource resource)
focal_class.class_method_signature: ResourceServiceImpl.update(Resource resource)
focal_class.full_signature: @Override public long update(Resource resource)
focal_class.identifier: update
focal_class.modifiers: @Override public
focal_class.parameters: (Resource resource)
focal_class.return: long
focal_class.signature: long update(Resource resource)
focal_class.class_method_signature: ResourceServiceImpl.updateAttributes(long id, List<Attribute> attributes)
focal_class.full_signature: @Override public void updateAttributes(long id, List<Attribute> attributes)
focal_class.identifier: updateAttributes
focal_class.modifiers: @Override public
focal_class.parameters: (long id, List<Attribute> attributes)
focal_class.return: void
focal_class.signature: void updateAttributes(long id, List<Attribute> attributes)
focal_class.class_method_signature: ResourceServiceImpl.validateResourceName(Resource resource, boolean isUpdate)
focal_class.full_signature: private void validateResourceName(Resource resource, boolean isUpdate)
focal_class.identifier: validateResourceName
focal_class.modifiers: private
focal_class.parameters: (Resource resource, boolean isUpdate)
focal_class.return: void
focal_class.signature: void validateResourceName(Resource resource, boolean isUpdate)
focal_class.class_method_signature: ResourceServiceImpl.suggestValidResourceName(String baseResourceName)
focal_class.full_signature: private String suggestValidResourceName(String baseResourceName)
focal_class.identifier: suggestValidResourceName
focal_class.modifiers: private
focal_class.parameters: (String baseResourceName)
focal_class.return: String
focal_class.signature: String suggestValidResourceName(String baseResourceName)
focal_class.class_method_signature: ResourceServiceImpl.get(long id)
focal_class.full_signature: @Override public Resource get(long id)
focal_class.identifier: get
focal_class.modifiers: @Override public
focal_class.parameters: (long id)
focal_class.return: Resource
focal_class.signature: Resource get(long id)
focal_class.class_method_signature: ResourceServiceImpl.delete(long id)
focal_class.full_signature: @Override public boolean delete(long id)
focal_class.identifier: delete
focal_class.modifiers: @Override public
focal_class.parameters: (long id)
focal_class.return: boolean
focal_class.signature: boolean delete(long id)
focal_class.class_method_signature: ResourceServiceImpl.deleteResources(SearchFilter filter)
focal_class.full_signature: @Override public void deleteResources(SearchFilter filter)
focal_class.identifier: deleteResources
focal_class.modifiers: @Override public
focal_class.parameters: (SearchFilter filter)
focal_class.return: void
focal_class.signature: void deleteResources(SearchFilter filter)
focal_class.class_method_signature: ResourceServiceImpl.getList(String nameLike, Integer page, Integer entries, User authUser)
focal_class.full_signature: @Override public List<ShortResource> getList(String nameLike, Integer page, Integer entries, User authUser)
focal_class.identifier: getList
focal_class.modifiers: @Override public
focal_class.parameters: (String nameLike, Integer page, Integer entries, User authUser)
focal_class.return: List<ShortResource>
focal_class.signature: List<ShortResource> getList(String nameLike, Integer page, Integer entries, User authUser)
focal_class.class_method_signature: ResourceServiceImpl.getAll(Integer page, Integer entries, User authUser)
focal_class.full_signature: @Override public List<ShortResource> getAll(Integer page, Integer entries, User authUser)
focal_class.identifier: getAll
focal_class.modifiers: @Override public
focal_class.parameters: (Integer page, Integer entries, User authUser)
focal_class.return: List<ShortResource>
focal_class.signature: List<ShortResource> getAll(Integer page, Integer entries, User authUser)
focal_class.class_method_signature: ResourceServiceImpl.getCount(String nameLike)
focal_class.full_signature: @Override public long getCount(String nameLike)
focal_class.identifier: getCount
focal_class.modifiers: @Override public
focal_class.parameters: (String nameLike)
focal_class.return: long
focal_class.signature: long getCount(String nameLike)
focal_class.class_method_signature: ResourceServiceImpl.getCountByFilter(SearchFilter filter)
focal_class.full_signature: @Override public long getCountByFilter(SearchFilter filter)
focal_class.identifier: getCountByFilter
focal_class.modifiers: @Override public
focal_class.parameters: (SearchFilter filter)
focal_class.return: long
focal_class.signature: long getCountByFilter(SearchFilter filter)
focal_class.class_method_signature: ResourceServiceImpl.convertToShortList(List<Resource> list, User authUser)
focal_class.full_signature: private List<ShortResource> convertToShortList(List<Resource> list, User authUser)
focal_class.identifier: convertToShortList
focal_class.modifiers: private
focal_class.parameters: (List<Resource> list, User authUser)
focal_class.return: List<ShortResource>
focal_class.signature: List<ShortResource> convertToShortList(List<Resource> list, User authUser)
focal_class.class_method_signature: ResourceServiceImpl.extratcGroupNames(Set<UserGroup> groups)
focal_class.full_signature: public static List<String> extratcGroupNames(Set<UserGroup> groups)
focal_class.identifier: extratcGroupNames
focal_class.modifiers: public static
focal_class.parameters: (Set<UserGroup> groups)
focal_class.return: List<String>
focal_class.signature: List<String> extratcGroupNames(Set<UserGroup> groups)
focal_class.class_method_signature: ResourceServiceImpl.getAttributes(long id)
focal_class.full_signature: @Override public List<ShortAttribute> getAttributes(long id)
focal_class.identifier: getAttributes
focal_class.modifiers: @Override public
focal_class.parameters: (long id)
focal_class.return: List<ShortAttribute>
focal_class.signature: List<ShortAttribute> getAttributes(long id)
focal_class.class_method_signature: ResourceServiceImpl.convertToShortAttributeList(List<Attribute> list)
focal_class.full_signature: private List<ShortAttribute> convertToShortAttributeList(List<Attribute> list)
focal_class.identifier: convertToShortAttributeList
focal_class.modifiers: private
focal_class.parameters: (List<Attribute> list)
focal_class.return: List<ShortAttribute>
focal_class.signature: List<ShortAttribute> convertToShortAttributeList(List<Attribute> list)
focal_class.class_method_signature: ResourceServiceImpl.getAttribute(long id, String name)
focal_class.full_signature: @Override public ShortAttribute getAttribute(long id, String name)
focal_class.identifier: getAttribute
focal_class.modifiers: @Override public
focal_class.parameters: (long id, String name)
focal_class.return: ShortAttribute
focal_class.signature: ShortAttribute getAttribute(long id, String name)
focal_class.class_method_signature: ResourceServiceImpl.updateAttribute(long id, String name, String value)
focal_class.full_signature: @Override public long updateAttribute(long id, String name, String value)
focal_class.identifier: updateAttribute
focal_class.modifiers: @Override public
focal_class.parameters: (long id, String name, String value)
focal_class.return: long
focal_class.signature: long updateAttribute(long id, String name, String value)
focal_class.class_method_signature: ResourceServiceImpl.insertAttribute(long id, String name, String value, DataType type)
focal_class.full_signature: @Override public long insertAttribute(long id, String name, String value, DataType type)
focal_class.identifier: insertAttribute
focal_class.modifiers: @Override public
focal_class.parameters: (long id, String name, String value, DataType type)
focal_class.return: long
focal_class.signature: long insertAttribute(long id, String name, String value, DataType type)
focal_class.class_method_signature: ResourceServiceImpl.getResources(SearchFilter filter, User authUser)
focal_class.full_signature: @Override public List<ShortResource> getResources(SearchFilter filter, User authUser)
focal_class.identifier: getResources
focal_class.modifiers: @Override public
focal_class.parameters: (SearchFilter filter, User authUser)
focal_class.return: List<ShortResource>
focal_class.signature: List<ShortResource> getResources(SearchFilter filter, User authUser)
focal_class.class_method_signature: ResourceServiceImpl.getResources(SearchFilter filter, Integer page, Integer entries,
              boolean includeAttributes, boolean includeData, User authUser)
focal_class.full_signature: public List<Resource> getResources(SearchFilter filter, Integer page, Integer entries,
              boolean includeAttributes, boolean includeData, User authUser)
focal_class.identifier: getResources
focal_class.modifiers: public
focal_class.parameters: (SearchFilter filter, Integer page, Integer entries,
              boolean includeAttributes, boolean includeData, User authUser)
focal_class.return: List<Resource>
focal_class.signature: List<Resource> getResources(SearchFilter filter, Integer page, Integer entries,
              boolean includeAttributes, boolean includeData, User authUser)
focal_class.class_method_signature: ResourceServiceImpl.configResourceList(List<Resource> list, boolean includeAttributes,
              boolean includeData, User authUser)
focal_class.full_signature: private List<Resource> configResourceList(List<Resource> list, boolean includeAttributes,
              boolean includeData, User authUser)
focal_class.identifier: configResourceList
focal_class.modifiers: private
focal_class.parameters: (List<Resource> list, boolean includeAttributes,
              boolean includeData, User authUser)
focal_class.return: List<Resource>
focal_class.signature: List<Resource> configResourceList(List<Resource> list, boolean includeAttributes,
              boolean includeData, User authUser)
focal_class.class_method_signature: ResourceServiceImpl.getResources(SearchFilter filter, Integer page, Integer entries,
              User authUser)
focal_class.full_signature: @Override public List<ShortResource> getResources(SearchFilter filter, Integer page, Integer entries,
              User authUser)
focal_class.identifier: getResources
focal_class.modifiers: @Override public
focal_class.parameters: (SearchFilter filter, Integer page, Integer entries,
              User authUser)
focal_class.return: List<ShortResource>
focal_class.signature: List<ShortResource> getResources(SearchFilter filter, Integer page, Integer entries,
              User authUser)
focal_class.class_method_signature: ResourceServiceImpl.getResourcesFull(SearchFilter filter, User authUser)
focal_class.full_signature: @Override public List<Resource> getResourcesFull(SearchFilter filter, User authUser)
focal_class.identifier: getResourcesFull
focal_class.modifiers: @Override public
focal_class.parameters: (SearchFilter filter, User authUser)
focal_class.return: List<Resource>
focal_class.signature: List<Resource> getResourcesFull(SearchFilter filter, User authUser)
focal_class.class_method_signature: ResourceServiceImpl.search(Search searchCriteria)
focal_class.full_signature: private List<Resource> search(Search searchCriteria)
focal_class.identifier: search
focal_class.modifiers: private
focal_class.parameters: (Search searchCriteria)
focal_class.return: List<Resource>
focal_class.signature: List<Resource> search(Search searchCriteria)
focal_class.class_method_signature: ResourceServiceImpl.getUserSecurityRule(String userName, long resourceId)
focal_class.full_signature: @Override public List<SecurityRule> getUserSecurityRule(String userName, long resourceId)
focal_class.identifier: getUserSecurityRule
focal_class.modifiers: @Override public
focal_class.parameters: (String userName, long resourceId)
focal_class.return: List<SecurityRule>
focal_class.signature: List<SecurityRule> getUserSecurityRule(String userName, long resourceId)
focal_class.class_method_signature: ResourceServiceImpl.getGroupSecurityRule(List<String> groupNames, long resourceId)
focal_class.full_signature: @Override public List<SecurityRule> getGroupSecurityRule(List<String> groupNames, long resourceId)
focal_class.identifier: getGroupSecurityRule
focal_class.modifiers: @Override public
focal_class.parameters: (List<String> groupNames, long resourceId)
focal_class.return: List<SecurityRule>
focal_class.signature: List<SecurityRule> getGroupSecurityRule(List<String> groupNames, long resourceId)
focal_class.class_method_signature: ResourceServiceImpl.getSecurityRules(long id)
focal_class.full_signature: @Override public List<SecurityRule> getSecurityRules(long id)
focal_class.identifier: getSecurityRules
focal_class.modifiers: @Override public
focal_class.parameters: (long id)
focal_class.return: List<SecurityRule>
focal_class.signature: List<SecurityRule> getSecurityRules(long id)
focal_class.class_method_signature: ResourceServiceImpl.updateSecurityRules(long id, List<SecurityRule> rules)
focal_class.full_signature: @Override public void updateSecurityRules(long id, List<SecurityRule> rules)
focal_class.identifier: updateSecurityRules
focal_class.modifiers: @Override public
focal_class.parameters: (long id, List<SecurityRule> rules)
focal_class.return: void
focal_class.signature: void updateSecurityRules(long id, List<SecurityRule> rules)
focal_class.class_method_signature: ResourceServiceImpl.getCountByFilterAndUser(SearchFilter filter, User user)
focal_class.full_signature: public long getCountByFilterAndUser(SearchFilter filter, User user)
focal_class.identifier: getCountByFilterAndUser
focal_class.modifiers: public
focal_class.parameters: (SearchFilter filter, User user)
focal_class.return: long
focal_class.signature: long getCountByFilterAndUser(SearchFilter filter, User user)
focal_class.class_method_signature: ResourceServiceImpl.getCountByFilterAndUser(String nameLike, User user)
focal_class.full_signature: public long getCountByFilterAndUser(String nameLike, User user)
focal_class.identifier: getCountByFilterAndUser
focal_class.modifiers: public
focal_class.parameters: (String nameLike, User user)
focal_class.return: long
focal_class.signature: long getCountByFilterAndUser(String nameLike, User user)
focal_method.body: @Override
      public List<SecurityRule> getSecurityRules(long id)
              throws BadRequestServiceEx, InternalErrorServiceEx
      {
          return securityDAO.findSecurityRules(id);
      }
focal_method.class_method_signature: ResourceServiceImpl.getSecurityRules(long id)
focal_method.full_signature: @Override public List<SecurityRule> getSecurityRules(long id)
focal_method.identifier: getSecurityRules
focal_method.invocations: findSecurityRules
focal_method.modifiers: @Override public
focal_method.parameters: (long id)
focal_method.return: List<SecurityRule>
focal_method.signature: List<SecurityRule> getSecurityRules(long id)