Interface GenDataProvider
- All Known Implementing Classes:
GenDataProviderImpl
public interface GenDataProvider
This component is used to efficiently load required attributes.
Attributes, that can be hashed, must be loaded first via load* methods. E.g.: to be able to call getResourceAttributesHashes, one must first call loadResourceSpecificAttributes.
IMPORTANT: this components has a STATE! The order of load methods is important. E.g.: loadResourceSpecificAttributes will overwrite data for previously loaded resource.
- Author:
- Vojtech Sassmann invalid input: '<'vojtech.sassmann@gmail.com>
-
Method Summary
Modifier and TypeMethodDescriptionReturns map of all loaded attributes grouped by their hashes.Return all hashes for facility attributes.getGroupAttributesHashes
(Resource resource, Group group) Returns all hashes relevant for given group.getMemberAttributesHashes
(Resource resource, Member member) Return all hashes relevant for given member.getMemberAttributesHashes
(Resource resource, Member member, Group group) Return all hashes relevant for given member.getResourceAttributesHashes
(Resource resource, boolean addVoAttributes) Return all hashes for given resource attributes.void
Loads Facility attributes.void
loadGroupsAttributes
(Resource resource, List<Group> groups) Loads Group and Group-Resource attributes.void
loadMemberGroupAttributes
(Group group, List<Member> members) Loads Member-Group attributes.void
loadResourceAttributes
(Resource resource, List<Member> members, boolean loadVoAttributes) Loads Resource and Member specific attributes.
-
Method Details
-
getAllFetchedAttributes
Returns map of all loaded attributes grouped by their hashes. Returns only non-empty lists, and only lists, for which their hashes has been returned, by some get.*attributesHashes method.- Returns:
- map of hashes attributes
-
getFacilityAttributesHashes
Return all hashes for facility attributes.- Returns:
- list of hashes
-
getGroupAttributesHashes
Returns all hashes relevant for given group. Group and Group-Resource attributes.- Parameters:
resource
- resource used to get Group-Resource attributes.group
- group- Returns:
- list of hashes
-
getMemberAttributesHashes
Return all hashes relevant for given member. Member, User, Member-Resource, User-Facility.- Parameters:
resource
- resource used to get member-resource attributes hashmember
- given member- Returns:
- list of hashes
-
getMemberAttributesHashes
Return all hashes relevant for given member. Member, User, Member-Resource, User-Facility and Member-Group.- Parameters:
resource
- resource used to get member-resource attributes hashmember
- given membergroup
- group used to get member-group attributes- Returns:
- list of hashes
-
getResourceAttributesHashes
Return all hashes for given resource attributes. If addVoAttributes is true, also adds a hash for resource's vo attributes, if they are not empty.- Parameters:
resource
- resourceaddVoAttributes
- if true, add also vo attributes hash, if not empty- Returns:
- list of hashes
-
loadFacilityAttributes
void loadFacilityAttributes()Loads Facility attributes. -
loadGroupsAttributes
Loads Group and Group-Resource attributes. Group attributes are loaded only for groups that has not been already loaded.- Parameters:
resource
- resourcegroups
- groups
-
loadMemberGroupAttributes
Loads Member-Group attributes.- Parameters:
group
- groupsmembers
- members
-
loadResourceAttributes
Loads Resource and Member specific attributes. Resouce, Member, User, User-Facility (if not already loaded). Resource-Member (always) Vo - if specified by loadVoAttributes- Parameters:
resource
- resourcemembers
- membersloadVoAttributes
- specifies, if the voAttributesShould be loaded as well.
-