Package cz.metacentrum.perun.core.blImpl
Class AttributesManagerBlImpl
java.lang.Object
cz.metacentrum.perun.core.blImpl.AttributesManagerBlImpl
- All Implemented Interfaces:
AttributesManagerBl
AttributesManager buisness logic.
- Author:
- Slavek Licehammer glory@ics.muni.cz
-
Constructor Summary
ConstructorsConstructorDescriptionAttributesManagerBlImpl
(AttributesManagerImplApi attributesManagerImpl) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkActionTypeExists
(PerunSession sess, ActionType actionType) Deprecated.void
checkAttributeAssignment
(PerunSession sess, AttributeDefinition attributeDefinition, PerunBean handler) Check if attribute is from the same namespace as it's handlervoid
checkAttributeAssignment
(PerunSession sess, AttributeDefinition attributeDefinition, PerunBean handler1, PerunBean handler2) Check if attribute is from the same namespace as combination of perunBean handlers.void
checkAttributeDependencies
(PerunSession sess, RichAttribute richAttr) This method check validity of value on all attributes which depends on the attributes in richAttr object.void
checkAttributeExists
(PerunSession sess, AttributeDefinition attribute) void
checkAttributeSemantics
(PerunSession sess, Facility facility, Attribute attribute) Check if value of this facility attribute has valid semantics.void
checkAttributeSemantics
(PerunSession sess, Facility facility, User user, Attribute attribute) Check if value of this user-facility attribute has valid semantics.void
checkAttributeSemantics
(PerunSession sess, Group group, Attribute attribute) Check if value of this group attribute has valid semantics.void
checkAttributeSemantics
(PerunSession sess, Host host, Attribute attribute) Check if the value of this host attribute has valid semanticsvoid
checkAttributeSemantics
(PerunSession sess, Member member, Attribute attribute) Check if value of this member attribute has valid semantics.void
checkAttributeSemantics
(PerunSession sess, Member member, Group group, Attribute attribute) Check if value of this member-group attribute has valid semantics.void
checkAttributeSemantics
(PerunSession sess, Member member, Resource resource, Attribute attribute) Check if value of this member-resource attribute has valid semantics.void
checkAttributeSemantics
(PerunSession sess, Resource resource, Attribute attribute) Check if value of this resource attribute has valid semantics.void
checkAttributeSemantics
(PerunSession sess, Resource resource, Group group, Attribute attribute) Check if value of this group-resource attribute has valid semanticsvoid
checkAttributeSemantics
(PerunSession sess, UserExtSource ues, Attribute attribute) Check if value of this user ext source attribute has valid semantics.void
checkAttributeSemantics
(PerunSession sess, User user, Attribute attribute) Check if value of this user attribute has valid semantics.void
checkAttributeSemantics
(PerunSession sess, Vo vo, Attribute attribute) Check if value of this vo attribute has valid semantics.void
checkAttributeSemantics
(PerunSession sess, String key, Attribute attribute) Check if the value of this entityless attribute has valid semanticsvoid
checkAttributesExists
(PerunSession sess, List<? extends AttributeDefinition> attributes) void
checkAttributesSemantics
(PerunSession sess, Facility facility, Resource resource, Group group, User user, Member member, List<Attribute> attributes) Check if value of attributes has valid semantics.void
checkAttributesSemantics
(PerunSession sess, Facility facility, Resource resource, User user, Member member, List<Attribute> attributes) Check if value of attributes has valid semantics.void
checkAttributesSemantics
(PerunSession sess, Facility facility, User user, List<Attribute> attributes) Batch version of checkAttributeSemanticsvoid
checkAttributesSemantics
(PerunSession sess, Facility facility, List<Attribute> attributes) Batch version of checkAttributeSemanticsvoid
checkAttributesSemantics
(PerunSession sess, Group group, List<Attribute> attributes) Batch version of checkAttributeSemanticsvoid
checkAttributesSemantics
(PerunSession sess, Host host, List<Attribute> attributes) Batch version of checkAttributeSemanticsvoid
checkAttributesSemantics
(PerunSession sess, Member member, Group group, List<Attribute> attributes) Batch version of checkAttributeSemanticsvoid
checkAttributesSemantics
(PerunSession sess, Member member, Group group, List<Attribute> attributes, boolean workWithUserAttributes) Batch version of checkAttributeSemanticsvoid
checkAttributesSemantics
(PerunSession sess, Member member, Resource resource, List<Attribute> attributes) Batch version of checkAttributeSemanticsvoid
checkAttributesSemantics
(PerunSession sess, Member member, Resource resource, List<Attribute> attributes, boolean workWithUserAttributes) Batch version of checkAttributeSemanticsvoid
checkAttributesSemantics
(PerunSession sess, Member member, List<Attribute> attributes) Batch version of checkAttributeSemanticsvoid
checkAttributesSemantics
(PerunSession sess, Resource resource, Group group, List<Attribute> attributes) batch version of checkAttributeSemanticsvoid
checkAttributesSemantics
(PerunSession sess, Resource resource, Group group, List<Attribute> attributes, boolean workWithGroupAttribute) batch version of checkAttributeSemantics with workWithGroupAttributes parameter If workWithGroupAttributes is true, checks whether attribute is group-resource or group attribute.void
checkAttributesSemantics
(PerunSession sess, Resource resource, List<Attribute> attributes) Batch version of checkAttributeSemanticsvoid
checkAttributesSemantics
(PerunSession sess, UserExtSource ues, List<Attribute> attributes) Batch version of checkAttributeSemanticsvoid
checkAttributesSemantics
(PerunSession sess, User user, List<Attribute> attributes) Batch version of checkAttributeSemanticsvoid
checkAttributesSemantics
(PerunSession sess, Vo vo, List<Attribute> attributes) Batch version of checkAttributeSemanticsvoid
checkAttributesSyntax
(PerunSession sess, Facility facility, Resource resource, Group group, User user, Member member, List<Attribute> attributes) Check if value of attributes has valid syntax.void
checkAttributesSyntax
(PerunSession sess, Facility facility, Resource resource, User user, Member member, List<Attribute> attributes) Check if value of attributes has valid syntax.void
checkAttributesSyntax
(PerunSession sess, Facility facility, User user, List<Attribute> attributes) Batch version of checkAttributeSyntaxvoid
checkAttributesSyntax
(PerunSession sess, Facility facility, List<Attribute> attributes) Batch version of checkAttributeSyntaxvoid
checkAttributesSyntax
(PerunSession sess, Group group, List<Attribute> attributes) Batch version of checkAttributeSyntaxvoid
checkAttributesSyntax
(PerunSession sess, Host host, List<Attribute> attributes) Batch version of checkAttributeSyntaxvoid
checkAttributesSyntax
(PerunSession sess, Member member, Group group, List<Attribute> attributes) Batch version of checkAttributeSyntaxvoid
checkAttributesSyntax
(PerunSession sess, Member member, Group group, List<Attribute> attributes, boolean workWithUserAttributes) Batch version of checkAttributeSyntaxvoid
checkAttributesSyntax
(PerunSession sess, Member member, Resource resource, List<Attribute> attributes) Batch version of checkAttributeSyntaxvoid
checkAttributesSyntax
(PerunSession sess, Member member, Resource resource, List<Attribute> attributes, boolean workWithUserAttributes) Batch version of checkAttributeSyntaxvoid
checkAttributesSyntax
(PerunSession sess, Member member, List<Attribute> attributes) Batch version of checkAttributeSyntaxvoid
checkAttributesSyntax
(PerunSession sess, Resource resource, Group group, List<Attribute> attributes) batch version of checkAttributeSyntaxvoid
checkAttributesSyntax
(PerunSession sess, Resource resource, Group group, List<Attribute> attributes, boolean workWithGroupAttribute) batch version of checkAttributeSyntax with workWithGroupAttributes parameter.void
checkAttributesSyntax
(PerunSession sess, Resource resource, List<Attribute> attributes) Batch version of checkAttributeSyntaxvoid
checkAttributesSyntax
(PerunSession sess, UserExtSource ues, List<Attribute> attributes) Batch version of checkAttributeSyntaxvoid
checkAttributesSyntax
(PerunSession sess, User user, List<Attribute> attributes) Batch version of checkAttributeSyntaxvoid
checkAttributesSyntax
(PerunSession sess, Vo vo, List<Attribute> attributes) Batch version of checkAttributeSyntaxvoid
checkAttributeSyntax
(PerunSession sess, Facility facility, Attribute attribute) Check if value of this facility attribute has valid syntax.void
checkAttributeSyntax
(PerunSession sess, Facility facility, User user, Attribute attribute) Check if value of this user-facility attribute has valid syntax.void
checkAttributeSyntax
(PerunSession sess, Group group, Attribute attribute) Check if value of this group attribute has valid syntax.void
checkAttributeSyntax
(PerunSession sess, Host host, Attribute attribute) Check if the value of this host attribute has valid syntax.void
checkAttributeSyntax
(PerunSession sess, Member member, Attribute attribute) Check if value of this member attribute has valid syntax.void
checkAttributeSyntax
(PerunSession sess, Member member, Group group, Attribute attribute) Check if value of this member-group attribute has valid syntax.void
checkAttributeSyntax
(PerunSession sess, Member member, Resource resource, Attribute attribute) Check if value of this member-resource attribute has valid syntax.void
checkAttributeSyntax
(PerunSession sess, Resource resource, Attribute attribute) Check if value of this resource attribute has valid syntax.void
checkAttributeSyntax
(PerunSession sess, Resource resource, Group group, Attribute attribute) Check if value of this group-resource attribute has valid syntaxvoid
checkAttributeSyntax
(PerunSession sess, UserExtSource ues, Attribute attribute) Check if value of this user external source attribute has valid syntax.void
checkAttributeSyntax
(PerunSession sess, User user, Attribute attribute) Check if value of this user attribute has valid syntax.void
checkAttributeSyntax
(PerunSession sess, Vo vo, Attribute attribute) Check if value of this vo attribute has valid syntax.void
checkAttributeSyntax
(PerunSession sess, String key, Attribute attribute) Check if the value of this entityless attribute has valid syntaxvoid
checkGroupIsFromTheSameVoLikeResource
(PerunSession sess, Group group, Resource resource) Check if group is assigned on resource.void
checkNamespace
(PerunSession sess, AttributeDefinition attribute, String namespace) Determine if attribute is from specified namespace.void
checkNamespace
(PerunSession sess, List<? extends AttributeDefinition> attributes, String namespace) Determine if attributes are from specified namespace.int
convertAttributeToNonunique
(PerunSession session, int attrId) Converts attribute to nonunique.void
convertAttributeToUnique
(PerunSession session, int attrId) Converts attribute to unique.createAttribute
(PerunSession sess, AttributeDefinition attribute) Creates an attribute, the attribute is stored into the appropriate DB table according to the namespace Also tries to initialize its attribute module and register the module for listening Auditer messages.void
deleteAllAttributeAuthz
(PerunSession sess, AttributeDefinition attribute) Deprecated.void
deleteAttribute
(PerunSession sess, AttributeDefinition attribute) Deletes the attribute.void
deleteAttribute
(PerunSession sess, AttributeDefinition attributeDefinition, boolean force) Deletes the attribute.void
doTheMagic
(PerunSession sess, Member member) Same as doTheMagic(sess, member, false);void
doTheMagic
(PerunSession sess, Member member, boolean trueMagic) This function takes all member-related attributes (member, user, member-resource, user-facility) and tries to fill them and set them.static String
escapeListAttributeValue
(String value) static String
escapeMapAttributeValue
(String value) escapeQueryParameters
(String value) Escapes QUERY PARAMETER VALUES in URL value.fillAttribute
(PerunSession sess, Facility facility, User user, Attribute attribute) This method try to fill value of the user-facility attribute.fillAttribute
(PerunSession sess, Group group, Attribute attribute) fillAttribute
(PerunSession sess, Host host, Attribute attribute) This method tries to fill value of the host attribute.fillAttribute
(PerunSession sess, Member member, Attribute attribute) This method try to fill value of the member attribute.fillAttribute
(PerunSession sess, Member member, Group group, Attribute attribute) This method tries to fill value of the member-group attribute.fillAttribute
(PerunSession sess, Member member, Resource resource, Attribute attribute) This method try to fill value of the member-resource attribute.fillAttribute
(PerunSession sess, Resource resource, Attribute attribute) This method try to fill a value of the resource attribute.fillAttribute
(PerunSession sess, Resource resource, Group group, Attribute attribute) This method tries to fill value of group-resource attribute.fillAttribute
(PerunSession sess, UserExtSource ues, Attribute attribute) This method tries to fill value of the user external source attribute.fillAttribute
(PerunSession sess, User user, Attribute attribute) This method try to fill value of the user attribute.fillAttributes
(PerunSession sess, Facility facility, Resource resource, User user, Member member, List<Attribute> attributes) This method try to fill value of the user, member, member-resource and user-facility attributes.fillAttributes
(PerunSession sess, Facility facility, Resource resource, User user, Member member, List<Attribute> attributes, boolean returnOnlyAttributesWithChangedValue) This method try to fill value of the user, member, member-resource and user-facility attributes.fillAttributes
(PerunSession sess, Facility facility, User user, List<Attribute> attributes) Batch version of fillAttribute.fillAttributes
(PerunSession sess, Group group, List<Attribute> groupReqAttributes) fillAttributes
(PerunSession sess, Host host, List<Attribute> attributes) Batch version of fillAttribute.fillAttributes
(PerunSession sess, Member member, Group group, List<Attribute> attributes) Batch version of fillAttribute.fillAttributes
(PerunSession sess, Member member, Group group, List<Attribute> attributes, boolean workWithUserAttributes) fillAttributes
(PerunSession sess, Member member, Resource resource, List<Attribute> attributes) Batch version of fillAttribute.fillAttributes
(PerunSession sess, Member member, Resource resource, List<Attribute> attributes, boolean workWithUserAttributes) fillAttributes
(PerunSession sess, Member member, List<Attribute> attributes) Batch version of fillAttribute.fillAttributes
(PerunSession sess, Resource resource, Group group, List<Attribute> attributes) Batch version of fillAttribute.fillAttributes
(PerunSession sess, Resource resource, Group group, List<Attribute> attributes, boolean workWithGroupAttributes) fillAttributes
(PerunSession sess, Resource resource, List<Attribute> attributes) Batch version of fillAttribute.fillAttributes
(PerunSession sess, UserExtSource ues, List<Attribute> attributes) Batch version of fillAttribute.fillAttributes
(PerunSession sess, User user, List<Attribute> attributes) Batch version of fillAttribute.void
forceCheckAttributeSemantics
(PerunSession sess, Group group, Attribute attribute) Check if value of this group attribute has valid semantics no matter if attribute is required or not.void
forceCheckAttributeSemantics
(PerunSession sess, Resource resource, Attribute attribute) Check if value of this resource attribute has valid semantics no matter if attribute is required or not.void
forceCheckAttributesSemantics
(PerunSession sess, Facility facility, Resource resource, User user, Member member, List<Attribute> attributes) Check if value of attributes has valid semantics.getAllAttributesStartWithNameWithoutNullValue
(PerunSession sess, Group group, String startPartOfName) Get all non-empty attributes associated with the group starts with name startPartOfName.getAllAttributesStartWithNameWithoutNullValue
(PerunSession sess, Resource resource, String startPartOfName) Get all non-empty attributes associated with the resource starts with name startPartOfName.getAllNamespaces
(PerunSession sess) Returns list of all possible namespaces.getAllSimilarAttributeNames
(PerunSession sess, String startingPartOfAttributeName) This method get all similar attr_names which start with partOfAttributeNamegetAllValues
(PerunSession sess, AttributeDefinition attributeDefinition) Get all values for specified attribute.getAnonymizedValue
(PerunSession sess, User user, Attribute attribute) Gets anonymized value of the attribute.getAttribute
(PerunSession sess, Facility facility, User user, String attributeName) Get particular attribute for the user on this facility.getAttribute
(PerunSession sess, Facility facility, String attributeName) Get particular attribute for the facility.getAttribute
(PerunSession sess, Group group, String attributeName) Get particular attribute for the group.getAttribute
(PerunSession sess, Host host, String attributeName) Get particular attribute for the hostgetAttribute
(PerunSession sess, Member member, Group group, String attributeName) Get particular attribute for the member in this group.getAttribute
(PerunSession sess, Member member, Resource resource, String attributeName) Get particular attribute for the member on this resource.getAttribute
(PerunSession sess, Member member, String attributeName) Get particular attribute for the member.getAttribute
(PerunSession sess, Resource resource, Group group, String attributeName) Get particular group attribute on the resourcegetAttribute
(PerunSession sess, Resource resource, String attributeName) Get particular attribute for the resource.getAttribute
(PerunSession sess, UserExtSource ues, String attributeName) Get particular attribute for the User External Source.getAttribute
(PerunSession sess, User user, String attributeName) Get particular attribute for the user.getAttribute
(PerunSession sess, Vo vo, String attributeName) Get particular attribute for the vo.getAttribute
(PerunSession sess, String key, String attributeName) Get particular entityless attributegetAttributeById
(PerunSession sess, Facility facility, int id) Get particular attribute for the facility.getAttributeById
(PerunSession sess, Facility facility, User user, int id) Get particular attribute for the user on this facility.getAttributeById
(PerunSession sess, Group group, int id) Get particular group attributegetAttributeById
(PerunSession sess, Host host, int id) Get particular attribute for the hostgetAttributeById
(PerunSession sess, Member member, int id) Get particular attribute for the member.getAttributeById
(PerunSession sess, Member member, Group group, int id) Get particular attribute for the member in this group.getAttributeById
(PerunSession sess, Member member, Resource resource, int id) Get particular attribute for the member on this resource.getAttributeById
(PerunSession sess, Resource resource, int id) Get particular attribute for the resource.getAttributeById
(PerunSession sess, Resource resource, Group group, int id) Get particular group-resource attributegetAttributeById
(PerunSession sess, UserExtSource ues, int id) Get particular attribute for the user external sourcegetAttributeById
(PerunSession sess, User user, int id) Get particular attribute for the user.getAttributeById
(PerunSession sess, Vo vo, int id) Get particular attribute for the vo.getAttributeDefinition
(PerunSession sess, String attributeName) Get attribute definition (attribute without defined value).getAttributeDefinitionById
(PerunSession sess, int id) Get attribute definition (attribute without defined value).getAttributeForUpdate
(PerunSession sess, User user, String attributeName) Get particular attribute for the user for update - locking the attribute for user.Generates graph describing dependencies of attribute modules.getAttributeModulesDependenciesGraphAsString
(PerunSession session, GraphTextFormat format) Generates graph describing attribute modules dependencies.getAttributeModulesDependenciesGraphAsString
(PerunSession session, GraphTextFormat format, AttributeDefinition attributeDefinition) Generates graph describing dependencies for given AttributeDefinition.getAttributePolicyCollections
(PerunSession sess, int attributeId) Gets attribute policy collections for an attribute definition with given id.getAttributeRights
(PerunSession sess, int attributeId) Deprecated.getAttributeRules
(PerunSession sess, int attributeId) Gets attribute rules containing policy collections and critical actions for an attribute definition with given idgetAttributes
(PerunSession sess, Facility facility) Get all non-empty attributes associated with the facility.getAttributes
(PerunSession sess, Facility facility, Resource resource, User user, Member member) Get all non-empty member, user, member-resource and user-facility attributes.getAttributes
(PerunSession sess, Facility facility, User user) Get all non-empty attributes associated with the user on the facility.getAttributes
(PerunSession sess, Facility facility, List<String> attrNames) Get all attributes associated with the facility which have name in list attrNames (empty too).getAttributes
(PerunSession sess, Group group) Get all non-empty attributes associated with the group.getAttributes
(PerunSession sess, Group group, Member member, Resource resource, List<String> attrNames, boolean workWithUserAttributes) Gets selected attributes associated with the member, group and the resource.getAttributes
(PerunSession sess, Group group, List<String> attrNames) Get all attributes associated with the group which have name in list attrNames (empty too).getAttributes
(PerunSession sess, Host host) Get all non-empty attributes associated with the hostgetAttributes
(PerunSession sess, Host host, List<String> attrNames) Get all attributes associated with the host which have name in list attrNames (empty and virtual too).getAttributes
(PerunSession sess, Member member) Get all non-empty attributes associated with the member.getAttributes
(PerunSession sess, Member member, boolean workWithUserAttributes) Get all non-empty attributes associated with the member and if workWithUserAttributes is true, get all non-empty attributes associated with user, who is this member.getAttributes
(PerunSession sess, Member member, Group group) Get all non-empty attributes associated with the member in the group.getAttributes
(PerunSession sess, Member member, Group group, boolean workWithUserAttributes) Get all attributes associated with the member in the group and if workWithUserAttributes is true, gets also all non-empty user and member attributes.getAttributes
(PerunSession sess, Member member, Group group, List<String> attrNames) Get all attributes (empty and virtual too) associated with the member in the group which have name in list attrNames.getAttributes
(PerunSession sess, Member member, Group group, List<String> attrNames, boolean workWithUserAttributes) Get all attributes associated with the member in the group which have name in list attrNames (empty too).getAttributes
(PerunSession sess, Member member, Resource resource) Get all non-empty attributes associated with the member on the resource.getAttributes
(PerunSession sess, Member member, Resource resource, boolean workWithUserAttributes) Gets all non-empty attributes associated with the member on the resource and if workWithUserAttributes is true, gets also all non-empty user, user-facility and member attributes.getAttributes
(PerunSession sess, Member member, Resource resource, List<String> attrNames, boolean workWithUserAttributes) Gets selected non-empty attributes associated with the member and the resource.getAttributes
(PerunSession sess, Member member, List<String> attrNames) Get all attributes associated with the member which have name in list attrNames (empty and virtual too).getAttributes
(PerunSession sess, Member member, List<String> attrNames, boolean workWithUserAttributes) Get all attributes associated with the member which have name in list attrNames (empty too) Virtual attributes too.getAttributes
(PerunSession sess, Resource resource) Get all non-empty attributes associated with the resource.getAttributes
(PerunSession sess, Resource resource, Group group) Get all non-empty attributes associated with the group on resource.getAttributes
(PerunSession sess, Resource resource, Group group, boolean workWithGroupAttributes) getAttributes
(PerunSession sess, Resource resource, Group group, Member member, List<String> attrNames) Get all attributes by the list of attrNames if they are in one of these namespaces: - member - group - member-group - resource - member-resource - group-resource - user (get from member object) - facility (get from resource object) - user-facility Return all attributes even if they are empty or virtual.getAttributes
(PerunSession sess, Resource resource, Group group, List<String> attrNames, boolean workWithGroupAttributes) Get selected attributes associated with the group on resource.getAttributes
(PerunSession sess, Resource resource, List<String> attrNames) Get all attributes associated with the resource which have name in list attrNames (empty too).getAttributes
(PerunSession sess, User user) Get all non-empty attributes associated with the user.getAttributes
(PerunSession sess, UserExtSource ues) Get all non-empty attributes associated with the UserExtSource.getAttributes
(PerunSession sess, UserExtSource ues, List<String> attrNames) Get all attributes associated with the UserExtSource which have name in list attrNames (empty and virtual too).getAttributes
(PerunSession sess, User user, List<String> attrNames) Get all attributes associated with the user which have name in list attrNames (empty and virtual too).getAttributes
(PerunSession sess, Vo vo) Get all non-empty attributes associated with the vo.getAttributes
(PerunSession sess, Vo vo, List<String> attrNames) Get all attributes associated with the vo which have name in list attrNames (empty and virtual too).getAttributes
(PerunSession sess, String key) Get all entityless attributes with subject equaled String keygetAttributesByAttributeDefinition
(PerunSession sess, AttributeDefinition attributeDefinition) Returns all attributes with not-null value which fits the attributeDefinition.Get all attributes definition (attribute without defined value).getAttributesDefinition
(PerunSession sess, List<String> listOfAttributesNames) From listOfAttributesNames get list of attributeDefinitionsgetAttributesDefinitionByNamespace
(PerunSession sess, String namespace) Get attributes definition (attribute without defined value) with specified namespace.getAttributesDefinitionWithRights
(PerunSession sess, List<PerunBean> entities) Get all (for entities) attributeDefinitions which user has right to READ them and fill attribute writable (if user has also right to WRITE them).getCriticalAttributeActions
(PerunSession sess, int attrId) Returns critical actions on given attribute.getEntitylessAttributeForUpdate
(PerunSession sess, String key, String attrName) Returns entityless attribute by attr_id and key (subject) for update! For update - means lock row with attr_values in DB (entityless_attr_values with specific subject and attr_id) Not lock row in attr_names! IMPORTANT: This method use "select for update" and locks row for transaction.getEntitylessAttributes
(PerunSession sess, String attrName) Get all entityless attributes with attributeNamegetEntitylessAttributesWithKeys
(PerunSession sess, String attrName) Get entityless attributes mapped by their keys.getEntitylessAttributesWithKeys
(PerunSession sess, String attrName, List<String> keys) Get entityless attributes mapped by their keys.getEntitylessKeys
(PerunSession sess, AttributeDefinition attributeDefinition) Returns list of Keys which fits the attributeDefinition.getEntitylessStringAttributeMapping
(PerunSession sess, String attributeName) Gets map from keys to string values for an entityless attribute.getFriendlyNameFromAttributeName
(String attributeName) Gets the friendly name from the attribute name.Returns list of definitions of IdP attributes that are filled to fedInfogetLogins
(PerunSession sess, User user) Get all non-empty attributes with user's logins.getNamespaceFromAttributeName
(String attributeName) Gets the namespace from the attribute name.getPerunBeanIdsForUniqueAttributeValue
(PerunSession sess, Attribute attribute) Finds ids of PerunBeans that have the attribute's value for the attribute.Gets the perunBl.getRequiredAttributes
(PerunSession sess, Facility facility) Get facility attributes which are required by all services which are connected to this facility.getRequiredAttributes
(PerunSession sess, Facility facility, User user) Get user-facility attributes which are required by services which are related to this user-facility.getRequiredAttributes
(PerunSession sess, Member member, boolean workWithUserAttributes) Get member attributes which are required by services which are relater to this member and if is workWithUserAttributes = true, then also user required attributesgetRequiredAttributes
(PerunSession sess, Member member, Group group, boolean workWithUserAttributes) Get member, member-group attributes which are required by services which are related to this member and group.getRequiredAttributes
(PerunSession sess, Member member, Resource resource) Get member-resource attributes which are required by services which are relater to this member-resource.getRequiredAttributes
(PerunSession sess, Member member, Resource resource, boolean workWithUserAttributes) If workWithUserAttribute is false => Get member-resource attributes which are required by services which are relater to this member-resource.getRequiredAttributes
(PerunSession sess, Resource resource) Get resource attributes which are required by services which is related to this resource.getRequiredAttributes
(PerunSession sess, Resource resource, Service service, List<Member> members) Get member attributes which are required by service for each member in list of members.getRequiredAttributes
(PerunSession sess, Service service, Facility facility) Get facility attributes which are required by the service.getRequiredAttributes
(PerunSession sess, Service service, Facility facility, Resource resource, User user, Member member) Get memner, user, member-resource, user-facility attributes which are required by the service.getRequiredAttributes
(PerunSession sess, Service service, Facility facility, Resource resource, List<Member> members, boolean workWithUserAttributes) Get member-resource, member, user-facility and user attributes which are required by service for each member in list of members.getRequiredAttributes
(PerunSession sess, Service service, Facility facility, User user) Get user-facility attributes which are required by the service.getRequiredAttributes
(PerunSession sess, Service service, Facility facility, List<User> users) Get user-facility attributes which are required by the service for each user in list of users.getRequiredAttributes
(PerunSession sess, Service service, Group group) getRequiredAttributes
(PerunSession sess, Service service, Host host) Get host attributes which are required by servicegetRequiredAttributes
(PerunSession sess, Service service, Member member) Get member attributes which are required by the service.getRequiredAttributes
(PerunSession sess, Service service, Member member, Group group) Get member-group attributes which are required by the service.getRequiredAttributes
(PerunSession sess, Service service, Member member, Group group, boolean workWithUserAttributes) getRequiredAttributes
(PerunSession sess, Service service, Member member, Resource resource) Get member-resource attributes which are required by the service.getRequiredAttributes
(PerunSession sess, Service service, Member member, Resource resource, boolean workWithUserAttributes) getRequiredAttributes
(PerunSession sess, Service service, Resource resource) Get resource attributes which are required by the service.getRequiredAttributes
(PerunSession sess, Service service, Resource resource, Group group) getRequiredAttributes
(PerunSession sess, Service service, Resource resource, Group group, boolean withGroupAttributes) Get group-resource attributes which are required by the service.getRequiredAttributes
(PerunSession sess, Service service, Resource resource, Group group, Member member, boolean workWithUserAttributes) Get member, member-resource and member-group attributes which are required by the service.getRequiredAttributes
(PerunSession sess, Service service, Resource resource, List<Member> members) Get member-resource attributes which are required by service for each member in list of members.getRequiredAttributes
(PerunSession sess, Service service, User user) Get user attributes which are required by the service.getRequiredAttributes
(PerunSession sess, Service service, Vo vo) Get vo attributes which are required by the service.getRequiredAttributes
(PerunSession sess, Service service, List<Member> members, Group group) Get member-group attributes which are required by the service, for the given members and the given group.getRequiredAttributes
(PerunSession sess, Service service, List<User> users) Get user attributes which are required by the service for each user in list of users.getRequiredAttributes
(PerunSession sess, User user) Get user attributes which are required by services which are relater to this user.getRequiredAttributes
(PerunSession sess, List<Service> services, Facility facility, Resource resource, User user, Member member) Get member, user, member-resource, user-facility attributes which are required by the services.getRequiredAttributes
(PerunSession sess, List<Service> services, Resource resource) Get resource attributes which are required by selected services.getRequiredAttributes
(PerunSession sess, List<Service> services, Resource resource, Group group, boolean withGroupAttributes) Get group-resource attributes which are required by the services.getRequiredAttributesDefinition
(PerunSession sess, Service service) Get all attributes which are required by service.getRequiredAttributesForGroups
(PerunSession sess, Service service, List<Group> groups) Get group attributes which are required by the given service for given groups.getResourceRequiredAttributes
(PerunSession sess, Resource resourceToGetServicesFrom, Facility facility) Get facility attributes which are required by services.getResourceRequiredAttributes
(PerunSession sess, Resource resourceToGetServicesFrom, Facility facility, Resource resource, User user, Member member) Get member, user, member-resource and user-facility attributes which are required by services which are defined on "resourceToGetServicesFrom" resource.getResourceRequiredAttributes
(PerunSession sess, Resource resourceToGetServicesFrom, Facility facility, User user) Get user-facility attributes which are required by services.getResourceRequiredAttributes
(PerunSession sess, Resource resourceToGetServicesFrom, Group group) getResourceRequiredAttributes
(PerunSession sess, Resource resourceToGetServicesFrom, Host host) Get the host attributes which are required by services.getResourceRequiredAttributes
(PerunSession sess, Resource resourceToGetServicesFrom, Member member) Get member attributes which are required by services defined on specified resourcegetResourceRequiredAttributes
(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Group group) Get member-group attributes which are required by services.getResourceRequiredAttributes
(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Group group, boolean workWithUserAttributes) Get member-group attributes which are required by services if workWithUserAttributes is true also user and member attributes.getResourceRequiredAttributes
(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Resource resource) Get member-resource attributes which are required by services.getResourceRequiredAttributes
(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Resource resource, boolean workWithUserAttributes) Get member-resource attributes which are required by services and if workWithUserAttributes is true also user, user-facility and member attributes.getResourceRequiredAttributes
(PerunSession sess, Resource resourceToGetServicesFrom, Resource resource) Get resource attributes which are required by services.getResourceRequiredAttributes
(PerunSession sess, Resource resourceToGetServicesFrom, Resource resource, Group group) Get the group-resource attributes which are required by services.getResourceRequiredAttributes
(PerunSession sess, Resource resourceToGetServicesFrom, Resource resource, Group group, boolean workWithGroupAttributes) getResourceRequiredAttributes
(PerunSession sess, Resource resourceToGetServicesFrom, User user) Get user attributes which are required by services.getResourceRequiredAttributesDefinition
(PerunSession sess, Resource resource) Get attributes definions required by all services assigned on the resource.getRichAttributesWithHoldersForAttributeDefinition
(PerunSession sess, AttributeDefinition attrDef, RichAttribute aidingAttr) Method get attribute Definition attrDef and aidingAttr which only holds one or two useful objects in holders.getUserFacilityAttributesForAnyUser
(PerunSession sess, Facility facility) Get All user_facility attributes for any existing usergetUserVirtualAttributeModule
(PerunSession sess, AttributeDefinition attribute) Get user virtual attribute module by the attribute.getVirtualAttributes
(PerunSession sess, Facility facility, User user) Get all virtual attributes associated with the user on the facility.getVirtualAttributes
(PerunSession sess, Member member, Resource resource) Get all virtual attributes associated with the member-resource attributes.getVirtualAttributes
(PerunSession sess, User user) Get all virtual attributes associated with the user.protected void
boolean
isAttributeActionCritical
(PerunSession sess, AttributeDefinition attr, AttributeAction action) Checks if the action is critical on given attribute.boolean
isCoreAttribute
(PerunSession sess, AttributeDefinition attribute) Determine if attribute is core attribute.boolean
isCoreManagedAttribute
(PerunSession sess, AttributeDefinition attribute) Determine if attribute is core-managed attribute.boolean
isDefAttribute
(PerunSession sess, AttributeDefinition attribute) Determine if attribute is defined (def) attribute.boolean
isFromNamespace
(PerunSession sess, AttributeDefinition attribute, String namespace) Determine if attribute is from specified namespace.boolean
isLoginAlreadyUsed
(PerunSession sess, String login, String namespace) Check if the login is already in use for some namespace or globallyboolean
isOptAttribute
(PerunSession sess, AttributeDefinition attribute) Determine if attribute is optional (opt) attribute.boolean
isTrulyRequiredAttribute
(PerunSession sess, Facility facility, AttributeDefinition attributeDefinition) Check if this the attribute is truly required for the facility right now.boolean
isTrulyRequiredAttribute
(PerunSession sess, Facility facility, User user, AttributeDefinition attributeDefinition) Check if this the attribute is truly required for the user and the facility right now.boolean
isTrulyRequiredAttribute
(PerunSession sess, Member member, AttributeDefinition attributeDefinition) Check if this the attribute is truly required for the member right now.boolean
isTrulyRequiredAttribute
(PerunSession sess, Member member, Group group, AttributeDefinition attributeDefinition) Check if this the attribute is truly required for the member and the group right now.boolean
isTrulyRequiredAttribute
(PerunSession sess, Member member, Resource resource, AttributeDefinition attributeDefinition) Check if this the attribute is truly required for the member and the resource right now.boolean
isTrulyRequiredAttribute
(PerunSession sess, Resource resource, AttributeDefinition attributeDefinition) Check if this the attribute is truly required for the resource right now.boolean
isTrulyRequiredAttribute
(PerunSession sess, User user, AttributeDefinition attributeDefinition) Check if this the attribute is truly required for the user right now.boolean
isVirtAttribute
(PerunSession sess, AttributeDefinition attribute) Determine if attribute is virtual (virt) attribute.void
mergeAttributesValues
(PerunSession sess, Member member, List<Attribute> attributes) Merges attributes values if the attribute type is list or map.void
mergeAttributesValues
(PerunSession sess, User user, List<Attribute> attributes) Merges attributes values if the attribute type is list or map.mergeAttributeValue
(PerunSession sess, Group group, Attribute attribute) Merges attribute value if the attribute type is list or map.mergeAttributeValue
(PerunSession sess, Member member, Attribute attribute) Merges attribute value if the attribute type is list or map.mergeAttributeValue
(PerunSession sess, User user, Attribute attribute) Merges attribute value if the attribute type is list or map.mergeAttributeValueInNestedTransaction
(PerunSession sess, Member member, Attribute attribute) Merges attribute value if the attribute type is list or map.mergeAttributeValueInNestedTransaction
(PerunSession sess, User user, Attribute attribute) Merges attribute value if the attribute type is list or map.void
removeAllAttributes
(PerunSession sess, Facility facility) Unset all attributes for the facility.void
removeAllAttributes
(PerunSession sess, Facility facility, boolean removeAlsoUserFacilityAttributes) Unset all attributes for the facility.void
removeAllAttributes
(PerunSession sess, Facility facility, User user) Unset all attributes (user-facility) for the user on the facility.void
removeAllAttributes
(PerunSession sess, Group group) Unset all attributes for the group.void
removeAllAttributes
(PerunSession sess, Host host) Unset all attributes for the host.void
removeAllAttributes
(PerunSession sess, Member member) Unset all attributes for the member.void
removeAllAttributes
(PerunSession sess, Member member, Group group) Unset all attributes for the member in the group.void
removeAllAttributes
(PerunSession sess, Member member, Resource resource) Unset all attributes for the member on the resource.void
removeAllAttributes
(PerunSession sess, Resource resource) Unset all attributes for the resource.void
removeAllAttributes
(PerunSession sess, Resource resource, Group group) Unset all group-resource attributesvoid
removeAllAttributes
(PerunSession sess, Resource resource, Group group, boolean workWithGroupAttributes) Unset all attributes for the group and resource.void
removeAllAttributes
(PerunSession sess, User user) Unset all attributes for the user.void
removeAllAttributes
(PerunSession sess, UserExtSource ues) Unset all attributes for the user external source.void
removeAllAttributes
(PerunSession sess, Vo vo) Unset all attributes for the vo.void
removeAllGroupResourceAttributes
(PerunSession sess, Resource resource) Remove all non-virtual group-resource attributes assigned to resourcevoid
removeAllMemberResourceAttributes
(PerunSession sess, Resource resource) Remove all non-virtual member-resource attributes assigned to resourcevoid
removeAllUserFacilityAttributes
(PerunSession sess, User user) Unset all non-virtual user-facility attributes for the user and all facilitiesvoid
removeAttribute
(PerunSession sess, Facility facility, AttributeDefinition attribute) Unset particular attribute for the facility.void
removeAttribute
(PerunSession sess, Facility facility, User user, AttributeDefinition attribute) Unset particular attribute for the user on the facility.void
removeAttribute
(PerunSession sess, Group group, AttributeDefinition attribute) Unset particular attribute for the group.void
removeAttribute
(PerunSession sess, Host host, AttributeDefinition attribute) Unset particular attribute for the host.void
removeAttribute
(PerunSession sess, Member member, AttributeDefinition attribute) Unset particular attribute for the member.void
removeAttribute
(PerunSession sess, Member member, Group group, AttributeDefinition attribute) Unset particular attribute for the member in the group.void
removeAttribute
(PerunSession sess, Member member, Resource resource, AttributeDefinition attribute) Unset particular attribute for the member on the resource.boolean
removeAttribute
(PerunSession sess, Resource resource, AttributeDefinition attribute) Unset particular attribute for the resource.void
removeAttribute
(PerunSession sess, Resource resource, Group group, AttributeDefinition attribute) Unset particular group-resource attributevoid
removeAttribute
(PerunSession sess, UserExtSource ues, AttributeDefinition attribute) Unset particular attribute for the user external source.void
removeAttribute
(PerunSession sess, User user, AttributeDefinition attribute) Unset particular attribute for the user.void
removeAttribute
(PerunSession sess, Vo vo, AttributeDefinition attribute) Unset particular attribute for the vo.void
removeAttribute
(PerunSession sess, String key, AttributeDefinition attribute) Unset particular entityless attribute with subject equals key.void
removeAttributes
(PerunSession sess, Facility facility, Resource resource, Group group, User user, Member member, List<? extends AttributeDefinition> attributes) Unset the member, user, member-group, member-resource and user-facility attributes.void
removeAttributes
(PerunSession sess, Facility facility, Resource resource, User user, Member member, List<? extends AttributeDefinition> attributes) Unset the member, user, member-resource and user-facility attributes.void
removeAttributes
(PerunSession sess, Facility facility, User user, List<? extends AttributeDefinition> attributes) Batch version of removeAttribute.void
removeAttributes
(PerunSession sess, Facility facility, List<? extends AttributeDefinition> attributesDefinition) Batch version of removeAttribute.void
removeAttributes
(PerunSession sess, Group group, List<? extends AttributeDefinition> attributes) Batch version of removeAttribute.void
removeAttributes
(PerunSession sess, Host host, List<? extends AttributeDefinition> attributesDefinition) Batch version of removeAttribute.void
removeAttributes
(PerunSession sess, Member member, boolean workWithUserAttributes, List<? extends AttributeDefinition> attributes) Unset all non-empty attributes associated with the member and if workWithUserAttributes is true, unset all non-empty attributes associated with user, who is this member.void
removeAttributes
(PerunSession sess, Member member, Group group, List<? extends AttributeDefinition> attributes) Batch version of removeAttribute.void
removeAttributes
(PerunSession sess, Member member, Group group, List<? extends AttributeDefinition> attributes, boolean workWithUserAttributes) void
removeAttributes
(PerunSession sess, Member member, Resource resource, List<? extends AttributeDefinition> attributes) Batch version of removeAttribute.void
removeAttributes
(PerunSession sess, Member member, List<? extends AttributeDefinition> attributes) Batch version of removeAttribute.void
removeAttributes
(PerunSession sess, Resource resource, Group group, List<? extends AttributeDefinition> attributes) Batch version of removeAttribute.void
removeAttributes
(PerunSession sess, Resource resource, Group group, List<? extends AttributeDefinition> attributes, boolean workWithGroupAttributes) Unset the group_resource attributes.void
removeAttributes
(PerunSession sess, Resource resource, List<? extends AttributeDefinition> attributes) Batch version of removeAttribute.void
removeAttributes
(PerunSession sess, UserExtSource ues, List<? extends AttributeDefinition> attributes) Batch version of removeAttribute.void
removeAttributes
(PerunSession sess, User user, List<? extends AttributeDefinition> attributes) Batch version of removeAttribute.void
removeAttributes
(PerunSession sess, Vo vo, List<? extends AttributeDefinition> attributes) Batch version of removeAttribute.boolean
removeAttributeWithoutCheck
(PerunSession sess, Facility facility, AttributeDefinition attribute) Unset all attributes for the facility without check of value.boolean
removeAttributeWithoutCheck
(PerunSession sess, Facility facility, User user, AttributeDefinition attribute) Unset all attributes for the user-facility without check of value.boolean
removeAttributeWithoutCheck
(PerunSession sess, Group group, AttributeDefinition attribute) Unset all attributes for the group without check of value.boolean
removeAttributeWithoutCheck
(PerunSession sess, Host host, AttributeDefinition attribute) Unset all attributes for the host without check of value.boolean
removeAttributeWithoutCheck
(PerunSession sess, Member member, AttributeDefinition attribute) Unset all attributes for the member without check of value.boolean
removeAttributeWithoutCheck
(PerunSession sess, Member member, Group group, AttributeDefinition attribute) Unset all attributes for the member-group without check of value.boolean
removeAttributeWithoutCheck
(PerunSession sess, Member member, Resource resource, AttributeDefinition attribute) Unset all attributes for the member-resource without check of value.boolean
removeAttributeWithoutCheck
(PerunSession sess, Resource resource, AttributeDefinition attribute) Unset all attributes for the resource without check of value.boolean
removeAttributeWithoutCheck
(PerunSession sess, Resource resource, Group group, AttributeDefinition attribute) Unset all attributes for the group-resource without check of value.boolean
removeAttributeWithoutCheck
(PerunSession sess, User user, AttributeDefinition attribute) Unset all attributes for the user without check of value.boolean
removeAttributeWithoutCheck
(PerunSession sess, Vo vo, AttributeDefinition attribute) Unset all attributes for the vo without check of value.boolean
removeAttributeWithoutCheck
(PerunSession sess, String key, AttributeDefinition attribute) Unset all attributes for the key (entityless) without check of value.void
setAttribute
(PerunSession sess, Facility facility, Attribute attribute) Store the particular attribute associated with the facility.void
setAttribute
(PerunSession sess, Facility facility, User user, Attribute attribute) Store the attribute associated with the facility and user combination.void
setAttribute
(PerunSession sess, Group group, Attribute attribute) Store the particular attribute associated with the group.void
setAttribute
(PerunSession sess, Host host, Attribute attribute) Store the attribute associated with the host.void
setAttribute
(PerunSession sess, Member member, Attribute attribute) Store the particular attribute associated with the member.void
setAttribute
(PerunSession sess, Member member, Group group, Attribute attribute) Store the particular attribute associated with the group and member combination.void
setAttribute
(PerunSession sess, Member member, Resource resource, Attribute attribute) Store the particular attribute associated with the resource and member combination.void
setAttribute
(PerunSession sess, Resource resource, Attribute attribute) Store the particular attribute associated with the resource.void
setAttribute
(PerunSession sess, Resource resource, Group group, Attribute attribute) Store the group-resource attributevoid
setAttribute
(PerunSession sess, UserExtSource ues, Attribute attribute) Store the attribute associated with the user external source.void
setAttribute
(PerunSession sess, User user, Attribute attribute) Store the attribute associated with the user.void
setAttribute
(PerunSession sess, Vo vo, Attribute attribute) Store the particular attribute associated with the vo.void
setAttribute
(PerunSession sess, String key, Attribute attribute) Stores entityless attribute (associated with string key).void
setAttributeActionCriticality
(PerunSession sess, AttributeDefinition attr, AttributeAction action, boolean critical) Marks the action on attribute as critical, which may require additional authentication of user performing that action on attribute.void
setAttributeInNestedTransaction
(PerunSession sess, Group group, Attribute attribute) Store the particular attribute associated with the group.void
setAttributeInNestedTransaction
(PerunSession sess, Member member, Attribute attribute) Store the particular attribute associated with the member.void
setAttributeInNestedTransaction
(PerunSession sess, Member member, Group group, Attribute attribute) Store the particular attribute associated with the member-group relationship.void
setAttributeInNestedTransaction
(PerunSession sess, UserExtSource userExtSource, Attribute attribute) Store the particular attribute associated with the user external source.void
setAttributeInNestedTransaction
(PerunSession sess, User user, Attribute attribute) Store the attribute associated with the user.void
setAttributePolicyCollections
(PerunSession sess, List<AttributePolicyCollection> policyCollections) Deletes old attribute policy collections and sets all new attribute policy collections.void
setAttributeRights
(PerunSession sess, List<AttributeRights> rights) Deprecated.void
setAttributes
(PerunSession sess, Facility facility, Resource resource, Group group, User user, Member member, List<Attribute> attributes) Store the member, user, member-group, member-resource and user-facility attributes.void
setAttributes
(PerunSession sess, Facility facility, Resource resource, User user, Member member, List<Attribute> attributes) Store the member, user, member-resource and user-facility attributes.void
setAttributes
(PerunSession sess, Facility facility, User user, List<Attribute> attributes) Store the attributes associated with the facility and user combination.void
setAttributes
(PerunSession sess, Facility facility, List<Attribute> attributes) Store the attributes associated with the facility.void
setAttributes
(PerunSession sess, Group group, List<Attribute> attributes) Store the attributes associated with the group.void
setAttributes
(PerunSession sess, Host host, List<Attribute> attributes) Store the attributes associated with the host.void
setAttributes
(PerunSession sess, Member member, Group group, List<Attribute> attributes) Store the attributes associated with the group and member combination.void
setAttributes
(PerunSession sess, Member member, Group group, List<Attribute> attributes, boolean workWithUserAttributes) Store the attributes associated with the resource and member combination.void
setAttributes
(PerunSession sess, Member member, Resource resource, List<Attribute> attributes) Store the attributes associated with the resource and member combination.void
setAttributes
(PerunSession sess, Member member, Resource resource, List<Attribute> attributes, boolean workWithUserAttributes) Store the attributes associated with the resource and member combination.void
setAttributes
(PerunSession sess, Member member, List<Attribute> attributes) Store the attributes associated with the resource.void
setAttributes
(PerunSession sess, Member member, List<Attribute> attributes, boolean workWithUserAttributes) Store the attributes associated with member and user (which we get from this member) if workWithUserAttributes is true.void
setAttributes
(PerunSession sess, Resource resource, Group group, List<Attribute> attributes) Stores the group-resource attributes.void
setAttributes
(PerunSession sess, Resource resource, Group group, List<Attribute> attributes, boolean workWithGroupAttributes) void
setAttributes
(PerunSession sess, Resource resource, List<Attribute> attributes) Store the attributes associated with the resource.void
setAttributes
(PerunSession sess, UserExtSource ues, List<Attribute> attributes) Store the attributes associated with the user external source.void
setAttributes
(PerunSession sess, User user, List<Attribute> attributes) Store the attributes associated with the user.void
setAttributes
(PerunSession sess, Vo vo, List<Attribute> attributes) Store the attributes associated with the vo.boolean
setAttributeWithoutCheck
(PerunSession sess, Facility facility, Attribute attribute) Just store the particular attribute associated with the facility, doesn't preform any value check.boolean
setAttributeWithoutCheck
(PerunSession sess, Facility facility, User user, Attribute attribute) Just store the particular attribute associated with the user-facility, doesn't preform any value check.boolean
setAttributeWithoutCheck
(PerunSession sess, Group group, Attribute attribute) Just store the particular attribute associated with the group, doesn't preform any value check.boolean
setAttributeWithoutCheck
(PerunSession sess, Host host, Attribute attribute) Just store the particular attribute associated with the host, doesn't preform any value check.boolean
setAttributeWithoutCheck
(PerunSession sess, Member member, Attribute attribute) Just store the particular attribute associated with the member, doesn't preform any value check.boolean
setAttributeWithoutCheck
(PerunSession sess, Member member, Group group, Attribute attribute, boolean workWithUserAttributes) Just store the particular attribute associated with the member-group, doesn't preform any value check.boolean
setAttributeWithoutCheck
(PerunSession sess, Member member, Resource resource, Attribute attribute, boolean workWithUserAttributes) Just store the particular attribute associated with the member-resource, doesn't preform any value check.boolean
setAttributeWithoutCheck
(PerunSession sess, Resource resource, Attribute attribute) Just store the particular attribute associated with the resource, doesn't preform any value check.boolean
setAttributeWithoutCheck
(PerunSession sess, Resource resource, Group group, Attribute attribute) Just store the group-resource attribute, do not preform any value check.boolean
setAttributeWithoutCheck
(PerunSession sess, User user, Attribute attribute) Just store the attribute associated with the user, doesn't preform any value check.boolean
setAttributeWithoutCheck
(PerunSession sess, Vo vo, Attribute attribute) Just store the particular attribute associated with the vo, doesn't preform any value check.boolean
setAttributeWithoutCheck
(PerunSession sess, String key, Attribute attribute) Just store the particular attribute associated with the entityless, doesn't preform any value check.void
setPerunBl
(PerunBl perunBl) void
setRequiredAttributes
(PerunSession sess, Facility facility, Resource resource, User user, Member member) Get and set required attribute for member, resource, user and facility.void
setRequiredAttributes
(PerunSession sess, Facility facility, Resource resource, User user, Member member, boolean forceAttributesChecks) Get and set required attribute for member, resource, user and facility.void
setRequiredAttributes
(PerunSession sess, Facility facility, Resource resource, User user, Member member, List<Attribute> attributes) Take list of required attributes and set those which are empty and can be filled, then check them all.void
setRequiredAttributes
(PerunSession sess, Facility facility, Resource resource, User user, Member member, List<Attribute> attributes, boolean forceAttributesChecks) Take list of required attributes and set those which are empty and can be filled, then check them all.void
setRequiredAttributes
(PerunSession sess, Service service, Facility facility, Resource resource, User user, Member member) Get and set required attribute for member, resource, user, facility and specific service.void
setRequiredAttributes
(PerunSession sess, Service service, Facility facility, Resource resource, User user, Member member, boolean forceAttributesChecks) Get and set required attribute for member, resource, user, facility and specific service.void
setRequiredAttributes
(PerunSession sess, List<Service> services, Facility facility, Resource resource, User user, Member member, boolean forceAttributesChecks) Get all required attributes for user, user-facility, member and member-resource attributes and set them.setWritableTrue
(PerunSession sess, List<Attribute> attributes) Set all Attributes in list to "writable = true".stringToAttributeValue
(String value, String type) Converts string into the Object defined by type.updateAttributeDefinition
(PerunSession perunSession, AttributeDefinition attributeDefinition) Updates AttributeDefinition.
-
Constructor Details
-
AttributesManagerBlImpl
Constructor.
-
-
Method Details
-
getAttributes
Description copied from interface:AttributesManagerBl
Get all non-empty attributes associated with the facility.- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionfacility
- facility to get the attributes from- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerBl
Get all attributes associated with the facility which have name in list attrNames (empty too). Virtual attribute too.- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionfacility
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerBl
Get all non-empty attributes associated with the vo.- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionvo
- vo to get the attributes from- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerBl
Get all non-empty attributes associated with the group.- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessiongroup
- group to get the attributes from- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerBl
Get all non-empty attributes associated with the resource.- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionresource
- resource to get the attributes from- Returns:
- list of attributes
-
getVirtualAttributes
Description copied from interface:AttributesManagerBl
Get all virtual attributes associated with the member-resource attributes.- Specified by:
getVirtualAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- to get the attributes fromresource
- to get the attributes from- Returns:
- list of attributes
-
getAttributes
public List<Attribute> getAttributes(PerunSession sess, Member member, Resource resource) throws MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Get all non-empty attributes associated with the member on the resource.- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- to get the attributes fromresource
- to get the attributes from- Returns:
- list of attributes
- Throws:
MemberResourceMismatchException
-
getAttributes
public List<Attribute> getAttributes(PerunSession sess, Member member, Group group) throws MemberGroupMismatchException Description copied from interface:AttributesManagerBl
Get all non-empty attributes associated with the member in the group.- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- to get the attributes fromgroup
- group to get the attributes from- Returns:
- list of attributes
- Throws:
MemberGroupMismatchException
-
getAttributes
public List<Attribute> getAttributes(PerunSession sess, Member member, Group group, List<String> attrNames) throws MemberGroupMismatchException Description copied from interface:AttributesManagerBl
Get all attributes (empty and virtual too) associated with the member in the group which have name in list attrNames.- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- to get the attributes fromgroup
- group to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
- Throws:
MemberGroupMismatchException
-
getAttributes
public List<Attribute> getAttributes(PerunSession sess, Member member, Group group, boolean workWithUserAttributes) throws MemberGroupMismatchException Description copied from interface:AttributesManagerBl
Get all attributes associated with the member in the group and if workWithUserAttributes is true, gets also all non-empty user and member attributes.- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- to get the attributes fromgroup
- group to get the attributes fromworkWithUserAttributes
- if true returns also user and member attributes (user is automatically get from member)- Returns:
- list of attributes
- Throws:
MemberGroupMismatchException
-
getAttributes
public List<Attribute> getAttributes(PerunSession sess, Member member, Group group, List<String> attrNames, boolean workWithUserAttributes) throws MemberGroupMismatchException Description copied from interface:AttributesManagerBl
Get all attributes associated with the member in the group which have name in list attrNames (empty too). If workWithUserAttribute is true, return also all user attributes in list of attrNames (with virtual attributes too).- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- to get the attributes fromgroup
- group to get the attributes fromattrNames
- list of attributes' namesworkWithUserAttributes
- if true returns also user and member attributes (user is automatically get from member)- Returns:
- list of attributes
- Throws:
MemberGroupMismatchException
-
getAttributes
public List<Attribute> getAttributes(PerunSession sess, Member member, Resource resource, boolean workWithUserAttributes) throws MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Gets all non-empty attributes associated with the member on the resource and if workWithUserAttributes is true, gets also all non-empty user, user-facility and member attributes.- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- to get the attributes fromresource
- to get the attributes fromworkWithUserAttributes
- if true returns also user-facility, user and member attributes (user is automatically get from member a facility is get from resource)- Returns:
- list of attributes
- Throws:
MemberResourceMismatchException
- !!WARNING THIS IS VERY TIME-CONSUMING METHOD. DON'T USE IT IN BATCH!!
-
getAttributes
public List<Attribute> getAttributes(PerunSession sess, Member member, Resource resource, List<String> attrNames, boolean workWithUserAttributes) throws MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Gets selected non-empty attributes associated with the member and the resource. It returns member and member-resource attributes and also user and user-facility attributes if workWithUserAttributes is true. Attributes are selected by list of attr_names. Empty list means all attributes.- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- to get the attributes fromresource
- to get the attributes fromworkWithUserAttributes
- if true returns also user and user-facility attributes (user is automatically get from member and facility is get from resource)- Returns:
- list of selected attributes
- Throws:
MemberResourceMismatchException
- !!WARNING THIS IS VERY TIME-CONSUMING METHOD. DON'T USE IT IN BATCH!!
-
getAttributes
public List<Attribute> getAttributes(PerunSession sess, Group group, Member member, Resource resource, List<String> attrNames, boolean workWithUserAttributes) throws MemberResourceMismatchException, GroupResourceMismatchException, MemberGroupMismatchException Description copied from interface:AttributesManagerBl
Gets selected attributes associated with the member, group and the resource. It returns member, member-resource and member-group attributes and also user and user-facility attributes if workWithUserAttributes is true. Attributes are selected by list of attr_names. Empty list means all non-empty attributes.- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessiongroup
- group to get the attributes frommember
- to get the attributes fromresource
- to get the attributes fromworkWithUserAttributes
- if true returns also user and user-facility attributes (user is automatically get from member and facility is get from resource)- Returns:
- list of selected attributes
- Throws:
MemberResourceMismatchException
GroupResourceMismatchException
- !!WARNING THIS IS VERY TIME-CONSUMING METHOD. DON'T USE IT IN BATCH!!MemberGroupMismatchException
-
getAttributes
public List<Attribute> getAttributes(PerunSession sess, Member member, boolean workWithUserAttributes) Description copied from interface:AttributesManagerBl
Get all non-empty attributes associated with the member and if workWithUserAttributes is true, get all non-empty attributes associated with user, who is this member.- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- to get the attributes from- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerBl
Get all non-empty attributes associated with the member.- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- to get the attributes from- Returns:
- list of attributes
-
getAllAttributesStartWithNameWithoutNullValue
public List<Attribute> getAllAttributesStartWithNameWithoutNullValue(PerunSession sess, Group group, String startPartOfName) Description copied from interface:AttributesManagerBl
Get all non-empty attributes associated with the group starts with name startPartOfName. Get only nonvirtual attributes with notNull Value.- Specified by:
getAllAttributesStartWithNameWithoutNullValue
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessiongroup
- to get the attributes fromstartPartOfName
- attribute name start with this part- Returns:
- list of attributes which name start with startPartOfName
-
getAllAttributesStartWithNameWithoutNullValue
public List<Attribute> getAllAttributesStartWithNameWithoutNullValue(PerunSession sess, Resource resource, String startPartOfName) Description copied from interface:AttributesManagerBl
Get all non-empty attributes associated with the resource starts with name startPartOfName. Get only nonvirtual attributes with notNull value.- Specified by:
getAllAttributesStartWithNameWithoutNullValue
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionresource
- to get the attributes fromstartPartOfName
- attribute name start with this part- Returns:
- list of attributes which name start with startPartOfName
-
getAttributes
Description copied from interface:AttributesManagerBl
Get all attributes associated with the member which have name in list attrNames (empty and virtual too).- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerBl
Get all attributes associated with the group which have name in list attrNames (empty too). Virtual attribute too.- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessiongroup
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerBl
Get all attributes associated with the resource which have name in list attrNames (empty too). Virtual attribute too.- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionresource
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
-
getAttributes
public List<Attribute> getAttributes(PerunSession sess, Member member, List<String> attrNames, boolean workWithUserAttributes) Description copied from interface:AttributesManagerBl
Get all attributes associated with the member which have name in list attrNames (empty too) Virtual attributes too. If workWithUserAttribute is true, return also all user attributes in list of attrNames (with virtual attributes too).- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- to get the attributes fromattrNames
- list of attributes' namesworkWithUserAttributes
- if user attributes need to be return too- Returns:
- list of member (and also if needed user) attributes
-
getAttributes
public List<Attribute> getAttributes(PerunSession sess, Resource resource, Group group, Member member, List<String> attrNames) throws GroupResourceMismatchException, MemberResourceMismatchException, MemberGroupMismatchException Description copied from interface:AttributesManagerBl
Get all attributes by the list of attrNames if they are in one of these namespaces: - member - group - member-group - resource - member-resource - group-resource - user (get from member object) - facility (get from resource object) - user-facility Return all attributes even if they are empty or virtual.PRIVILEGE: Get only those attributes the principal has access to.
- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionattrNames
- list of attributes' names- Returns:
- list of attributes
- Throws:
GroupResourceMismatchException
- if resource and group are not from the same voMemberResourceMismatchException
- if member and resource are not from the same voMemberGroupMismatchException
-
getAttributes
Description copied from interface:AttributesManagerBl
Get all attributes associated with the vo which have name in list attrNames (empty and virtual too).- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionvo
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerBl
Get all attributes associated with the UserExtSource which have name in list attrNames (empty and virtual too).- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionues
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
-
getUserFacilityAttributesForAnyUser
Description copied from interface:AttributesManagerBl
Get All user_facility attributes for any existing user- Specified by:
getUserFacilityAttributesForAnyUser
in interfaceAttributesManagerBl
- Returns:
- list of user facility attributes
-
getAttributes
Description copied from interface:AttributesManagerBl
Get all non-empty attributes associated with the user on the facility.- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionfacility
- to get the attributes fromuser
- to get the attributes from- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerBl
Get all entityless attributes with subject equaled String key- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Returns:
-
getEntitylessAttributes
Description copied from interface:AttributesManagerBl
Get all entityless attributes with attributeName- Specified by:
getEntitylessAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun session- Returns:
- attribute
-
getEntitylessAttributesWithKeys
public Map<String,Attribute> getEntitylessAttributesWithKeys(PerunSession sess, String attrName) throws AttributeNotExistsException, WrongAttributeAssignmentException Description copied from interface:AttributesManagerBl
Get entityless attributes mapped by their keys.- Specified by:
getEntitylessAttributesWithKeys
in interfaceAttributesManagerBl
- Parameters:
sess
- sessionattrName
- attribute name- Returns:
- Map of entityless attributes mapped by their keys
- Throws:
AttributeNotExistsException
- when the attribute definition for attrName doesn't existWrongAttributeAssignmentException
- when passed non-entityless attribute
-
getEntitylessAttributesWithKeys
public Map<String,Attribute> getEntitylessAttributesWithKeys(PerunSession sess, String attrName, List<String> keys) throws AttributeNotExistsException, WrongAttributeAssignmentException Description copied from interface:AttributesManagerBl
Get entityless attributes mapped by their keys. Returns only attributes for specified keys.- Specified by:
getEntitylessAttributesWithKeys
in interfaceAttributesManagerBl
- Parameters:
sess
- sessionattrName
- attribute name- Returns:
- Map of entityless attributes mapped by their keys
- Throws:
AttributeNotExistsException
- when the attribute definition for attrName doesn't exist, or when there is no such attribute for one of the specified keysWrongAttributeAssignmentException
- when passed non-entityless attribute
-
getEntitylessKeys
Description copied from interface:AttributesManagerBl
Returns list of Keys which fits the attributeDefinition.- Specified by:
getEntitylessKeys
in interfaceAttributesManagerBl
- Returns:
-
getEntitylessAttributeForUpdate
public Attribute getEntitylessAttributeForUpdate(PerunSession sess, String key, String attrName) throws AttributeNotExistsException Description copied from interface:AttributesManagerBl
Returns entityless attribute by attr_id and key (subject) for update! For update - means lock row with attr_values in DB (entityless_attr_values with specific subject and attr_id) Not lock row in attr_names! IMPORTANT: This method use "select for update" and locks row for transaction. Use clever. If attribute with subject=key not exists, create new one with null value and return it.- Specified by:
getEntitylessAttributeForUpdate
in interfaceAttributesManagerBl
- Returns:
- attr_value in string
- Throws:
AttributeNotExistsException
- throw exception if attribute with value not exists in DB
-
getAttributesByAttributeDefinition
public List<Attribute> getAttributesByAttributeDefinition(PerunSession sess, AttributeDefinition attributeDefinition) throws WrongAttributeAssignmentException Description copied from interface:AttributesManagerBl
Returns all attributes with not-null value which fits the attributeDefinition. Can't process core or virtual attributes.- Specified by:
getAttributesByAttributeDefinition
in interfaceAttributesManagerBl
attributeDefinition
- can't be core or virtual attribute- Returns:
- list of attributes
- Throws:
WrongAttributeAssignmentException
-
getVirtualAttributes
Description copied from interface:AttributesManagerBl
Get all virtual attributes associated with the user on the facility.- Specified by:
getVirtualAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionfacility
- to get the attributes fromuser
- to get the attributes from- Returns:
- list of attributes
-
getVirtualAttributes
Description copied from interface:AttributesManagerBl
Get all virtual attributes associated with the user.- Specified by:
getVirtualAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionuser
- to get the attributes from- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerBl
Get all non-empty attributes associated with the user.- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionuser
- to get the attributes from- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerBl
Get all attributes associated with the user which have name in list attrNames (empty and virtual too).- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionuser
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
-
isLoginAlreadyUsed
Description copied from interface:AttributesManagerBl
Check if the login is already in use for some namespace or globally- Specified by:
isLoginAlreadyUsed
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionlogin
- login to be checkednamespace
- login can be checked for given namespace or globally, if namespace is null- Returns:
- true if login is already in use
-
getAttributes
Description copied from interface:AttributesManagerBl
Get all non-empty attributes associated with the host- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionhost
- host to get attributes from- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerBl
Get all attributes associated with the host which have name in list attrNames (empty and virtual too). Empty list attrNames will return no attributes.- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionhost
- host to get attributes forattrNames
- list of attributes' names- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerBl
Get all non-empty attributes associated with the group on resource.- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Returns:
- list of attributes
-
getAttributes
public List<Attribute> getAttributes(PerunSession sess, Resource resource, Group group, boolean workWithGroupAttributes) throws GroupResourceMismatchException - Specified by:
getAttributes
in interfaceAttributesManagerBl
- Throws:
GroupResourceMismatchException
-
getAttributes
public List<Attribute> getAttributes(PerunSession sess, Resource resource, Group group, List<String> attrNames, boolean workWithGroupAttributes) throws GroupResourceMismatchException Description copied from interface:AttributesManagerBl
Get selected attributes associated with the group on resource. Get also empty and virtual attributes if they are selected in the list. If list is empty, return all possible non-empty attributes.- Specified by:
getAttributes
in interfaceAttributesManagerBl
resource
- the resourcegroup
- the groupattrNames
- list of selected attribtuesworkWithGroupAttributes
- if true, get also group attributes- Returns:
- list of selected attributes associated with the group on resource
- Throws:
GroupResourceMismatchException
-
getAttributes
public List<Attribute> getAttributes(PerunSession sess, Facility facility, Resource resource, User user, Member member) throws MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Get all non-empty member, user, member-resource and user-facility attributes.- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Returns:
- Throws:
MemberResourceMismatchException
-
getAttributes
Description copied from interface:AttributesManagerBl
Get all non-empty attributes associated with the UserExtSource.- Specified by:
getAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionues
- to get the attributes from- Returns:
- list of attributes
-
setAttributes
public void setAttributes(PerunSession sess, Facility facility, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Store the attributes associated with the facility. If an attribute is core attribute then the attribute isn't stored (It's skipped without any notification).- Specified by:
setAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionfacility
- facility to set onattributes
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not facility attributeWrongReferenceAttributeValueException
-
setAttributes
public void setAttributes(PerunSession sess, Vo vo, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Store the attributes associated with the vo. If an attribute is core attribute then the attribute isn't stored (It's skipped without any notification).- Specified by:
setAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionvo
- vo to set onattributes
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not vo attributeWrongReferenceAttributeValueException
-
setAttributes
public void setAttributes(PerunSession sess, Group group, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Store the attributes associated with the group. If an attribute is core attribute then the attribute isn't stored (It's skipped without any notification).- Specified by:
setAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessiongroup
- group to set onattributes
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not group attributeWrongReferenceAttributeValueException
-
setAttributes
public void setAttributes(PerunSession sess, Resource resource, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Store the attributes associated with the resource. If an attribute is core attribute then the attribute isn't stored (It's skipped without any notification).- Specified by:
setAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionresource
- resource to set onattributes
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not resource attributeWrongReferenceAttributeValueException
-
setAttributes
public void setAttributes(PerunSession sess, Member member, Resource resource, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException, MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Store the attributes associated with the resource and member combination. If an attribute is core attribute then the attribute isn't stored (It's skipped without any notification).- Specified by:
setAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- member to set onresource
- resource to set onattributes
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not member-resource attributeWrongReferenceAttributeValueException
MemberResourceMismatchException
-
setAttributes
public void setAttributes(PerunSession sess, Member member, Group group, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException, MemberGroupMismatchException Description copied from interface:AttributesManagerBl
Store the attributes associated with the group and member combination. If an attribute is core attribute then the attribute isn't stored (It's skipped without any notification).- Specified by:
setAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- member to set ongroup
- group to set onattributes
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not member-group attributeWrongReferenceAttributeValueException
MemberGroupMismatchException
-
setAttributes
public void setAttributes(PerunSession sess, Member member, Group group, List<Attribute> attributes, boolean workWithUserAttributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException, MemberGroupMismatchException Description copied from interface:AttributesManagerBl
Store the attributes associated with the resource and member combination. If an attribute is core attribute then the attribute isn't stored (It's skipped without any notification). If workWithUserAttributes is true, the method stores also the attributes associated with user and member.- Specified by:
setAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- member to set ongroup
- group to set onattributes
- attribute to setworkWithUserAttributes
- method can process also user and member attributes (user is automatically get from member)- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not member-resource attributeWrongReferenceAttributeValueException
MemberGroupMismatchException
-
setAttributes
public void setAttributes(PerunSession sess, Member member, List<Attribute> attributes, boolean workWithUserAttributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Store the attributes associated with member and user (which we get from this member) if workWithUserAttributes is true. If an attribute is core attribute then the attribute isn't stored (It's skipped without any notification).- Specified by:
setAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- member to set onattributes
- attribute to setworkWithUserAttributes
- true/false If true, we can use user attributes (get from this member) too- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not member attribute or with workWithUserAttributes=true, if its not member or user attribute.WrongReferenceAttributeValueException
-
setAttributes
public void setAttributes(PerunSession sess, Member member, Resource resource, List<Attribute> attributes, boolean workWithUserAttributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException, MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Store the attributes associated with the resource and member combination. If an attribute is core attribute then the attribute isn't stored (It's skipped without any notification). If workWithUserAttributes is true, the method stores also the attributes associated with user, user-facility and member.- Specified by:
setAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- member to set onresource
- resource to set onattributes
- attribute to setworkWithUserAttributes
- method can process also user, user-facility and member attributes (user is automatically get from member a facility is get from resource)- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not member-resource attributeWrongReferenceAttributeValueException
MemberResourceMismatchException
- !!WARNING THIS IS VERY TIME-CONSUMING METHOD. DON'T USE IT IN BATCH!!
-
setAttributes
public void setAttributes(PerunSession sess, Facility facility, Resource resource, User user, Member member, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException, MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Store the member, user, member-resource and user-facility attributes. If an attribute is core attribute then the attribute isn't stored (It's skipped without any notification).- Specified by:
setAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun session- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not member-resource attributeWrongReferenceAttributeValueException
MemberResourceMismatchException
-
setAttributes
public void setAttributes(PerunSession sess, Facility facility, Resource resource, Group group, User user, Member member, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException, GroupResourceMismatchException, MemberResourceMismatchException, MemberGroupMismatchException Description copied from interface:AttributesManagerBl
Store the member, user, member-group, member-resource and user-facility attributes. If an attribute is core attribute then the attribute isn't stored (It's skipped without any notification).- Specified by:
setAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun session- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not member-resource attributeWrongReferenceAttributeValueException
GroupResourceMismatchException
MemberResourceMismatchException
MemberGroupMismatchException
-
setAttributes
public void setAttributes(PerunSession sess, Member member, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Store the attributes associated with the resource. If an attribute is core attribute then the attribute isn't stored (It's skipped without any notification).- Specified by:
setAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- member to set onattributes
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not member-resource attributeWrongReferenceAttributeValueException
-
setAttributes
public void setAttributes(PerunSession sess, Facility facility, User user, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Store the attributes associated with the facility and user combination. If an attribute is core attribute then the attribute isn't stored (It's skipped without any notification).- Specified by:
setAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionfacility
- facility to set onuser
- user to set onattributes
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not user-facility attributeWrongReferenceAttributeValueException
-
setAttributes
public void setAttributes(PerunSession sess, User user, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Store the attributes associated with the user. If an attribute is core attribute then the attribute isn't stored (It's skipped without any notification).- Specified by:
setAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionuser
- user to set onattributes
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not user-facility attributeWrongReferenceAttributeValueException
-
setAttributes
public void setAttributes(PerunSession sess, Host host, List<Attribute> attributes) throws WrongAttributeAssignmentException, WrongAttributeValueException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Store the attributes associated with the host. If an attribute is core attribute then the attribute isn't stored (It's skipped without any notification).- Specified by:
setAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionhost
- host to set attributes forattributes
- attributes to be set- Throws:
WrongAttributeAssignmentException
- if attribute is not host attributeWrongAttributeValueException
- if the attribute value is illegalWrongReferenceAttributeValueException
-
setAttributes
public void setAttributes(PerunSession sess, Resource resource, Group group, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException, GroupResourceMismatchException Description copied from interface:AttributesManagerBl
Stores the group-resource attributes.- Specified by:
setAttributes
in interfaceAttributesManagerBl
- Throws:
WrongAttributeValueException
WrongAttributeAssignmentException
GroupResourceMismatchException
WrongReferenceAttributeValueException
-
setAttributes
public void setAttributes(PerunSession sess, Resource resource, Group group, List<Attribute> attributes, boolean workWithGroupAttributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException, GroupResourceMismatchException - Specified by:
setAttributes
in interfaceAttributesManagerBl
- Throws:
WrongAttributeValueException
WrongAttributeAssignmentException
WrongReferenceAttributeValueException
GroupResourceMismatchException
-
setAttributes
public void setAttributes(PerunSession sess, UserExtSource ues, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Store the attributes associated with the user external source. If an attribute is core attribute then the attribute isn't stored (It's skipped without any notification).- Specified by:
setAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionues
- user external source to set onattributes
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not user external source attributeWrongReferenceAttributeValueException
-
getAllSimilarAttributeNames
public List<String> getAllSimilarAttributeNames(PerunSession sess, String startingPartOfAttributeName) Description copied from interface:AttributesManagerBl
This method get all similar attr_names which start with partOfAttributeName- Specified by:
getAllSimilarAttributeNames
in interfaceAttributesManagerBl
startingPartOfAttributeName
- is something like: urn:perun:user_facility:attribute-def:def:login-namespace:- Returns:
- list of similar attribute names like: urn:perun:user_facility:attribute-def:def:login-namespace:cesnet etc.
-
getAttribute
public Attribute getAttribute(PerunSession sess, Facility facility, String attributeName) throws WrongAttributeAssignmentException, AttributeNotExistsException Description copied from interface:AttributesManagerBl
Get particular attribute for the facility.- Specified by:
getAttribute
in interfaceAttributesManagerBl
facility
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
WrongAttributeAssignmentException
AttributeNotExistsException
-
getAttribute
public Attribute getAttribute(PerunSession sess, Vo vo, String attributeName) throws WrongAttributeAssignmentException, AttributeNotExistsException Description copied from interface:AttributesManagerBl
Get particular attribute for the vo.- Specified by:
getAttribute
in interfaceAttributesManagerBl
vo
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
WrongAttributeAssignmentException
AttributeNotExistsException
-
getAttribute
public Attribute getAttribute(PerunSession sess, Group group, String attributeName) throws WrongAttributeAssignmentException, AttributeNotExistsException Description copied from interface:AttributesManagerBl
Get particular attribute for the group.- Specified by:
getAttribute
in interfaceAttributesManagerBl
group
- group get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
WrongAttributeAssignmentException
AttributeNotExistsException
-
getAttribute
public Attribute getAttribute(PerunSession sess, Resource resource, String attributeName) throws WrongAttributeAssignmentException, AttributeNotExistsException Description copied from interface:AttributesManagerBl
Get particular attribute for the resource.- Specified by:
getAttribute
in interfaceAttributesManagerBl
resource
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
WrongAttributeAssignmentException
AttributeNotExistsException
-
getAttribute
public Attribute getAttribute(PerunSession sess, Member member, Resource resource, String attributeName) throws MemberResourceMismatchException, WrongAttributeAssignmentException, AttributeNotExistsException Description copied from interface:AttributesManagerBl
Get particular attribute for the member on this resource.- Specified by:
getAttribute
in interfaceAttributesManagerBl
member
- to get attribute fromresource
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
MemberResourceMismatchException
WrongAttributeAssignmentException
AttributeNotExistsException
-
getAttribute
public Attribute getAttribute(PerunSession sess, Member member, Group group, String attributeName) throws AttributeNotExistsException, WrongAttributeAssignmentException, MemberGroupMismatchException Description copied from interface:AttributesManagerBl
Get particular attribute for the member in this group.- Specified by:
getAttribute
in interfaceAttributesManagerBl
member
- to get attribute fromgroup
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlying data sourceWrongAttributeAssignmentException
MemberGroupMismatchException
-
getAttribute
public Attribute getAttribute(PerunSession sess, Member member, String attributeName) throws WrongAttributeAssignmentException, AttributeNotExistsException Description copied from interface:AttributesManagerBl
Get particular attribute for the member.- Specified by:
getAttribute
in interfaceAttributesManagerBl
member
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
WrongAttributeAssignmentException
AttributeNotExistsException
-
getAttribute
public Attribute getAttribute(PerunSession sess, Facility facility, User user, String attributeName) throws WrongAttributeAssignmentException, AttributeNotExistsException Description copied from interface:AttributesManagerBl
Get particular attribute for the user on this facility.- Specified by:
getAttribute
in interfaceAttributesManagerBl
facility
- to get attribute fromuser
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
WrongAttributeAssignmentException
AttributeNotExistsException
-
getAttribute
public Attribute getAttribute(PerunSession sess, User user, String attributeName) throws WrongAttributeAssignmentException, AttributeNotExistsException Description copied from interface:AttributesManagerBl
Get particular attribute for the user.- Specified by:
getAttribute
in interfaceAttributesManagerBl
user
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
WrongAttributeAssignmentException
AttributeNotExistsException
-
getAttributeForUpdate
public Attribute getAttributeForUpdate(PerunSession sess, User user, String attributeName) throws WrongAttributeAssignmentException, AttributeNotExistsException Description copied from interface:AttributesManagerBl
Get particular attribute for the user for update - locking the attribute for user.- Specified by:
getAttributeForUpdate
in interfaceAttributesManagerBl
user
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
WrongAttributeAssignmentException
AttributeNotExistsException
-
getAttribute
public Attribute getAttribute(PerunSession sess, Host host, String attributeName) throws WrongAttributeAssignmentException, AttributeNotExistsException Description copied from interface:AttributesManagerBl
Get particular attribute for the host- Specified by:
getAttribute
in interfaceAttributesManagerBl
host
- host to get attribute fromattributeName
- attribute name- Returns:
- attribute
- Throws:
WrongAttributeAssignmentException
AttributeNotExistsException
-
getAttribute
public Attribute getAttribute(PerunSession sess, Resource resource, Group group, String attributeName) throws WrongAttributeAssignmentException, AttributeNotExistsException, GroupResourceMismatchException Description copied from interface:AttributesManagerBl
Get particular group attribute on the resource- Specified by:
getAttribute
in interfaceAttributesManagerBl
- Returns:
- attribute
- Throws:
WrongAttributeAssignmentException
AttributeNotExistsException
GroupResourceMismatchException
-
getAttribute
public Attribute getAttribute(PerunSession sess, String key, String attributeName) throws AttributeNotExistsException, WrongAttributeAssignmentException Description copied from interface:AttributesManagerBl
Get particular entityless attribute- Specified by:
getAttribute
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionkey
- key to get attribute for- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlaying data sourceWrongAttributeAssignmentException
- if attribute isn't entityless attribute
-
getEntitylessStringAttributeMapping
public Map<String,String> getEntitylessStringAttributeMapping(PerunSession sess, String attributeName) throws WrongAttributeAssignmentException, AttributeNotExistsException Description copied from interface:AttributesManagerBl
Gets map from keys to string values for an entityless attribute.- Specified by:
getEntitylessStringAttributeMapping
in interfaceAttributesManagerBl
- Parameters:
sess
- sessionattributeName
- full attribute name- Returns:
- unordered hashmap
- Throws:
WrongAttributeAssignmentException
AttributeNotExistsException
-
getAttribute
public Attribute getAttribute(PerunSession sess, UserExtSource ues, String attributeName) throws WrongAttributeAssignmentException, AttributeNotExistsException Description copied from interface:AttributesManagerBl
Get particular attribute for the User External Source.- Specified by:
getAttribute
in interfaceAttributesManagerBl
ues
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
WrongAttributeAssignmentException
- if atribute prefix does not match entity.AttributeNotExistsException
-
getAttributeDefinition
public AttributeDefinition getAttributeDefinition(PerunSession sess, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerBl
Get attribute definition (attribute without defined value).- Specified by:
getAttributeDefinition
in interfaceAttributesManagerBl
attributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException
-
getAttributesDefinitionWithRights
public List<AttributeDefinition> getAttributesDefinitionWithRights(PerunSession sess, List<PerunBean> entities) Description copied from interface:AttributesManagerBl
Get all (for entities) attributeDefinitions which user has right to READ them and fill attribute writable (if user has also right to WRITE them). For entities means that return only those attributeDefinition which are in namespace of entities or possible combination of entities. For Example: If enityties are "member, user, resource" then return only AD in namespaces "member, user, resource and resource-member"- Specified by:
getAttributesDefinitionWithRights
in interfaceAttributesManagerBl
entities
- list of perunBeans (member, user...)- Returns:
- list of AttributeDefinitions with rights (writable will be filled correctly by user in session)
-
getAttributesDefinition
Description copied from interface:AttributesManagerBl
Get all attributes definition (attribute without defined value).- Specified by:
getAttributesDefinition
in interfaceAttributesManagerBl
- Returns:
- List od attributes definitions
-
getAttributesDefinition
public List<AttributeDefinition> getAttributesDefinition(PerunSession sess, List<String> listOfAttributesNames) throws AttributeNotExistsException Description copied from interface:AttributesManagerBl
From listOfAttributesNames get list of attributeDefinitions- Specified by:
getAttributesDefinition
in interfaceAttributesManagerBl
- Returns:
- list of AttributeDefinitions
- Throws:
AttributeNotExistsException
-
getAttributeDefinitionById
public AttributeDefinition getAttributeDefinitionById(PerunSession sess, int id) throws AttributeNotExistsException Description copied from interface:AttributesManagerBl
Get attribute definition (attribute without defined value).- Specified by:
getAttributeDefinitionById
in interfaceAttributesManagerBl
id
- attribute id- Returns:
- attribute
- Throws:
AttributeNotExistsException
-
getAttributesDefinitionByNamespace
public List<AttributeDefinition> getAttributesDefinitionByNamespace(PerunSession sess, String namespace) Description copied from interface:AttributesManagerBl
Get attributes definition (attribute without defined value) with specified namespace.- Specified by:
getAttributesDefinitionByNamespace
in interfaceAttributesManagerBl
namespace
- get only attributes with this namespace- Returns:
- List of attributes
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Facility facility, int id) throws AttributeNotExistsException, WrongAttributeAssignmentException Description copied from interface:AttributesManagerBl
Get particular attribute for the facility.- Specified by:
getAttributeById
in interfaceAttributesManagerBl
facility
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
WrongAttributeAssignmentException
AttributeNotExistsException
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Vo vo, int id) throws AttributeNotExistsException, WrongAttributeAssignmentException Description copied from interface:AttributesManagerBl
Get particular attribute for the vo.- Specified by:
getAttributeById
in interfaceAttributesManagerBl
vo
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
WrongAttributeAssignmentException
AttributeNotExistsException
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Resource resource, int id) throws AttributeNotExistsException, WrongAttributeAssignmentException Description copied from interface:AttributesManagerBl
Get particular attribute for the resource.- Specified by:
getAttributeById
in interfaceAttributesManagerBl
resource
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
WrongAttributeAssignmentException
AttributeNotExistsException
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Member member, Resource resource, int id) throws WrongAttributeAssignmentException, AttributeNotExistsException, MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Get particular attribute for the member on this resource.- Specified by:
getAttributeById
in interfaceAttributesManagerBl
member
- to get attribute fromresource
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
WrongAttributeAssignmentException
MemberResourceMismatchException
AttributeNotExistsException
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Member member, Group group, int id) throws AttributeNotExistsException, WrongAttributeAssignmentException, MemberGroupMismatchException Description copied from interface:AttributesManagerBl
Get particular attribute for the member in this group. Also it can return only member or only user attribute if attr definition is not from NS_MEMBER_GROUP_ATTR but from NS_MEMBER_ATTR or NS_GROUP_ATTR- Specified by:
getAttributeById
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- to get attribute fromgroup
- to get attribute fromid
- attribute id- Returns:
- memberGroup, member OR user attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlying data sourceWrongAttributeAssignmentException
MemberGroupMismatchException
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Member member, int id) throws WrongAttributeAssignmentException, AttributeNotExistsException Description copied from interface:AttributesManagerBl
Get particular attribute for the member.- Specified by:
getAttributeById
in interfaceAttributesManagerBl
member
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
WrongAttributeAssignmentException
AttributeNotExistsException
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Facility facility, User user, int id) throws WrongAttributeAssignmentException, AttributeNotExistsException Description copied from interface:AttributesManagerBl
Get particular attribute for the user on this facility.- Specified by:
getAttributeById
in interfaceAttributesManagerBl
facility
- to get attribute fromuser
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
WrongAttributeAssignmentException
AttributeNotExistsException
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, User user, int id) throws WrongAttributeAssignmentException, AttributeNotExistsException Description copied from interface:AttributesManagerBl
Get particular attribute for the user.- Specified by:
getAttributeById
in interfaceAttributesManagerBl
user
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
WrongAttributeAssignmentException
AttributeNotExistsException
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Host host, int id) throws WrongAttributeAssignmentException, AttributeNotExistsException Description copied from interface:AttributesManagerBl
Get particular attribute for the host- Specified by:
getAttributeById
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionhost
- to get attribute fromid
- id of attribute- Returns:
- attribute
- Throws:
WrongAttributeAssignmentException
- if attribute is not host attributeAttributeNotExistsException
- if attribute doesn't exist
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Resource resource, Group group, int id) throws WrongAttributeAssignmentException, AttributeNotExistsException, GroupResourceMismatchException Description copied from interface:AttributesManagerBl
Get particular group-resource attribute- Specified by:
getAttributeById
in interfaceAttributesManagerBl
- Returns:
- Throws:
WrongAttributeAssignmentException
AttributeNotExistsException
GroupResourceMismatchException
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Group group, int id) throws WrongAttributeAssignmentException, AttributeNotExistsException Description copied from interface:AttributesManagerBl
Get particular group attribute- Specified by:
getAttributeById
in interfaceAttributesManagerBl
- Returns:
- Throws:
WrongAttributeAssignmentException
AttributeNotExistsException
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, UserExtSource ues, int id) throws WrongAttributeAssignmentException, AttributeNotExistsException Description copied from interface:AttributesManagerBl
Get particular attribute for the user external source- Specified by:
getAttributeById
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionues
- to get attribute fromid
- id of attribute- Returns:
- attribute
- Throws:
WrongAttributeAssignmentException
- if attribute is not user external source attributeAttributeNotExistsException
- if attribute doesn't exist
-
setRequiredAttributes
public void setRequiredAttributes(PerunSession sess, Facility facility, Resource resource, User user, Member member, List<Attribute> attributes) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException, AttributeNotExistsException, WrongAttributeValueException, MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Take list of required attributes and set those which are empty and can be filled, then check them all. Important: this method DO NOT set non-empty attributes in list, just refresh their values and check them Procedure: 1] Get all attrs from arrayList (they should be required attributes) 2] Fill empty attributes and store those which were really filled. (value changed) 3] Set filled attributes. 4] Refresh value in all attributes (not only in virtual ones - because of possible change by changeAttributeHook in other filledAttributes) 5] Check all attributes and their dependencies. -
setRequiredAttributes
public void setRequiredAttributes(PerunSession sess, Facility facility, Resource resource, User user, Member member, List<Attribute> attributes, boolean forceAttributesChecks) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException, AttributeNotExistsException, WrongAttributeValueException, MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Take list of required attributes and set those which are empty and can be filled, then check them all. Important: this method DO NOT set non-empty attributes in list, just refresh their values and check them Procedure: 1] Get all attrs from arrayList (they should be required attributes) 2] Fill empty attributes and store those which were really filled. (value changed) 3] Set filled attributes. 4] Refresh value in all attributes (not only in virtual ones - because of possible change by changeAttributeHook in other filledAttributes) 5] Check all attributes and their dependencies.- Specified by:
setRequiredAttributes
in interfaceAttributesManagerBl
forceAttributesChecks
- if true, all required attributes for given resource and user will be semantically checked, no matter if the user has truly access to the given resource- Throws:
WrongAttributeAssignmentException
WrongReferenceAttributeValueException
AttributeNotExistsException
WrongAttributeValueException
MemberResourceMismatchException
-
setRequiredAttributes
public void setRequiredAttributes(PerunSession sess, Facility facility, Resource resource, User user, Member member, boolean forceAttributesChecks) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException, WrongAttributeValueException, AttributeNotExistsException, MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Get and set required attribute for member, resource, user and facility. Procedure: 1] Get all member, member-resource, user, user-facility required attributes for member and resource. 2] Fill attributes and store those which were really filled. (value changed) 3] Set filled attributes. 4] Refresh value in all virtual attributes. 5] Check all attributes and their dependencies.- Specified by:
setRequiredAttributes
in interfaceAttributesManagerBl
forceAttributesChecks
- if true, all required attributes for given resource and user will be semantically checked, no matter if the user has truly access to the given resource- Throws:
WrongAttributeAssignmentException
WrongReferenceAttributeValueException
WrongAttributeValueException
AttributeNotExistsException
MemberResourceMismatchException
-
setRequiredAttributes
public void setRequiredAttributes(PerunSession sess, Facility facility, Resource resource, User user, Member member) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException, WrongAttributeValueException, AttributeNotExistsException, MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Get and set required attribute for member, resource, user and facility. Procedure: 1] Get all member, member-resource, user, user-facility required attributes for member and resource. 2] Fill attributes and store those which were really filled. (value changed) 3] Set filled attributes. 4] Refresh value in all virtual attributes. 5] Check all attributes and their dependencies. -
setRequiredAttributes
public void setRequiredAttributes(PerunSession sess, Service service, Facility facility, Resource resource, User user, Member member) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException, AttributeNotExistsException, WrongAttributeValueException, MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Get and set required attribute for member, resource, user, facility and specific service. Procedure: 1] Get all member, member-resource, user, user-facility required attributes for member, resource and specific service. 2] Fill attributes and store those which were really filled. (value changed) 3] Set filled attributes. 4] Refresh value in all virtual attributes. 5] Check all attributes and their dependencies. -
setRequiredAttributes
public void setRequiredAttributes(PerunSession sess, Service service, Facility facility, Resource resource, User user, Member member, boolean forceAttributesChecks) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException, AttributeNotExistsException, WrongAttributeValueException, MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Get and set required attribute for member, resource, user, facility and specific service. Procedure: 1] Get all member, member-resource, user, user-facility required attributes for member, resource and specific service. 2] Fill attributes and store those which were really filled. (value changed) 3] Set filled attributes. 4] Refresh value in all virtual attributes. 5] Check all attributes and their dependencies.- Specified by:
setRequiredAttributes
in interfaceAttributesManagerBl
forceAttributesChecks
- if true, all required attributes for given resource and user will be semantically checked, no matter if the user has truly access to the given resource- Throws:
WrongAttributeAssignmentException
WrongReferenceAttributeValueException
AttributeNotExistsException
WrongAttributeValueException
MemberResourceMismatchException
-
setRequiredAttributes
public void setRequiredAttributes(PerunSession sess, List<Service> services, Facility facility, Resource resource, User user, Member member, boolean forceAttributesChecks) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException, AttributeNotExistsException, WrongAttributeValueException, MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Get all required attributes for user, user-facility, member and member-resource attributes and set them.- Specified by:
setRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- sessionservices
- servicesfacility
- facilityresource
- resourceuser
- usermember
- memberforceAttributesChecks
- if true, all required attributes for given resource and user will be semantically checked, no matter if the user has truly access to the given resource- Throws:
WrongAttributeAssignmentException
WrongReferenceAttributeValueException
AttributeNotExistsException
WrongAttributeValueException
MemberResourceMismatchException
-
setAttribute
public void setAttribute(PerunSession sess, Facility facility, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Store the particular attribute associated with the facility. Core attributes can't be set this way.- Specified by:
setAttribute
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionfacility
- facility to set onattribute
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not facility attribute or if it is core attributeWrongReferenceAttributeValueException
-
setAttributeWithoutCheck
public boolean setAttributeWithoutCheck(PerunSession sess, Facility facility, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException Description copied from interface:AttributesManagerBl
Just store the particular attribute associated with the facility, doesn't preform any value check. Core attributes can't be set this way.- Specified by:
setAttributeWithoutCheck
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionfacility
- facility to set onattribute
- attribute to set- Returns:
- true, if attribute was set in DB
- Throws:
WrongAttributeAssignmentException
- if attribute is not resource attribute or if it is core attributeWrongAttributeValueException
-
setAttribute
public void setAttribute(PerunSession sess, Vo vo, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Store the particular attribute associated with the vo. Core attributes can't be set this way.- Specified by:
setAttribute
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionvo
- vo to set onattribute
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not vo attribute or if it is core attributeWrongReferenceAttributeValueException
-
setAttributeWithoutCheck
public boolean setAttributeWithoutCheck(PerunSession sess, Vo vo, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException Description copied from interface:AttributesManagerBl
Just store the particular attribute associated with the vo, doesn't preform any value check. Core attributes can't be set this way.- Specified by:
setAttributeWithoutCheck
in interfaceAttributesManagerBl
- Returns:
- Throws:
WrongAttributeAssignmentException
WrongAttributeValueException
-
setAttribute
public void setAttribute(PerunSession sess, Group group, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Store the particular attribute associated with the group. Core attributes can't be set this way.- Specified by:
setAttribute
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessiongroup
- group to set onattribute
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not group attribute or if it is core attributeWrongReferenceAttributeValueException
-
setAttributeInNestedTransaction
public void setAttributeInNestedTransaction(PerunSession sess, Group group, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Store the particular attribute associated with the group. Core attributes can't be set this way. This method creates nested transaction to prevent storing value to DB if it throws any exception.- Specified by:
setAttributeInNestedTransaction
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessiongroup
- group to set onattribute
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not group attribute or if it is core attributeWrongReferenceAttributeValueException
-
setAttribute
public void setAttribute(PerunSession sess, Resource resource, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Store the particular attribute associated with the resource. Core attributes can't be set this way.- Specified by:
setAttribute
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionresource
- resource to set onattribute
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not resource attribute or if it is core attributeWrongReferenceAttributeValueException
-
setAttributeWithoutCheck
public boolean setAttributeWithoutCheck(PerunSession sess, Resource resource, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Just store the particular attribute associated with the resource, doesn't preform any value check. Core attributes can't be set this way.- Specified by:
setAttributeWithoutCheck
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionresource
- resource to set onattribute
- attribute to set- Returns:
- true, if attribute was set in DB
- Throws:
WrongAttributeAssignmentException
- if attribute is not resource attribute or if it is core attributeWrongAttributeValueException
WrongReferenceAttributeValueException
-
setAttributeWithoutCheck
public boolean setAttributeWithoutCheck(PerunSession sess, Group group, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Just store the particular attribute associated with the group, doesn't preform any value check. Core attributes can't be set this way.- Specified by:
setAttributeWithoutCheck
in interfaceAttributesManagerBl
- Parameters:
sess
- perun session- Returns:
- true, if attribute was set in DB
- Throws:
WrongAttributeAssignmentException
- if attribute is not group attribute or if it is core attributeWrongAttributeValueException
WrongReferenceAttributeValueException
-
setAttribute
public void setAttribute(PerunSession sess, Member member, Resource resource, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException, MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Store the particular attribute associated with the resource and member combination. Core attributes can't be set this way.- Specified by:
setAttribute
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- member to set onresource
- resource to set onattribute
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not member-resource attribute or if it is core attributeWrongReferenceAttributeValueException
MemberResourceMismatchException
-
setAttribute
public void setAttribute(PerunSession sess, Member member, Group group, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException, MemberGroupMismatchException Description copied from interface:AttributesManagerBl
Store the particular attribute associated with the group and member combination. Core attributes can't be set this way.- Specified by:
setAttribute
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- member to set ongroup
- group to set onattribute
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not member-resource attribute or if it is core attributeWrongReferenceAttributeValueException
MemberGroupMismatchException
-
setAttributeInNestedTransaction
public void setAttributeInNestedTransaction(PerunSession sess, Member member, Group group, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException, AttributeNotExistsException, MemberGroupMismatchException Description copied from interface:AttributesManagerBl
Store the particular attribute associated with the member-group relationship. Core attributes can't be set this way. This method creates nested transaction to prevent storing value to DB if it throws any exception.- Specified by:
setAttributeInNestedTransaction
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- member to set ongroup
- group to set onattribute
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not member-group attribute or if it is core attributeWrongReferenceAttributeValueException
AttributeNotExistsException
MemberGroupMismatchException
-
setAttributeWithoutCheck
public boolean setAttributeWithoutCheck(PerunSession sess, Facility facility, User user, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException Description copied from interface:AttributesManagerBl
Just store the particular attribute associated with the user-facility, doesn't preform any value check. Core attributes can't be set this way.- Specified by:
setAttributeWithoutCheck
in interfaceAttributesManagerBl
- Returns:
- Throws:
WrongAttributeAssignmentException
WrongAttributeValueException
-
setAttributeWithoutCheck
public boolean setAttributeWithoutCheck(PerunSession sess, Member member, Resource resource, Attribute attribute, boolean workWithUserAttributes) throws WrongAttributeAssignmentException, WrongAttributeValueException, WrongReferenceAttributeValueException, MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Just store the particular attribute associated with the member-resource, doesn't preform any value check. Core attributes can't be set this way.- Specified by:
setAttributeWithoutCheck
in interfaceAttributesManagerBl
- Returns:
- Throws:
WrongAttributeAssignmentException
WrongAttributeValueException
WrongReferenceAttributeValueException
MemberResourceMismatchException
-
setAttributeWithoutCheck
public boolean setAttributeWithoutCheck(PerunSession sess, Member member, Group group, Attribute attribute, boolean workWithUserAttributes) throws WrongAttributeAssignmentException, WrongAttributeValueException, WrongReferenceAttributeValueException, MemberGroupMismatchException Description copied from interface:AttributesManagerBl
Just store the particular attribute associated with the member-group, doesn't preform any value check. Core attributes can't be set this way.- Specified by:
setAttributeWithoutCheck
in interfaceAttributesManagerBl
- Returns:
- Throws:
WrongAttributeAssignmentException
WrongAttributeValueException
WrongReferenceAttributeValueException
MemberGroupMismatchException
-
setAttribute
public void setAttribute(PerunSession sess, Member member, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Store the particular attribute associated with the member. Core attributes can't be set this way.- Specified by:
setAttribute
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- member to set onattribute
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not member-resource attribute or if it is core attributeWrongReferenceAttributeValueException
-
setAttributeInNestedTransaction
public void setAttributeInNestedTransaction(PerunSession sess, Member member, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Store the particular attribute associated with the member. Core attributes can't be set this way. This method creates nested transaction to prevent storing value to DB if it throws any exception.- Specified by:
setAttributeInNestedTransaction
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- member to set onattribute
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not member-resource attribute or if it is core attributeWrongReferenceAttributeValueException
-
setAttributeWithoutCheck
public boolean setAttributeWithoutCheck(PerunSession sess, Member member, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Just store the particular attribute associated with the member, doesn't preform any value check. Core attributes can't be set this way.- Specified by:
setAttributeWithoutCheck
in interfaceAttributesManagerBl
- Returns:
- Throws:
WrongAttributeAssignmentException
WrongAttributeValueException
WrongReferenceAttributeValueException
-
setAttribute
public void setAttribute(PerunSession sess, Facility facility, User user, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Store the attribute associated with the facility and user combination. Core attributes can't be set this way.- Specified by:
setAttribute
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionfacility
- facility to set onuser
- user to set onattribute
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not user-facility attributeWrongReferenceAttributeValueException
-
setAttribute
public void setAttribute(PerunSession sess, User user, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Store the attribute associated with the user. Core attributes can't be set this way.- Specified by:
setAttribute
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionuser
- user to set onattribute
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not user-facility attributeWrongReferenceAttributeValueException
-
setAttributeInNestedTransaction
public void setAttributeInNestedTransaction(PerunSession sess, User user, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Store the attribute associated with the user. Core attributes can't be set this way. This method creates nested transaction to prevent storing value to DB if it throws any exception.- Specified by:
setAttributeInNestedTransaction
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionuser
- user to set onattribute
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not user-facility attributeWrongReferenceAttributeValueException
-
setAttributeWithoutCheck
public boolean setAttributeWithoutCheck(PerunSession sess, User user, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Just store the attribute associated with the user, doesn't preform any value check. Core attributes can't be set this way.- Specified by:
setAttributeWithoutCheck
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionuser
- user to set onattribute
- attribute to set- Returns:
- true, if attribute was set in DB
- Throws:
WrongAttributeAssignmentException
- if attribute is not user-facility attributeWrongAttributeValueException
WrongReferenceAttributeValueException
-
setAttribute
public void setAttribute(PerunSession sess, Host host, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Store the attribute associated with the host. Core attributes can't be set this way.- Specified by:
setAttribute
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionhost
- host to set attributes forattribute
- attribute to be set- Throws:
WrongAttributeAssignmentException
- if attribute is not host attributeWrongAttributeValueException
- if the attribute value is illegalWrongReferenceAttributeValueException
-
setAttributeWithoutCheck
public boolean setAttributeWithoutCheck(PerunSession sess, Host host, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException Description copied from interface:AttributesManagerBl
Just store the particular attribute associated with the host, doesn't preform any value check. Core attributes can't be set this way.- Specified by:
setAttributeWithoutCheck
in interfaceAttributesManagerBl
- Returns:
- Throws:
WrongAttributeAssignmentException
WrongAttributeValueException
-
setAttribute
public void setAttribute(PerunSession sess, Resource resource, Group group, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException, WrongReferenceAttributeValueException, GroupResourceMismatchException Description copied from interface:AttributesManagerBl
Store the group-resource attribute- Specified by:
setAttribute
in interfaceAttributesManagerBl
- Throws:
WrongAttributeAssignmentException
WrongAttributeValueException
WrongReferenceAttributeValueException
GroupResourceMismatchException
-
setAttributeWithoutCheck
public boolean setAttributeWithoutCheck(PerunSession sess, Resource resource, Group group, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException, WrongReferenceAttributeValueException, GroupResourceMismatchException Description copied from interface:AttributesManagerBl
Just store the group-resource attribute, do not preform any value check.- Specified by:
setAttributeWithoutCheck
in interfaceAttributesManagerBl
- Returns:
- true, if attribute was set in DB
- Throws:
WrongAttributeAssignmentException
WrongAttributeValueException
WrongReferenceAttributeValueException
- Can be raised while storing virtual attribute if another attribute which is required for set virtual attribute have wrong valueGroupResourceMismatchException
-
setAttributeWithoutCheck
public boolean setAttributeWithoutCheck(PerunSession sess, String key, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException Description copied from interface:AttributesManagerBl
Just store the particular attribute associated with the entityless, doesn't preform any value check. Core attributes can't be set this way.- Specified by:
setAttributeWithoutCheck
in interfaceAttributesManagerBl
- Returns:
- Throws:
WrongAttributeAssignmentException
WrongAttributeValueException
-
setAttribute
public void setAttribute(PerunSession sess, String key, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Stores entityless attribute (associated with string key).- Specified by:
setAttribute
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionkey
- store the attribute for this keyattribute
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not entityless attributeWrongReferenceAttributeValueException
-
setAttribute
public void setAttribute(PerunSession sess, UserExtSource ues, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Store the attribute associated with the user external source.- Specified by:
setAttribute
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionues
- user external source to set onattribute
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not user external source attributeWrongReferenceAttributeValueException
-
setAttributeInNestedTransaction
public void setAttributeInNestedTransaction(PerunSession sess, UserExtSource userExtSource, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerBl
Store the particular attribute associated with the user external source. Core attributes can't be set this way. This method creates nested transaction to prevent storing value to DB if it throws any exception.- Specified by:
setAttributeInNestedTransaction
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionuserExtSource
- user external source to set onattribute
- attribute to set- Throws:
WrongAttributeValueException
- if the attribute value is illegalWrongAttributeAssignmentException
- if attribute is not user external source attributeWrongReferenceAttributeValueException
-
createAttribute
public AttributeDefinition createAttribute(PerunSession sess, AttributeDefinition attribute) throws AttributeDefinitionExistsException Description copied from interface:AttributesManagerBl
Creates an attribute, the attribute is stored into the appropriate DB table according to the namespace Also tries to initialize its attribute module and register the module for listening Auditer messages.- Specified by:
createAttribute
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionattribute
- attribute to create- Returns:
- attribute with set id
- Throws:
AttributeDefinitionExistsException
- if attribute already exists
-
deleteAttribute
Description copied from interface:AttributesManagerBl
Deletes the attribute.- Specified by:
deleteAttribute
in interfaceAttributesManagerBl
-
deleteAllAttributeAuthz
Deprecated.Description copied from interface:AttributesManagerBl
Delete all authz for the attribute.- Specified by:
deleteAllAttributeAuthz
in interfaceAttributesManagerBl
attribute
- the attribute
-
deleteAttribute
public void deleteAttribute(PerunSession sess, AttributeDefinition attributeDefinition, boolean force) Description copied from interface:AttributesManagerBl
Deletes the attribute.- Specified by:
deleteAttribute
in interfaceAttributesManagerBl
attributeDefinition
- attribute to deleteforce
- delete also all existing relation. If this parameter is true the RelationExistsException is never thrown.
-
getResourceRequiredAttributesDefinition
public List<AttributeDefinition> getResourceRequiredAttributesDefinition(PerunSession sess, Resource resource) Description copied from interface:AttributesManagerBl
Get attributes definions required by all services assigned on the resource.- Specified by:
getResourceRequiredAttributesDefinition
in interfaceAttributesManagerBl
- Parameters:
sess
- perun session- Returns:
- attributes definions required by all services assigned on the resource.
-
getResourceRequiredAttributes
public List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Facility facility) Description copied from interface:AttributesManagerBl
Get facility attributes which are required by services. Services are known from the resource.- Specified by:
getResourceRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionresourceToGetServicesFrom
- resource from which the services are takenfacility
- you get attributes for this facility- Returns:
- list of facility attributes which are required by services which are assigned to resource
-
getResourceRequiredAttributes
public List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Resource resource) Description copied from interface:AttributesManagerBl
Get resource attributes which are required by services. Services are known from the resourceToGetServicesFrom.- Specified by:
getResourceRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionresourceToGetServicesFrom
- resource from which the services are takenresource
- resource from which the services are taken and for which you want to get the attributes- Returns:
- list of resource attributes which are required by services which are assigned to resource.
-
getResourceRequiredAttributes
public List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Resource resource) throws MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Get member-resource attributes which are required by services. Services are known from the resourceToGetServicesFrom.- Specified by:
getResourceRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionresourceToGetServicesFrom
- resource from which the services are takenmember
- you get attributes for this memberresource
- you get attributes for this resource and the member- Returns:
- list of facility attributes which are required by services which are assigned to resource.
- Throws:
MemberResourceMismatchException
-
getResourceRequiredAttributes
public List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Resource resource, boolean workWithUserAttributes) throws MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Get member-resource attributes which are required by services and if workWithUserAttributes is true also user, user-facility and member attributes. Services are known from the resourceToGetServicesFrom.- Specified by:
getResourceRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionresourceToGetServicesFrom
- getRequired attributes from services which are assigned on this resourcemember
- you get attributes for this member and the resourceresource
- you get attributes for this resource and the memberworkWithUserAttributes
- method can process also user, user-facility and member attributes (user is automatically get from member a facility is get from resource)- Returns:
- list of member-resource attributes (if workWithUserAttributes is true also user, user-facility and member attributes) which are required by services which are assigned to another resource.
- Throws:
MemberResourceMismatchException
- !!WARNING THIS IS VERY TIME-CONSUMING METHOD. DON'T USE IT IN BATCH!!
-
getResourceRequiredAttributes
public List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Group group) throws MemberGroupMismatchException Description copied from interface:AttributesManagerBl
Get member-group attributes which are required by services. Services are known from the resourceToGetServicesFrom.- Specified by:
getResourceRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionresourceToGetServicesFrom
- resource from which the services are takenmember
- you get attributes for this membergroup
- you get attributes for this group and the member- Returns:
- list of member-group's attributes which are required by services defined on specified resource
- Throws:
MemberGroupMismatchException
-
getResourceRequiredAttributes
public List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Group group, boolean workWithUserAttributes) throws MemberGroupMismatchException Description copied from interface:AttributesManagerBl
Get member-group attributes which are required by services if workWithUserAttributes is true also user and member attributes. Services are known from the resourceToGetServicesFrom.- Specified by:
getResourceRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionresourceToGetServicesFrom
- resource from which the services are takenmember
- you get attributes for this membergroup
- you get attributes for this group and the memberworkWithUserAttributes
- method can process also user and member attributes (user is automatically get from member)- Returns:
- list of member-group's attributes which are required by services defined on specified resource
- Throws:
MemberGroupMismatchException
-
getResourceRequiredAttributes
public List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Facility facility, User user) Description copied from interface:AttributesManagerBl
Get user-facility attributes which are required by services. Services are known from the resource.- Specified by:
getResourceRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionresourceToGetServicesFrom
- resource from which the services are takenfacility
- facility from which the services are takenuser
- you get attributes for this user- Returns:
- list of user-facility attributes which are required by service
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, List<Service> services, Resource resource) Description copied from interface:AttributesManagerBl
Get resource attributes which are required by selected services.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionresource
- you get attributes for this resource- Returns:
- list of resource attributes which are required by selected services.
-
getRequiredAttributes
Description copied from interface:AttributesManagerBl
Get resource attributes which are required by services which is related to this resource.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionresource
- resource for which you want to get the attributes- Returns:
- list of resource attributes which are required by services which are assigned to resource.
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Member member, Resource resource) throws MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Get member-resource attributes which are required by services which are relater to this member-resource.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- you get attributes for this member and the resourceresource
- you get attributes for this resource and the member- Returns:
- list of facility attributes which are required by services which are assigned to resource.
- Throws:
MemberResourceMismatchException
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Member member, Resource resource, boolean workWithUserAttributes) throws MemberResourceMismatchException Description copied from interface:AttributesManagerBl
If workWithUserAttribute is false => Get member-resource attributes which are required by services which are relater to this member-resource. If workWithUserAttributes is true => Get member-resource, user-facility, user and member attributes. (user is get from member and facility from resource)- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- you get attributes for this member and the resourceresource
- you get attributes for this resource and the memberworkWithUserAttributes
- method can process also user, user-facility and member attributes (user is automatically get from member a facility is get from resource)- Returns:
- list of member-resource attributes or if workWithUserAttributes is true return list of member-resource, user, member and user-facility attributes
- Throws:
MemberResourceMismatchException
- !!WARNING THIS IS VERY TIME-CONSUMING METHOD. DON'T USE IT IN BATCH!!
-
getRequiredAttributes
Description copied from interface:AttributesManagerBl
Get user-facility attributes which are required by services which are related to this user-facility.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionfacility
- facility from which the services are takenuser
- you get attributes for this user- Returns:
- list of facility attributes which are required by services which are assigned to facility.
-
getRequiredAttributes
Description copied from interface:AttributesManagerBl
Get user attributes which are required by services which are relater to this user.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun session- Returns:
- list of user's attributes which are required by services which are related to this user
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Member member, boolean workWithUserAttributes) Description copied from interface:AttributesManagerBl
Get member attributes which are required by services which are relater to this member and if is workWithUserAttributes = true, then also user required attributes- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- you get attributes for this memberworkWithUserAttributes
- method can process also user and user-facility attributes (user is automatically get from member a facility is get from resource)- Returns:
- list of member, user attributes which are required by services which are related to this member
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Member member, Group group, boolean workWithUserAttributes) throws MemberGroupMismatchException Description copied from interface:AttributesManagerBl
Get member, member-group attributes which are required by services which are related to this member and group. If workWithUserAttributes = TRUE, then also user attributes are returned.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- you get attributes for this membergroup
- you get attribute for this groupworkWithUserAttributes
- method can process also user if this is TRUE- Returns:
- list of attributes which are required by services which are related to this member and group
- Throws:
MemberGroupMismatchException
-
getResourceRequiredAttributes
public List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Facility facility, Resource resource, User user, Member member) throws MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Get member, user, member-resource and user-facility attributes which are required by services which are defined on "resourceToGetServicesFrom" resource.- Specified by:
getResourceRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionresourceToGetServicesFrom
- getRequired attributes from services which are assigned on this resourceresource
- you get attributes for this resource and the membermember
- you get attributes for this member and the resource- Returns:
- list of member-resource attributes which are required by services which are assigned to specified resource
- Throws:
MemberResourceMismatchException
-
getResourceRequiredAttributes
public List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member) Description copied from interface:AttributesManagerBl
Get member attributes which are required by services defined on specified resource- Specified by:
getResourceRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionresourceToGetServicesFrom
- getRequired attributes from services which are assigned on this resourcemember
- you get attributes for this member- Returns:
- list of member attributes which are required by services defined on specified resource
-
getResourceRequiredAttributes
public List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Resource resource, Group group) Description copied from interface:AttributesManagerBl
Get the group-resource attributes which are required by services. Services are known from the resource.- Specified by:
getResourceRequiredAttributes
in interfaceAttributesManagerBl
resourceToGetServicesFrom
- resource from which the services are taken- Returns:
-
getResourceRequiredAttributes
public List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Group group) - Specified by:
getResourceRequiredAttributes
in interfaceAttributesManagerBl
-
getResourceRequiredAttributes
public List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Resource resource, Group group, boolean workWithGroupAttributes) throws GroupResourceMismatchException - Specified by:
getResourceRequiredAttributes
in interfaceAttributesManagerBl
- Throws:
GroupResourceMismatchException
-
getResourceRequiredAttributes
public List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Host host) Description copied from interface:AttributesManagerBl
Get the host attributes which are required by services. Services are known from the resource.- Specified by:
getResourceRequiredAttributes
in interfaceAttributesManagerBl
- Returns:
-
getRequiredAttributesDefinition
public List<AttributeDefinition> getRequiredAttributesDefinition(PerunSession sess, Service service) Description copied from interface:AttributesManagerBl
Get all attributes which are required by service. Required attributes are requisite for Service to run.- Specified by:
getRequiredAttributesDefinition
in interfaceAttributesManagerBl
- Parameters:
sess
- sessservice
- service from which the attributes will be listed- Returns:
- All attributes which are required by service.
-
getResourceRequiredAttributes
public List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, User user) Description copied from interface:AttributesManagerBl
Get user attributes which are required by services. Services are known from the resource.- Specified by:
getResourceRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionresourceToGetServicesFrom
- resource from which the services are takenuser
- you get attributes for this user- Returns:
- list of users attributes which are required by service
-
getRequiredAttributes
Description copied from interface:AttributesManagerBl
Get facility attributes which are required by all services which are connected to this facility.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionfacility
- you get attributes for this facility- Returns:
- list of facility attributes which are required by all services which are connected to this facility.
-
getRequiredAttributes
Description copied from interface:AttributesManagerBl
Get facility attributes which are required by the service.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionservice
- attribute required by this service you'll getfacility
- you get attributes for this facility- Returns:
- list of facility attributes which are required by the service
-
getRequiredAttributes
Description copied from interface:AttributesManagerBl
Get vo attributes which are required by the service.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionservice
- attribute required by this service you'll getvo
- you get attributes for this vo- Returns:
- list of vo attributes which are required by the service
-
getRequiredAttributes
Description copied from interface:AttributesManagerBl
Get resource attributes which are required by the service.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionservice
- attribute required by this service you'll getresource
- resource for which you want to get the attributes- Returns:
- list of resource attributes which are required by the service
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Member member, Resource resource) throws MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Get member-resource attributes which are required by the service.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionservice
- attribute required by this service you'll getmember
- you get attributes for this member and the resourceresource
- you get attributes for this resource and the member- Returns:
- list of attributes which are required by the service.
- Throws:
MemberResourceMismatchException
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Member member, Resource resource, boolean workWithUserAttributes) throws MemberResourceMismatchException - Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Throws:
MemberResourceMismatchException
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Resource resource, Group group, Member member, boolean workWithUserAttributes) throws MemberResourceMismatchException, GroupResourceMismatchException Description copied from interface:AttributesManagerBl
Get member, member-resource and member-group attributes which are required by the service. if workWithUserAttributes == TRUE return also user and user-facility attributes- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionservice
- attribute required by this service you'll getresource
- you get attributes for this resource and the member and groupgroup
- you get attributes for this group and resource and membermember
- you get attributes for this member and the resource and groupworkWithUserAttributes
- if TRUE also user and user-facility attributes- Returns:
- list of attributes which are required by the service.
- Throws:
MemberResourceMismatchException
GroupResourceMismatchException
-
getRequiredAttributes
public HashMap<Member,List<Attribute>> getRequiredAttributes(PerunSession sess, Service service, Facility facility, Resource resource, List<Member> members, boolean workWithUserAttributes) throws MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Get member-resource, member, user-facility and user attributes which are required by service for each member in list of members. If workWithUserAttributes is false return only member-resource attributes. !!! Method checks if members list is not empty (returns empty HashMap)!!!- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionservice
- attribute required by this serviceresource
- you get attributes for this resourcemembers
- you get attributes for this list of membersworkWithUserAttributes
- if true method can process also user, user-facility and member attributes- Returns:
- map of member objects and his list of attributes
- Throws:
MemberResourceMismatchException
- if methods checkMemberIsFromTheSameVoLikeResource finds that user is not from same vo like resource
-
getRequiredAttributes
public HashMap<Member,List<Attribute>> getRequiredAttributes(PerunSession sess, Service service, Resource resource, List<Member> members) Description copied from interface:AttributesManagerBl
Get member-resource attributes which are required by service for each member in list of members. !!! Method checks if members list is not empty (returns empty HashMap)!!!- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionservice
- attribute required by this serviceresource
- you get attributes for this resource and the membersmembers
- you get attributes for this list of members and the resource- Returns:
- map of member objects and his list of attributes
-
getRequiredAttributes
public HashMap<Member,List<Attribute>> getRequiredAttributes(PerunSession sess, Resource resource, Service service, List<Member> members) Description copied from interface:AttributesManagerBl
Get member attributes which are required by service for each member in list of members. !!! Method checks if members list is not empty (returns empty HashMap)!!!- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionresource
- resource only to get allowed membersservice
- attribute required by this servicemembers
- you get attributes for this list of members- Returns:
- map of member objects and his list of attributes
-
getRequiredAttributes
public HashMap<User,List<Attribute>> getRequiredAttributes(PerunSession sess, Service service, Facility facility, List<User> users) Description copied from interface:AttributesManagerBl
Get user-facility attributes which are required by the service for each user in list of users. !!! Method checks if members list is not empty (returns empty HashMap)!!!- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionservice
- attribute required by this servicefacility
- you get attributes for this facility and userusers
- you get attributes for this user and facility- Returns:
- map of user and his list of attributes
-
getRequiredAttributes
public HashMap<User,List<Attribute>> getRequiredAttributes(PerunSession sess, Service service, List<User> users) Description copied from interface:AttributesManagerBl
Get user attributes which are required by the service for each user in list of users. !!! Method checks if members list is not empty (returns empty HashMap)!!!- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionservice
- attribute required by this serviceusers
- you get attributes for this user and facility- Returns:
- map of user and his list of attributes
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Member member, Group group) throws MemberGroupMismatchException Description copied from interface:AttributesManagerBl
Get member-group attributes which are required by the service.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionservice
- attribute required by this service you'll getmember
- you get attributes for this member and the groupgroup
- you get attributes for this group in which member is associated- Returns:
- list of attributes which are required by the service.
- Throws:
MemberGroupMismatchException
-
getRequiredAttributes
public Map<Member,List<Attribute>> getRequiredAttributes(PerunSession sess, Service service, List<Member> members, Group group) throws MemberGroupMismatchException Description copied from interface:AttributesManagerBl
Get member-group attributes which are required by the service, for the given members and the given group.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- sessionservice
- servicemembers
- membersgroup
- group- Returns:
- Member-Group attributes grouped by members
- Throws:
MemberGroupMismatchException
- if some of the given members is not from the same vo as the given group
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Member member, Group group, boolean workWithUserAttributes) throws MemberGroupMismatchException - Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Throws:
MemberGroupMismatchException
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Facility facility, Resource resource, User user, Member member) throws MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Get memner, user, member-resource, user-facility attributes which are required by the service.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Returns:
- Throws:
MemberResourceMismatchException
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, List<Service> services, Facility facility, Resource resource, User user, Member member) throws MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Get member, user, member-resource, user-facility attributes which are required by the services. The same attributes are returned only once.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- sessionservices
- servicesfacility
- facilityresource
- resourceuser
- usermember
- member- Returns:
- List of member, user, member-resource and user-facility attributes required by given services
- Throws:
MemberResourceMismatchException
- member resource mismatch exception
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Resource resource, Group group, boolean withGroupAttributes) throws GroupResourceMismatchException Description copied from interface:AttributesManagerBl
Get group-resource attributes which are required by the service.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionservice
- attribute required by this service you'll getwithGroupAttributes
- get also group attributes (which is required by the service) for this group- Returns:
- list of attributes which are required by the service.
- Throws:
GroupResourceMismatchException
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, List<Service> services, Resource resource, Group group, boolean withGroupAttributes) throws GroupResourceMismatchException Description copied from interface:AttributesManagerBl
Get group-resource attributes which are required by the services.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- sessionservices
- servicesresource
- resourcegroup
- groupwithGroupAttributes
- get also group attributes (which is required by the service) for this group- Returns:
- list of attributes which are required by the service.
- Throws:
GroupResourceMismatchException
- group resource mismatch exception
-
getRequiredAttributes
Description copied from interface:AttributesManagerBl
Get member attributes which are required by the service.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionservice
- attribute required by this service you'll getmember
- you get attributes for this member- Returns:
- list of attributes which are required by the service.
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Resource resource, Group group) throws GroupResourceMismatchException - Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Throws:
GroupResourceMismatchException
-
getRequiredAttributes
Description copied from interface:AttributesManagerBl
Get host attributes which are required by service- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Returns:
-
getRequiredAttributes
- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
-
getRequiredAttributesForGroups
public Map<Group,List<Attribute>> getRequiredAttributesForGroups(PerunSession sess, Service service, List<Group> groups) Description copied from interface:AttributesManagerBl
Get group attributes which are required by the given service for given groups.- Specified by:
getRequiredAttributesForGroups
in interfaceAttributesManagerBl
- Parameters:
sess
- sessionservice
- service for which are taken the required attributesgroups
- groups- Returns:
- attributes mapped by their groups
-
getRequiredAttributes
Description copied from interface:AttributesManagerBl
Get user attributes which are required by the service.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionservice
- attribute required by this service you'll getuser
- you get attributes for this user- Returns:
- list of attributes which are required by the service.
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Facility facility, User user) Description copied from interface:AttributesManagerBl
Get user-facility attributes which are required by the service.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionservice
- attribute required by this service you'll getfacility
- you get attributes for this facility and the useruser
- you get attributes for this user and the facility- Returns:
- list of attributes which are required by the service.
-
fillAttribute
public Attribute fillAttribute(PerunSession sess, Resource resource, Attribute attribute) throws WrongAttributeAssignmentException Description copied from interface:AttributesManagerBl
This method try to fill a value of the resource attribute. Value may be copied from some facility attribute.- Specified by:
fillAttribute
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionresource
- resource, attribute of which you want to fillattribute
- attribute to fill. If attributes already have set value, this value won't be overwritten. This means the attribute value must be empty otherwise this method won't fill it.- Returns:
- attribute which MAY have filled value
- Throws:
WrongAttributeAssignmentException
-
fillAttributes
public List<Attribute> fillAttributes(PerunSession sess, Resource resource, List<Attribute> attributes) throws WrongAttributeAssignmentException Description copied from interface:AttributesManagerBl
Batch version of fillAttribute. This method skips all attributes with not-null value.- Specified by:
fillAttributes
in interfaceAttributesManagerBl
- Throws:
WrongAttributeAssignmentException
- See Also:
-
fillAttribute
public Attribute fillAttribute(PerunSession sess, Member member, Resource resource, Attribute attribute) throws WrongAttributeAssignmentException, MemberResourceMismatchException Description copied from interface:AttributesManagerBl
This method try to fill value of the member-resource attribute. This value is automatically generated, but not all attributes can be filled this way.- Specified by:
fillAttribute
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- attribute of this member (and resource) and you want to fillresource
- attribute of this resource (and member) and you want to fillattribute
- attribute to fill. If attributes already have set value, this value won't be overwritten. This means the attribute value must be empty otherwise this method won't fill it.- Returns:
- attribute which MAY have filled value
- Throws:
WrongAttributeAssignmentException
MemberResourceMismatchException
-
fillAttributes
public List<Attribute> fillAttributes(PerunSession sess, Member member, Resource resource, List<Attribute> attributes) throws WrongAttributeAssignmentException, MemberResourceMismatchException Description copied from interface:AttributesManagerBl
Batch version of fillAttribute. This method skips all attributes with not-null value.- Specified by:
fillAttributes
in interfaceAttributesManagerBl
- Throws:
WrongAttributeAssignmentException
MemberResourceMismatchException
- See Also:
-
fillAttributes
public List<Attribute> fillAttributes(PerunSession sess, Member member, Resource resource, List<Attribute> attributes, boolean workWithUserAttributes) throws WrongAttributeAssignmentException, MemberResourceMismatchException - Specified by:
fillAttributes
in interfaceAttributesManagerBl
workWithUserAttributes
- method can process also user and user-facility attributes (user is automatically get from member a facility is get from resource) !!WARNING THIS IS VERY TIME-CONSUMING METHOD. DON'T USE IT IN BATCH!!- Throws:
WrongAttributeAssignmentException
MemberResourceMismatchException
-
fillAttribute
public Attribute fillAttribute(PerunSession sess, Member member, Group group, Attribute attribute) throws WrongAttributeAssignmentException, MemberGroupMismatchException Description copied from interface:AttributesManagerBl
This method tries to fill value of the member-group attribute. This value is automatically generated, but not all attributes can be filled this way.- Specified by:
fillAttribute
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- attribute of this member (and group) you want to fillgroup
- attribute of this group (and member) you want to fillattribute
- attribute to fill. If attributes already have set value, this value won't be overwritten. This means the attribute value must be empty otherwise this method won't fill it.- Returns:
- attribute which MAY have filled value
- Throws:
WrongAttributeAssignmentException
MemberGroupMismatchException
-
fillAttributes
public List<Attribute> fillAttributes(PerunSession sess, Member member, Group group, List<Attribute> attributes) throws WrongAttributeAssignmentException, MemberGroupMismatchException Description copied from interface:AttributesManagerBl
Batch version of fillAttribute. This method skips all attributes with not-null value.- Specified by:
fillAttributes
in interfaceAttributesManagerBl
- Throws:
WrongAttributeAssignmentException
- if any of attributes values is wrong/illegalMemberGroupMismatchException
- See Also:
-
fillAttributes
public List<Attribute> fillAttributes(PerunSession sess, Member member, Group group, List<Attribute> attributes, boolean workWithUserAttributes) throws WrongAttributeAssignmentException, MemberGroupMismatchException - Specified by:
fillAttributes
in interfaceAttributesManagerBl
workWithUserAttributes
- method can process also user and memebr attributes (user is automatically get from member) !!WARNING THIS IS VERY TIME-CONSUMING METHOD. DON'T USE IT IN BATCH!!- Throws:
WrongAttributeAssignmentException
MemberGroupMismatchException
-
fillAttributes
public List<Attribute> fillAttributes(PerunSession sess, Facility facility, Resource resource, User user, Member member, List<Attribute> attributes) throws WrongAttributeAssignmentException, MemberResourceMismatchException Description copied from interface:AttributesManagerBl
This method try to fill value of the user, member, member-resource and user-facility attributes. This value is automatically generated, but not all attributes can be filled this way. This method skips all attributes with not-null value.- Specified by:
fillAttributes
in interfaceAttributesManagerBl
- Returns:
- Throws:
WrongAttributeAssignmentException
MemberResourceMismatchException
-
fillAttributes
public List<Attribute> fillAttributes(PerunSession sess, Facility facility, Resource resource, User user, Member member, List<Attribute> attributes, boolean returnOnlyAttributesWithChangedValue) throws WrongAttributeAssignmentException, MemberResourceMismatchException Description copied from interface:AttributesManagerBl
This method try to fill value of the user, member, member-resource and user-facility attributes. This value is automatically generated, but not all attributes can be filled this way. This method skips all attributes with not-null value. if returnOnlyAttributesWithChangedValue is true - return only attributes which changed value by filling new one If false, has the same functionality like fillAttributes(PerunSession sess, Facility facility, Resource resource, User user, Member member, Listattributes) - Specified by:
fillAttributes
in interfaceAttributesManagerBl
- Returns:
- Throws:
WrongAttributeAssignmentException
MemberResourceMismatchException
-
fillAttribute
Description copied from interface:AttributesManagerBl
This method try to fill value of the member attribute. This value is automatically generated, but not all attributes can be filled this way.- Specified by:
fillAttribute
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionmember
- attribute of this member (and resource) and you want to fillattribute
- attribute to fill. If attributes already have set value, this value won't be overwritten. This means the attribute value must be empty otherwise this method won't fill it.- Returns:
- attribute which MAY have filled value
-
fillAttributes
Description copied from interface:AttributesManagerBl
Batch version of fillAttribute. This method skips all attributes with not-null value.- Specified by:
fillAttributes
in interfaceAttributesManagerBl
- See Also:
-
fillAttribute
public Attribute fillAttribute(PerunSession sess, Facility facility, User user, Attribute attribute) throws WrongAttributeAssignmentException Description copied from interface:AttributesManagerBl
This method try to fill value of the user-facility attribute. This value is automatically generated, but not all attributes can be filled this way.- Specified by:
fillAttribute
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionfacility
- attribute of this facility (and user) and you want to filluser
- attribute of this user (and facility) and you want to fillattribute
- attribute to fill. If attributes already have set value, this value won't be overwritten. This means the attribute value must be empty otherwise this method won't fill it.- Returns:
- attribute which MAY have filled value
- Throws:
WrongAttributeAssignmentException
-
fillAttributes
public List<Attribute> fillAttributes(PerunSession sess, Facility facility, User user, List<Attribute> attributes) throws WrongAttributeAssignmentException Description copied from interface:AttributesManagerBl
Batch version of fillAttribute. This method skips all attributes with not-null value.- Specified by:
fillAttributes
in interfaceAttributesManagerBl
- Throws:
WrongAttributeAssignmentException
- See Also:
-
fillAttribute
public Attribute fillAttribute(PerunSession sess, User user, Attribute attribute) throws WrongAttributeAssignmentException Description copied from interface:AttributesManagerBl
This method try to fill value of the user attribute. This value is automatically generated, but not all attributes can be filled this way.- Specified by:
fillAttribute
in interfaceAttributesManagerBl
- Parameters:
sess
- perun sessionuser
- attribute of this user (and facility) and you want to fillattribute
- attribute to fill. If attributes already have set value, this value won't be overwritten. This means the attribute value must be empty otherwise this method won't fill it.- Returns:
- attribute which MAY have filled value
- Throws:
WrongAttributeAssignmentException
-
fillAttributes
public List<Attribute> fillAttributes(PerunSession sess, User user, List<Attribute> attributes) throws WrongAttributeAssignmentException Description copied from interface:AttributesManagerBl
Batch version of fillAttribute. This method skips all attributes with not-null value.- Specified by:
fillAttributes
in interfaceAttributesManagerBl
- Throws:
WrongAttributeAssignmentException
- See Also:
-
fillAttribute
public Attribute fillAttribute(PerunSession sess, Host host, Attribute attribute) throws WrongAttributeAssignmentException
-