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.voidLoads Facility attributes.voidloadGroupsAttributes(Resource resource, List<Group> groups) Loads Group and Group-Resource attributes.voidloadMemberGroupAttributes(Group group, List<Member> members) Loads Member-Group attributes.voidloadResourceAttributes(Resource resource, List<Member> members, boolean loadVoAttributes) Loads Resource and Member specific attributes.
-
Method Details
-
getAllFetchedAttributes
-
getFacilityAttributesHashes
-
getGroupAttributesHashes
-
getMemberAttributesHashes
-
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
-
loadMemberGroupAttributes
-
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.
-