Interface AttributesManagerBl
- All Known Implementing Classes:
AttributesManagerBlImpl
- Author:
- Michal Prochazka <michalp@ics.muni.cz>, Slavek Licehammer <glory@ics.muni.cz>
-
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 mber, 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> attribute) batch version of checkAttributeSemanticsvoid
checkAttributesSemantics
(PerunSession sess, Resource resource, Group group, List<Attribute> attribute, 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> attribute) batch version of checkAttributeSyntaxvoid
checkAttributesSyntax
(PerunSession sess, Resource resource, Group group, List<Attribute> attribute, 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) Batch version of checkAttributeSemanticsvoid
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 attributeDefinition) 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.decorateMembersWithDefOptMemberAttributes
(PerunSession sess, List<RichMember> members, List<String> memberAttrNames) Appends each member with the member attributes (only def and opt) named in the memberAttrNames list if the value of the attribute for the given member is found in the database.decorateMembersWithDefOptUserAttributes
(PerunSession sess, List<RichMember> members, List<String> userAttrNames) Appends each member with the user attributes (only def and opt) named in the userAttrNames list if the value of the attribute for the given member(user) is found in the database.void
deleteAllAttributeAuthz
(PerunSession sess, AttributeDefinition attribute) Deprecated.void
deleteAttribute
(PerunSession sess, AttributeDefinition attributeDefinition) 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.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> attribute) Batch version of fillAttribute.fillAttributes
(PerunSession sess, Resource resource, Group group, List<Attribute> attribute, 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.getAppFormItemsForAppFormAndAttribute
(PerunSession sess, int appFormId, AttributeDefinition attr) Returns list of app form items' shortnames for which the given attribute is a source or a destination attribute in the given application formReturns all application forms where the given attribute definition is a source or a destination attribute for any application from itemgetAttribute
(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-facilitygetAttributes
(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!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.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 usergetUserIdsByLogin
(PerunSession sess, String login) Gets IDs of users who use the given login in any namespace.getUserVirtualAttributeModule
(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.boolean
isAttributeActionCritical
(PerunSession sess, AttributeDefinition attr, AttributeAction action) Checks if the action is critical on given attribute.boolean
isAttributeActionGloballyCritical
(PerunSession sess, AttributeDefinition attr, AttributeAction action) Checks if the action is critical on given attribute for all objects.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> attributes) 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> attributes) 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> attribute) 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, boolean global) 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 ues, 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
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.
-
Method Details
-
checkActionTypeExists
@Deprecated void checkActionTypeExists(PerunSession sess, ActionType actionType) throws ActionTypeNotExistsException Deprecated.Check if actionType exists in underlaying data source.- Parameters:
sess
- perun sessionactionType
- actionType to check- Throws:
InternalErrorException
- if unexpected error occureActionTypeNotExistsException
- if attribute doesn't exists
-
checkAttributeAssignment
void checkAttributeAssignment(PerunSession sess, AttributeDefinition attributeDefinition, PerunBean handler) throws WrongAttributeAssignmentException Check if attribute is from the same namespace as it's handler- Parameters:
sess
-attributeDefinition
-handler
- attribute's handler- Throws:
WrongAttributeAssignmentException
InternalErrorException
-
checkAttributeAssignment
void checkAttributeAssignment(PerunSession sess, AttributeDefinition attributeDefinition, PerunBean handler1, PerunBean handler2) throws WrongAttributeAssignmentException Check if attribute is from the same namespace as combination of perunBean handlers. Order of handlers does not matter.- Parameters:
sess
- perun sessionattributeDefinition
- the attribute definitionhandler1
- one of attribute's handlershandler2
- one of attribute's handlers- Throws:
WrongAttributeAssignmentException
- if assignment of attribute is not correctInternalErrorException
- if both handlers are empty or namespace for handlers can't be found
-
checkAttributeDependencies
void checkAttributeDependencies(PerunSession sess, RichAttribute richAttr) throws WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException This method check validity of value on all attributes which depends on the attributes in richAttr object.There are two types of dependency "normal" and "strong" and every non-virtual attribute can have some "normal" dependencies and every virtual attribute can have some "normal" and some "strong" dependencies.
Normal dependency means that if we have attributes A and B and attribute A is dependent on attribute B, then if value of attribute B has been changed, we need to check that value of attribute A is still valid. In other words: If '->' means depends on, then in case that A -> B, if value of B has been changed, we need to check that value of A is still valid.
Strong dependency means that if we have attribute A and B and attribute A is strongly dependent on attribute B, then if value of attribute B has been changed, it can affect value of attribute A too therefore we need to check value of attribute A and also check all attributes which depend on attribute A. In other words: If '=>' means strongly depends on and '->' means depends on, then in case that A => B and C -> A, if value of B has been changed, we need to check not only A, but also C, because validity of attribute C could been affected but change of attribute A.
RichAttribute is needed because it contains useful objects in holders.
- Parameters:
sess
-richAttr
- RichAttribute with attribute an its' holders- Throws:
InternalErrorException
WrongAttributeValueException
WrongAttributeAssignmentException
WrongReferenceAttributeValueException
-
checkAttributeExists
void checkAttributeExists(PerunSession sess, AttributeDefinition attribute) throws AttributeNotExistsException - Throws:
AttributeNotExistsException
-
checkAttributeSemantics
void checkAttributeSemantics(PerunSession sess, Facility facility, Attribute attribute) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException Check if value of this facility attribute has valid semantics.- Parameters:
sess
- perun sessionfacility
- facility for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if attribute isn't facility attributeWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
void checkAttributeSemantics(PerunSession sess, Vo vo, Attribute attribute) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException Check if value of this vo attribute has valid semantics.- Parameters:
sess
- perun sessionvo
- vo for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if attribute isn't vo attributeWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
void checkAttributeSemantics(PerunSession sess, Group group, Attribute attribute) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException Check if value of this group attribute has valid semantics.- Parameters:
sess
- perun sessiongroup
- group for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if attribute isn't group attributeWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
void checkAttributeSemantics(PerunSession sess, Resource resource, Attribute attribute) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException Check if value of this resource attribute has valid semantics.- Parameters:
sess
- perun sessionresource
- resource for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if attribute isn't resource attributeWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
void checkAttributeSemantics(PerunSession sess, Member member, Resource resource, Attribute attribute) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException, MemberResourceMismatchException Check if value of this member-resource attribute has valid semantics.- Parameters:
sess
- perun sessionmember
- member for which (and for specified resource) you want to check validity of attributeresource
- resource for which (and for specified member) you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if attribute isn't member-resource attributeWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semanticsMemberResourceMismatchException
-
checkAttributeSemantics
void checkAttributeSemantics(PerunSession sess, Member member, Group group, Attribute attribute) throws WrongAttributeAssignmentException, MemberGroupMismatchException Check if value of this member-group attribute has valid semantics.- Parameters:
sess
- perun sessiongroup
- group for which (and for specified member) you want to check validity of attributemember
- member for which (and for specified group) you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if attribute isn't member-resource attributeMemberGroupMismatchException
-
checkAttributeSemantics
void checkAttributeSemantics(PerunSession sess, Member member, Attribute attribute) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException Check if value of this member attribute has valid semantics.- Parameters:
sess
- perun sessionmember
- member for which (and for specified resource) you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if attribute isn't member-resource attributeWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
void checkAttributeSemantics(PerunSession sess, Facility facility, User user, Attribute attribute) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException Check if value of this user-facility attribute has valid semantics.- Parameters:
sess
- perun sessionfacility
- facility for which (and for specified user) you want to check validity of attributeuser
- user for which (and for specified facility) you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if attribute isn't user-facility attributeWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
void checkAttributeSemantics(PerunSession sess, Resource resource, Group group, Attribute attribute) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException, GroupResourceMismatchException Check if value of this group-resource attribute has valid semantics- Parameters:
sess
- perun sessionresource
- resource for which (and for specified group) you want to check validity of attributegroup
- group for which (and for specified resource) you want to check validity of attribute- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if attribute isn't group-resource attributeWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semanticsGroupResourceMismatchException
- if group and resource are not in the same VO
-
checkAttributeSemantics
void checkAttributeSemantics(PerunSession sess, User user, Attribute attribute) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException Check if value of this user attribute has valid semantics.- Parameters:
sess
- perun sessionuser
- user for which (and for specified facility) you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if attribute isn't user-facility attributeWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
void checkAttributeSemantics(PerunSession sess, Host host, Attribute attribute) throws WrongAttributeAssignmentException Check if the value of this host attribute has valid semantics- Parameters:
sess
- perun sessionhost
- host which attribute validity is checkedattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if the attribute isn't host attribute
-
checkAttributeSemantics
void checkAttributeSemantics(PerunSession sess, String key, Attribute attribute) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException Check if the value of this entityless attribute has valid semantics- Parameters:
sess
- perun sessionkey
- check the attribute for this keyattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semanticsWrongAttributeAssignmentException
- if the attribute isn't entityless attribute
-
checkAttributeSemantics
void checkAttributeSemantics(PerunSession sess, UserExtSource ues, Attribute attribute) throws WrongAttributeAssignmentException Check if value of this user ext source attribute has valid semantics.- Parameters:
sess
- perun sessionues
- user external source for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if attribute isn't user external source attribute
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, Facility facility, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException Batch version of checkAttributeSemantics- Parameters:
sess
- perun sessionfacility
- facility for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if attribute isn't facility attributeWrongAttributeValueException
- if the attribute value has wrong/illegal syntax- See Also:
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, Vo vo, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException Check if value of this vo attribute has valid syntax.- Parameters:
sess
- perun sessionvo
- vo for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if attribute isn't vo attributeWrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, Group group, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException Check if value of this group attribute has valid syntax.- Parameters:
sess
- perun sessiongroup
- group for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if attribute isn't group attributeWrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, Resource resource, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException Check if value of this resource attribute has valid syntax.- Parameters:
sess
- perun sessionresource
- resource for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntaxWrongAttributeAssignmentException
- if attribute isn't resource attribute
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, Member member, Resource resource, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException, MemberResourceMismatchException Check if value of this member-resource attribute has valid syntax.- Parameters:
sess
- perun sessionmember
- member for which (and for specified resource) you want to check validity of attributeresource
- resource for which (and for specified member) you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntaxWrongAttributeAssignmentException
- if attribute isn't member-resource attributeMemberResourceMismatchException
- if member and resource are not in the same VO
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, Member member, Group group, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException, MemberGroupMismatchException Check if value of this member-group attribute has valid syntax.- Parameters:
sess
- perun sessiongroup
- group for which (and for specified member) you want to check validity of attributemember
- member for which (and for specified group) you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntaxWrongAttributeAssignmentException
- if attribute isn't member-group attributeMemberGroupMismatchException
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, Member member, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException Check if value of this member attribute has valid syntax.- Parameters:
sess
- perun sessionmember
- member for which (and for specified resource) you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntaxWrongAttributeAssignmentException
- if attribute isn't member attribute
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, Facility facility, User user, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException Check if value of this user-facility attribute has valid syntax.- Parameters:
sess
- perun sessionfacility
- facility for which (and for specified user) you want to check validity of attributeuser
- user for which (and for specified facility) you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntaxWrongAttributeAssignmentException
- if attribute isn't user-facility attribute
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, Resource resource, Group group, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException, GroupResourceMismatchException Check if value of this group-resource attribute has valid syntax- Parameters:
sess
- perun sessionresource
- resource for which (and for specified group) you want to check validity of attributegroup
- group for which (and for specified resource) you want to check validity of attribute- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if attribute isn't group-resource attributeWrongAttributeValueException
- if the attribute value has wrong/illegal syntaxGroupResourceMismatchException
- if group and resource are not in the same VO
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, User user, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException Check if value of this user attribute has valid syntax.- Parameters:
sess
- perun sessionuser
- user for which (and for specified facility) you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntaxWrongAttributeAssignmentException
- if attribute isn't user attribute
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, Host host, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException Check if the value of this host attribute has valid syntax.- Parameters:
sess
- perun sessionhost
- host which attribute validity is checkedattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntaxWrongAttributeAssignmentException
- if attribute isn't host attribute
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, String key, Attribute attribute) throws WrongAttributeValueException, WrongAttributeAssignmentException Check if the value of this entityless attribute has valid syntax- Parameters:
sess
- perun sessionkey
- check the attribute for this keyattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntaxWrongAttributeAssignmentException
- if the attribute isn't entityless attribute
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, UserExtSource ues, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException Check if value of this user external source attribute has valid syntax.- Parameters:
sess
- perun sessionues
- user external source for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntaxWrongAttributeAssignmentException
- if attribute isn't user external source attribute
-
checkAttributesExists
void checkAttributesExists(PerunSession sess, List<? extends AttributeDefinition> attributes) throws AttributeNotExistsException - Throws:
AttributeNotExistsException
-
checkAttributesSemantics
void checkAttributesSemantics(PerunSession sess, Facility facility, List<Attribute> attributes) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException Batch version of checkAttributeSemantics- Throws:
WrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semanticsWrongAttributeAssignmentException
- See Also:
-
checkAttributesSemantics
void checkAttributesSemantics(PerunSession sess, Vo vo, List<Attribute> attributes) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException Batch version of checkAttributeSemantics- Throws:
WrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semanticsWrongAttributeAssignmentException
- See Also:
-
checkAttributesSemantics
void checkAttributesSemantics(PerunSession sess, Group group, List<Attribute> attributes) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException Batch version of checkAttributeSemantics- Throws:
WrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semanticsWrongAttributeAssignmentException
- See Also:
-
checkAttributesSemantics
void checkAttributesSemantics(PerunSession sess, UserExtSource ues, List<Attribute> attributes) throws WrongAttributeAssignmentException Batch version of checkAttributeSemantics -
checkAttributesSemantics
void checkAttributesSemantics(PerunSession sess, Resource resource, List<Attribute> attributes) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException Batch version of checkAttributeSemantics- Throws:
WrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semanticsWrongAttributeAssignmentException
- See Also:
-
checkAttributesSemantics
void checkAttributesSemantics(PerunSession sess, Member mber, Resource resource, List<Attribute> attributes) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException, MemberResourceMismatchException Batch version of checkAttributeSemantics -
checkAttributesSemantics
void checkAttributesSemantics(PerunSession sess, Member member, Resource resource, List<Attribute> attributes, boolean workWithUserAttributes) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException, MemberResourceMismatchException Batch version of checkAttributeSemantics- Parameters:
workWithUserAttributes
- method can process also user and user-facility attributes (user is automatically get from member a facility is get from resource)- Throws:
WrongAttributeAssignmentException
WrongReferenceAttributeValueException
MemberResourceMismatchException
- See Also:
-
checkAttributesSemantics
void checkAttributesSemantics(PerunSession sess, Member member, Group group, List<Attribute> attributes) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException, MemberGroupMismatchException Batch version of checkAttributeSemantics -
checkAttributesSemantics
void checkAttributesSemantics(PerunSession sess, Member member, Group group, List<Attribute> attributes, boolean workWithUserAttributes) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException, MemberGroupMismatchException Batch version of checkAttributeSemantics- Parameters:
workWithUserAttributes
- method can process also user and member attributes (user is automatically get from member) !!WARNING THIS IS VERY TIME-CONSUMING METHOD. DON'T USE IT IN BATCH!!- Throws:
WrongAttributeAssignmentException
WrongReferenceAttributeValueException
MemberGroupMismatchException
- See Also:
-
checkAttributesSemantics
void checkAttributesSemantics(PerunSession sess, Facility facility, Resource resource, User user, Member member, List<Attribute> attributes) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException, MemberResourceMismatchException Check if value of attributes has valid semantics. Attributes can be from namespace: member, user, member-resource and user-facility.- Parameters:
sess
- perun sessionfacility
- facility for which you want to check validity of attributeresource
- resource for which you want to check validity of attributeuser
- user for which you want to check validity of attributemember
- member for which you want to check validity of attributeattributes
- list of attributes to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if attribute does not belong to appropriate entityWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semanticsMemberResourceMismatchException
- if member and resource are not in the same VO
-
checkAttributesSemantics
void checkAttributesSemantics(PerunSession sess, Facility facility, Resource resource, Group group, User user, Member member, List<Attribute> attributes) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException, GroupResourceMismatchException, MemberResourceMismatchException, MemberGroupMismatchException Check if value of attributes has valid semantics. Attributes can be from namespace: member, user, member-group, member-resource and user-facility.- Parameters:
sess
- perun sessionfacility
- facility for which you want to check validity of attributeresource
- resource for which you want to check validity of attributegroup
- group for which you want to check validity of attributeuser
- user for which you want to check validity of attributemember
- member for which you want to check validity of attributeattributes
- list of attributes to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if attribute does not belong to appropriate entityWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semanticsGroupResourceMismatchException
- if group and resource are not in the same VOMemberResourceMismatchException
- if member and resource are not in the same VOMemberGroupMismatchException
-
checkAttributesSemantics
void checkAttributesSemantics(PerunSession sess, Member member, List<Attribute> attributes) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException Batch version of checkAttributeSemantics -
checkAttributesSemantics
void checkAttributesSemantics(PerunSession sess, Facility facility, User user, List<Attribute> attributes) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException Batch version of checkAttributeSemantics -
checkAttributesSemantics
void checkAttributesSemantics(PerunSession sess, Resource resource, Group group, List<Attribute> attribute) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException, GroupResourceMismatchException batch version of checkAttributeSemanticsee cz.metacentrum.perun.core.api.AttributesManager#checkAttributeSemantics(cz.metacentrum.perun.core.api.PerunSession, cz.metacentrum.perun.core.api.Resource, cz.metacentrum.perun.core.api.Group, cz.metacentrum.perun.core.api.Attribute)
-
checkAttributesSemantics
void checkAttributesSemantics(PerunSession sess, Resource resource, Group group, List<Attribute> attribute, boolean workWithGroupAttribute) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException, GroupResourceMismatchException batch version of checkAttributeSemantics with workWithGroupAttributes parameter If workWithGroupAttributes is true, checks whether attribute is group-resource or group attribute. -
checkAttributesSemantics
void checkAttributesSemantics(PerunSession sess, User user, List<Attribute> attributes) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException Batch version of checkAttributeSemantics -
checkAttributesSemantics
void checkAttributesSemantics(PerunSession sess, Host host, List<Attribute> attributes) throws WrongAttributeAssignmentException Batch version of checkAttributeSemantics -
checkAttributesSyntax
void checkAttributesSyntax(PerunSession sess, Facility facility, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException Batch version of checkAttributeSyntax- Throws:
WrongAttributeValueException
- if any of attributes values has wrong/illegal syntaxWrongAttributeAssignmentException
- See Also:
-
checkAttributesSyntax
void checkAttributesSyntax(PerunSession sess, Vo vo, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException Batch version of checkAttributeSyntax- Throws:
WrongAttributeValueException
- if any of attributes values has wrong/illegal syntaxWrongAttributeAssignmentException
- See Also:
-
checkAttributesSyntax
void checkAttributesSyntax(PerunSession sess, Group group, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException Batch version of checkAttributeSyntax- Throws:
WrongAttributeValueException
- if any of attributes values has wrong/illegal syntaxWrongAttributeAssignmentException
- See Also:
-
checkAttributesSyntax
void checkAttributesSyntax(PerunSession sess, Resource resource, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException Batch version of checkAttributeSyntax- Throws:
WrongAttributeValueException
- if any of attributes values has wrong/illegal syntaxWrongAttributeAssignmentException
- See Also:
-
checkAttributesSyntax
void checkAttributesSyntax(PerunSession sess, Member member, Resource resource, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, MemberResourceMismatchException Batch version of checkAttributeSyntax -
checkAttributesSyntax
void checkAttributesSyntax(PerunSession sess, Member member, Resource resource, List<Attribute> attributes, boolean workWithUserAttributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, MemberResourceMismatchException Batch version of checkAttributeSyntax- Parameters:
workWithUserAttributes
- method can process also user and user-facility attributes (user is automatically get from member a facility is get from resource)- Throws:
WrongAttributeValueException
WrongAttributeAssignmentException
MemberResourceMismatchException
- See Also:
-
/ void checkAttributesSyntax(PerunSession sess, Member member, Resource resource, List
attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, MemberResourceMismatchException; /** Batch version of checkAttributeSyntax
AttributesManager.checkAttributeSyntax(PerunSession, Member, Resource, Attribute)
-
checkAttributesSyntax
void checkAttributesSyntax(PerunSession sess, Member member, Group group, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, MemberGroupMismatchException Batch version of checkAttributeSyntax -
checkAttributesSyntax
void checkAttributesSyntax(PerunSession sess, Member member, Group group, List<Attribute> attributes, boolean workWithUserAttributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, MemberGroupMismatchException Batch version of checkAttributeSyntax- Parameters:
workWithUserAttributes
- method can process also user and member attributes (user is automatically get from member) !!WARNING THIS IS VERY TIME-CONSUMING METHOD. DON'T USE IT IN BATCH!!- Throws:
WrongAttributeValueException
WrongAttributeAssignmentException
MemberGroupMismatchException
- See Also:
-
checkAttributesSyntax
void checkAttributesSyntax(PerunSession sess, Facility facility, Resource resource, User user, Member member, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, MemberResourceMismatchException Check if value of attributes has valid syntax. Attributes can be from namespace: member, user, member-resource and user-facility.- Parameters:
sess
- perun sessionfacility
- facility for which you want to check validity of attributeresource
- resource for which you want to check validity of attributeuser
- user for which you want to check validity of attributemember
- member for which you want to check validity of attributeattributes
- list of attributes to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntaxWrongAttributeAssignmentException
- if attribute does not belong to appropriate entityMemberResourceMismatchException
- if member and resource are not in the same VO
-
checkAttributesSyntax
void checkAttributesSyntax(PerunSession sess, Facility facility, Resource resource, Group group, User user, Member member, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException, GroupResourceMismatchException, MemberResourceMismatchException, MemberGroupMismatchException Check if value of attributes has valid syntax. Attributes can be from namespace: member, user, member-group, member-resource and user-facility.- Parameters:
sess
- perun sessionfacility
- facility for which you want to check validity of attributeresource
- resource for which you want to check validity of attributeuser
- user for which you want to check validity of attributemember
- member for which you want to check validity of attributeattributes
- list of attributes to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntaxWrongAttributeAssignmentException
- if attribute does not belong to appropriate entityGroupResourceMismatchException
- if group and resource are not in the same VOMemberResourceMismatchException
- if member and resource are not in the same VOMemberGroupMismatchException
-
checkAttributesSyntax
void checkAttributesSyntax(PerunSession sess, Member member, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException Batch version of checkAttributeSyntax -
checkAttributesSyntax
void checkAttributesSyntax(PerunSession sess, Facility facility, User user, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException Batch version of checkAttributeSyntax -
checkAttributesSyntax
void checkAttributesSyntax(PerunSession sess, Resource resource, Group group, List<Attribute> attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException, GroupResourceMismatchException batch version of checkAttributeSyntax -
checkAttributesSyntax
void checkAttributesSyntax(PerunSession sess, Resource resource, Group group, List<Attribute> attribute, boolean workWithGroupAttribute) throws WrongAttributeAssignmentException, WrongAttributeValueException, GroupResourceMismatchException batch version of checkAttributeSyntax with workWithGroupAttributes parameter. If workWithGroupAttributes is true, checks whether attribute is group-resource or group attribute. -
checkAttributesSyntax
void checkAttributesSyntax(PerunSession sess, User user, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException Batch version of checkAttributeSyntax -
checkAttributesSyntax
void checkAttributesSyntax(PerunSession sess, Host host, List<Attribute> attributes) throws WrongAttributeAssignmentException, WrongAttributeValueException Batch version of checkAttributeSyntax -
checkAttributesSyntax
void checkAttributesSyntax(PerunSession sess, UserExtSource ues, List<Attribute> attributes) throws WrongAttributeAssignmentException, WrongAttributeValueException Batch version of checkAttributeSyntax -
checkGroupIsFromTheSameVoLikeResource
void checkGroupIsFromTheSameVoLikeResource(PerunSession sess, Group group, Resource resource) throws GroupResourceMismatchException Check if group is assigned on resource. If not, throw GroupResourceMismatch Exception- Parameters:
sess
-group
-resource
-- Throws:
InternalErrorException
GroupResourceMismatchException
-
checkNamespace
void checkNamespace(PerunSession sess, AttributeDefinition attribute, String namespace) throws WrongAttributeAssignmentException Determine if attribute is from specified namespace.- Parameters:
sess
-attribute
-namespace
-- Throws:
WrongAttributeAssignmentException
- if the attribute isn't from specified namespace
-
checkNamespace
void checkNamespace(PerunSession sess, List<? extends AttributeDefinition> attributes, String namespace) throws WrongAttributeAssignmentException Determine if attributes are from specified namespace.- Parameters:
sess
-attributes
-namespace
-- Throws:
WrongAttributeAssignmentException
- if any of the attribute isn't from specified namespace
-
convertAttributeToNonunique
int convertAttributeToNonunique(PerunSession session, int attrId) throws AttributeNotExistsException, AttributeNotMarkedUniqueException Converts attribute to nonunique.Unmarks unique flag from attribute definition, and deletes all values from a special table with unique constraint that ensures that all values remain unique.
- Parameters:
session
- perun sessionattrId
- attribute id- Throws:
AttributeNotExistsException
- when the attribute definition for attrId doesn't existAttributeNotMarkedUniqueException
- when the attribute definition is not unique
-
convertAttributeToUnique
void convertAttributeToUnique(PerunSession session, int attrId) throws AttributeNotExistsException, AttributeAlreadyMarkedUniqueException Converts attribute to unique.Marks the attribute definition as unique, and copies all values to a special table with unique constraint that ensures that all values remain unique. Values of type ArrayList and LinkedHashMap are splitted into multiple entries, thus each of the entries must be unique. For LinkedHashMap, the unique entries are strings in the form of "key=value", thus it is possible to have same values for different keys.
Entityless attributes cannot be converted to unique.
- Parameters:
session
- perun sessionattrId
- attribute id- Throws:
AttributeNotExistsException
AttributeAlreadyMarkedUniqueException
-
createAttribute
AttributeDefinition createAttribute(PerunSession sess, AttributeDefinition attributeDefinition) throws AttributeDefinitionExistsException 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.- Parameters:
sess
- perun sessionattributeDefinition
- attribute to create- Returns:
- attribute with set id
- Throws:
AttributeDefinitionExistsException
- if attribute already existsInternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
decorateMembersWithDefOptMemberAttributes
List<RichMember> decorateMembersWithDefOptMemberAttributes(PerunSession sess, List<RichMember> members, List<String> memberAttrNames) Appends each member with the member attributes (only def and opt) named in the memberAttrNames list if the value of the attribute for the given member is found in the database.- Parameters:
sess
- perun sessionmembers
- to decorate with the given member attributesmemberAttrNames
- list of the member attribute names- Returns:
- the original list of RichMembers with added member attributes
- Throws:
InternalErrorException
- if RuntimeErrorException has been thrown
-
decorateMembersWithDefOptUserAttributes
List<RichMember> decorateMembersWithDefOptUserAttributes(PerunSession sess, List<RichMember> members, List<String> userAttrNames) Appends each member with the user attributes (only def and opt) named in the userAttrNames list if the value of the attribute for the given member(user) is found in the database.- Parameters:
sess
- perun sessionmembers
- to decorate with the given user attributesuserAttrNames
- list of the user attribute names- Returns:
- the original list of RichMembers with added user attributes
- Throws:
InternalErrorException
- if RuntimeErrorException has been thrown
-
deleteAllAttributeAuthz
Deprecated.Delete all authz for the attribute.- Parameters:
sess
-attribute
- the attribute- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptions
-
deleteAttribute
void deleteAttribute(PerunSession sess, AttributeDefinition attributeDefinition) throws RelationExistsException Deletes the attribute.- Parameters:
sess
-attributeDefinition
-- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionRelationExistsException
- if attribute definition has any relation to some application form item or to some service as a required attribute
-
deleteAttribute
Deletes the attribute.- Parameters:
sess
-attributeDefinition
- attribute to deleteforce
- delete also all existing relation. If this parameter is true the RelationExistsException is never thrown.- Throws:
InternalErrorException
-
doTheMagic
void doTheMagic(PerunSession sess, Member member) throws WrongAttributeValueException, WrongReferenceAttributeValueException Same as doTheMagic(sess, member, false); -
doTheMagic
void doTheMagic(PerunSession sess, Member member, boolean trueMagic) throws WrongAttributeValueException, WrongReferenceAttributeValueException This function takes all member-related attributes (member, user, member-resource, user-facility) and tries to fill them and set them. If trueMagic is set, this method can remove invalid attribute value (value which didn't pass checkAttributeSemantics test) and try to fill and set another. In this case, WrongReferenceAttributeValueException, WrongAttributeValueException are thrown if same attribute can't be set corraclty.- Parameters:
sess
-member
-trueMagic
-- Throws:
InternalErrorException
WrongAttributeValueException
WrongReferenceAttributeValueException
-
escapeQueryParameters
Escapes QUERY PARAMETER VALUES in URL value. Does not modify domain or parameters names. e.g. 'domain/?vo=vo name' => 'domain/?vo=vo+name'- Parameters:
value
- url- Returns:
- url with escaped special characters in query parameter's values
-
fillAttribute
Attribute fillAttribute(PerunSession sess, Resource resource, Attribute attribute) throws WrongAttributeAssignmentException This method try to fill a value of the resource attribute. Value may be copied from some facility attribute.- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
-
fillAttribute
Attribute fillAttribute(PerunSession sess, Member member, Resource resource, Attribute attribute) throws WrongAttributeAssignmentException, MemberResourceMismatchException 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.- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
MemberResourceMismatchException
-
fillAttribute
Attribute fillAttribute(PerunSession sess, Member member, Group group, Attribute attribute) throws WrongAttributeAssignmentException, MemberGroupMismatchException 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.- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
MemberGroupMismatchException
-
fillAttribute
This method try to fill value of the member attribute. This value is automatically generated, but not all attributes can be filled this way.- 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
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
fillAttribute
Attribute fillAttribute(PerunSession sess, Facility facility, User user, Attribute attribute) throws WrongAttributeAssignmentException 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.- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
-
fillAttribute
Attribute fillAttribute(PerunSession sess, User user, Attribute attribute) throws WrongAttributeAssignmentException This method try to fill value of the user attribute. This value is automatically generated, but not all attributes can be filled this way.- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
-
fillAttribute
Attribute fillAttribute(PerunSession sess, Host host, Attribute attribute) throws WrongAttributeAssignmentException This method tries to fill value of the host attribute. This value is automatically generated, but not all attributes can be filled this way- Parameters:
sess
-host
-attribute
- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
-
fillAttribute
Attribute fillAttribute(PerunSession sess, Group group, Attribute attribute) throws WrongAttributeAssignmentException -
fillAttribute
Attribute fillAttribute(PerunSession sess, Resource resource, Group group, Attribute attribute) throws WrongAttributeAssignmentException, GroupResourceMismatchException This method tries to fill value of group-resource attribute. This value is automatically generated, but not all attributes can be filled this way- Parameters:
sess
-resource
-group
-attribute
-- Returns:
- attribute which may have filled value
- Throws:
InternalErrorException
WrongAttributeAssignmentException
GroupResourceMismatchException
-
fillAttribute
Attribute fillAttribute(PerunSession sess, UserExtSource ues, Attribute attribute) throws WrongAttributeAssignmentException This method tries to fill value of the user external source attribute. This value is automatically generated, but not all attributes can be filled this way- Parameters:
sess
-ues
-attribute
- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
-
fillAttributes
List<Attribute> fillAttributes(PerunSession sess, Resource resource, List<Attribute> attributes) throws WrongAttributeAssignmentException Batch version of fillAttribute. This method skips all attributes with not-null value. -
fillAttributes
List<Attribute> fillAttributes(PerunSession sess, Member member, Resource resource, List<Attribute> attributes) throws WrongAttributeAssignmentException, MemberResourceMismatchException Batch version of fillAttribute. This method skips all attributes with not-null value.- Throws:
WrongAttributeValueException
- if any of attributes values is wrong/illegalWrongAttributeAssignmentException
MemberResourceMismatchException
- See Also:
-
fillAttributes
List<Attribute> fillAttributes(PerunSession sess, Member member, Resource resource, List<Attribute> attributes, boolean workWithUserAttributes) throws WrongAttributeAssignmentException, MemberResourceMismatchException - Parameters:
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
-
fillAttributes
List<Attribute> fillAttributes(PerunSession sess, Member member, Group group, List<Attribute> attributes) throws WrongAttributeAssignmentException, MemberGroupMismatchException Batch version of fillAttribute. This method skips all attributes with not-null value.- Throws:
WrongAttributeAssignmentException
- if any of attributes values is wrong/illegalMemberGroupMismatchException
- See Also:
-
fillAttributes
List<Attribute> fillAttributes(PerunSession sess, Member member, Group group, List<Attribute> attributes, boolean workWithUserAttributes) throws WrongAttributeAssignmentException, MemberGroupMismatchException - Parameters:
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
List<Attribute> fillAttributes(PerunSession sess, Facility facility, Resource resource, User user, Member member, List<Attribute> attributes) throws WrongAttributeAssignmentException, MemberResourceMismatchException 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.- Parameters:
sess
-facility
-resource
-user
-member
-attributes
-- Returns:
- Throws:
InternalErrorException
WrongAttributeAssignmentException
MemberResourceMismatchException
-
fillAttributes
List<Attribute> fillAttributes(PerunSession sess, Facility facility, Resource resource, User user, Member member, List<Attribute> attributes, boolean returnOnlyAttributesWithChangedValue) throws WrongAttributeAssignmentException, MemberResourceMismatchException 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, List
attributes) - Parameters:
sess
-facility
-resource
-user
-member
-attributes
-returnOnlyAttributesWithChangedValue
-- Returns:
- Throws:
InternalErrorException
WrongAttributeAssignmentException
MemberResourceMismatchException
-
fillAttributes
Batch version of fillAttribute. This method skips all attributes with not-null value.- Throws:
WrongAttributeValueException
- if any of attributes values is wrong/illegal- See Also:
-
fillAttributes
List<Attribute> fillAttributes(PerunSession sess, Facility facility, User user, List<Attribute> attributes) throws WrongAttributeAssignmentException Batch version of fillAttribute. This method skips all attributes with not-null value.- Throws:
WrongAttributeValueException
- if any of attributes values is wrong/illegalWrongAttributeAssignmentException
- See Also:
-
fillAttributes
List<Attribute> fillAttributes(PerunSession sess, User user, List<Attribute> attributes) throws WrongAttributeAssignmentException Batch version of fillAttribute. This method skips all attributes with not-null value.- Throws:
WrongAttributeValueException
- if any of attributes values is wrong/illegalWrongAttributeAssignmentException
- See Also:
-
fillAttributes
List<Attribute> fillAttributes(PerunSession sess, Group group, List<Attribute> groupReqAttributes) throws WrongAttributeAssignmentException -
fillAttributes
List<Attribute> fillAttributes(PerunSession sess, Host host, List<Attribute> attributes) throws WrongAttributeAssignmentException Batch version of fillAttribute. This method skips all attributes with not-null value. -
fillAttributes
List<Attribute> fillAttributes(PerunSession sess, Resource resource, Group group, List<Attribute> attribute) throws WrongAttributeAssignmentException, GroupResourceMismatchException Batch version of fillAttribute. This method skips all attributes with not-null value. -
fillAttributes
List<Attribute> fillAttributes(PerunSession sess, Resource resource, Group group, List<Attribute> attribute, boolean workWithGroupAttributes) throws WrongAttributeAssignmentException, GroupResourceMismatchException -
fillAttributes
List<Attribute> fillAttributes(PerunSession sess, UserExtSource ues, List<Attribute> attributes) throws WrongAttributeAssignmentException Batch version of fillAttribute. This method skips all attributes with not-null value. -
forceCheckAttributeSemantics
void forceCheckAttributeSemantics(PerunSession sess, Group group, Attribute attribute) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException Check if value of this group attribute has valid semantics no matter if attribute is required or not.- Parameters:
sess
- perun sessiongroup
- group for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if attribute isn't group attributeWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
forceCheckAttributeSemantics
void forceCheckAttributeSemantics(PerunSession sess, Resource resource, Attribute attribute) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException Check if value of this resource attribute has valid semantics no matter if attribute is required or not.- Parameters:
sess
- perun sessionresource
- resource for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if attribute isn't resource attributeWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
forceCheckAttributesSemantics
void forceCheckAttributesSemantics(PerunSession sess, Facility facility, Resource resource, User user, Member member, List<Attribute> attributes) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException, MemberResourceMismatchException Check if value of attributes has valid semantics. Attributes can be from namespace: member, user, member-resource and user-facility. This method does not validate, if all of these attributes are truly required! This methods calls semantics checks on ALL of the given attributes.- Parameters:
sess
- perun sessionfacility
- facility for which you want to check validity of attributeresource
- resource for which you want to check validity of attributeuser
- user for which you want to check validity of attributemember
- member for which you want to check validity of attributeattributes
- list of attributes to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if attribute does not belong to appropriate entityWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semanticsMemberResourceMismatchException
- if member and resource are not in the same VO
-
getAllAttributesStartWithNameWithoutNullValue
List<Attribute> getAllAttributesStartWithNameWithoutNullValue(PerunSession sess, Group group, String startPartOfName) Get all non-empty attributes associated with the group starts with name startPartOfName. Get only nonvirtual attributes with notNull Value.- Parameters:
sess
- perun sessiongroup
- to get the attributes fromstartPartOfName
- attribute name start with this part- Returns:
- list of attributes which name start with startPartOfName
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAllAttributesStartWithNameWithoutNullValue
List<Attribute> getAllAttributesStartWithNameWithoutNullValue(PerunSession sess, Resource resource, String startPartOfName) Get all non-empty attributes associated with the resource starts with name startPartOfName. Get only nonvirtual attributes with notNull value.- Parameters:
sess
- perun sessionresource
- to get the attributes fromstartPartOfName
- attribute name start with this part- Returns:
- list of attributes which name start with startPartOfName
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAllDependencies
Map<AttributeDefinition,Set<AttributeDefinition>> getAllDependencies()- Returns:
- get map of all Dependencies
-
getAllNamespaces
Returns list of all possible namespaces.- Parameters:
sess
- session- Returns:
- list of namespaces
-
getAllSimilarAttributeNames
This method get all similar attr_names which start with partOfAttributeName- Parameters:
sess
-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.
- Throws:
InternalErrorException
AttributeNotExistsException
-
getAllValues
List<Object> getAllValues(PerunSession sess, AttributeDefinition attributeDefinition) throws WrongAttributeAssignmentException Get all values for specified attribute. Attribute can't be core, core-managed or virt.- Parameters:
sess
-attributeDefinition
-- Returns:
- Throws:
InternalErrorException
WrongAttributeAssignmentException
- if attribute is core, core-managed or virt
-
getAnonymizedValue
Attribute getAnonymizedValue(PerunSession sess, User user, Attribute attribute) throws WrongAttributeAssignmentException, AnonymizationNotSupportedException Gets anonymized value of the attribute.- Parameters:
sess
- perun sessionuser
- user for which you want the anonymized attribute valueattribute
- attribute to get anonymized value from- Returns:
- attribute with anonymized value
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if attribute isn't user attributeAnonymizationNotSupportedException
- if the module doesn't exist or it doesn't implement this method
-
getAppFormItemsForAppFormAndAttribute
List<String> getAppFormItemsForAppFormAndAttribute(PerunSession sess, int appFormId, AttributeDefinition attr) Returns list of app form items' shortnames for which the given attribute is a source or a destination attribute in the given application form- Parameters:
sess
- sessionappFormId
- id of application formattr
- attribute definition- Returns:
- list of shortnames
-
getAppFormsWhereAttributeRelated
Returns all application forms where the given attribute definition is a source or a destination attribute for any application from item- Parameters:
sess
- sessionattr
- attribute definition- Returns:
- list of application forms where the given attribute definition has relation to any application form item
-
getAttribute
Attribute getAttribute(PerunSession sess, Facility facility, String attributeName) throws AttributeNotExistsException, WrongAttributeAssignmentException Get particular attribute for the facility.- Parameters:
sess
-facility
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
AttributeNotExistsException
-
getAttribute
Attribute getAttribute(PerunSession sess, Vo vo, String attributeName) throws AttributeNotExistsException, WrongAttributeAssignmentException Get particular attribute for the vo.- Parameters:
sess
-vo
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
WrongAttributeAssignmentException
-
getAttribute
Attribute getAttribute(PerunSession sess, Group group, String attributeName) throws WrongAttributeAssignmentException, AttributeNotExistsException Get particular attribute for the group.- Parameters:
sess
-group
- group get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
WrongAttributeAssignmentException
-
getAttribute
Attribute getAttribute(PerunSession sess, Resource resource, String attributeName) throws WrongAttributeAssignmentException, AttributeNotExistsException Get particular attribute for the resource.- Parameters:
sess
-resource
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
AttributeNotExistsException
-
getAttribute
Attribute getAttribute(PerunSession sess, Member member, Resource resource, String attributeName) throws MemberResourceMismatchException, WrongAttributeAssignmentException, AttributeNotExistsException Get particular attribute for the member on this resource.- Parameters:
sess
-member
- to get attribute fromresource
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
MemberResourceMismatchException
AttributeNotExistsException
-
getAttribute
Attribute getAttribute(PerunSession sess, Member member, Group group, String attributeName) throws AttributeNotExistsException, WrongAttributeAssignmentException, MemberGroupMismatchException Get particular attribute for the member in this group.- Parameters:
sess
-member
- to get attribute fromgroup
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
AttributeNotExistsException
- if the attribute doesn't exists in the underlying data sourceMemberGroupMismatchException
-
getAttribute
Attribute getAttribute(PerunSession sess, Member member, String attributeName) throws WrongAttributeAssignmentException, AttributeNotExistsException Get particular attribute for the member.- Parameters:
sess
-member
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
AttributeNotExistsException
-
getAttribute
Attribute getAttribute(PerunSession sess, Facility facility, User user, String attributeName) throws WrongAttributeAssignmentException, AttributeNotExistsException Get particular attribute for the user on this facility.- Parameters:
sess
-facility
- to get attribute fromuser
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
AttributeNotExistsException
-
getAttribute
Attribute getAttribute(PerunSession sess, User user, String attributeName) throws WrongAttributeAssignmentException, AttributeNotExistsException Get particular attribute for the user.- Parameters:
sess
-user
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
AttributeNotExistsException
-
getAttribute
Attribute getAttribute(PerunSession sess, Host host, String attributeName) throws WrongAttributeAssignmentException, AttributeNotExistsException Get particular attribute for the host- Parameters:
sess
-host
- host to get attribute fromattributeName
- attribute name- Returns:
- attribute
- Throws:
InternalErrorException
WrongAttributeAssignmentException
AttributeNotExistsException
-
getAttribute
Attribute getAttribute(PerunSession sess, Resource resource, Group group, String attributeName) throws WrongAttributeAssignmentException, AttributeNotExistsException, GroupResourceMismatchException Get particular group attribute on the resource- Parameters:
sess
-resource
-group
-attributeName
-- Returns:
- attribute
- Throws:
InternalErrorException
WrongAttributeAssignmentException
AttributeNotExistsException
GroupResourceMismatchException
-
getAttribute
Attribute getAttribute(PerunSession sess, String key, String attributeName) throws AttributeNotExistsException, WrongAttributeAssignmentException Get particular entityless attribute- Parameters:
sess
- perun sessionkey
- key to get attribute forattributeName
-- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlaying data sourceWrongAttributeAssignmentException
- if attribute isn't entityless attribute
-
getAttribute
Attribute getAttribute(PerunSession sess, UserExtSource ues, String attributeName) throws WrongAttributeAssignmentException, AttributeNotExistsException Get particular attribute for the User External Source.- Parameters:
sess
-ues
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if atribute prefix does not match entity.AttributeNotExistsException
-
getAttributeById
Attribute getAttributeById(PerunSession sess, Facility facility, int id) throws WrongAttributeAssignmentException, AttributeNotExistsException Get particular attribute for the facility.- Parameters:
sess
-facility
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
AttributeNotExistsException
-
getAttributeById
Attribute getAttributeById(PerunSession sess, Vo vo, int id) throws WrongAttributeAssignmentException, AttributeNotExistsException Get particular attribute for the vo.- Parameters:
sess
-vo
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
AttributeNotExistsException
-
getAttributeById
Attribute getAttributeById(PerunSession sess, Resource resource, int id) throws WrongAttributeAssignmentException, AttributeNotExistsException Get particular attribute for the resource.- Parameters:
sess
-resource
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
AttributeNotExistsException
-
getAttributeById
Attribute getAttributeById(PerunSession sess, Member member, Resource resource, int id) throws WrongAttributeAssignmentException, AttributeNotExistsException, MemberResourceMismatchException Get particular attribute for the member on this resource.- Parameters:
sess
-member
- to get attribute fromresource
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
MemberResourceMismatchException
AttributeNotExistsException
-
getAttributeById
Attribute getAttributeById(PerunSession sess, Member member, Group group, int id) throws AttributeNotExistsException, WrongAttributeAssignmentException, MemberGroupMismatchException 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- Parameters:
sess
- perun sessionmember
- to get attribute fromgroup
- to get attribute fromid
- attribute id- Returns:
- memberGroup, member OR user attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
AttributeNotExistsException
- if the attribute doesn't exists in the underlying data sourceMemberGroupMismatchException
-
getAttributeById
Attribute getAttributeById(PerunSession sess, Member member, int id) throws WrongAttributeAssignmentException, AttributeNotExistsException Get particular attribute for the member.- Parameters:
sess
-member
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
AttributeNotExistsException
-
getAttributeById
Attribute getAttributeById(PerunSession sess, Facility facility, User user, int id) throws WrongAttributeAssignmentException, AttributeNotExistsException Get particular attribute for the user on this facility.- Parameters:
sess
-facility
- to get attribute fromuser
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
AttributeNotExistsException
-
getAttributeById
Attribute getAttributeById(PerunSession sess, User user, int id) throws WrongAttributeAssignmentException, AttributeNotExistsException Get particular attribute for the user.- Parameters:
sess
-user
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
AttributeNotExistsException
-
getAttributeById
Attribute getAttributeById(PerunSession sess, Host host, int id) throws WrongAttributeAssignmentException, AttributeNotExistsException Get particular attribute for the host- Parameters:
sess
- perun sessionhost
- to get attribute fromid
- id of attribute- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if attribute is not host attributeAttributeNotExistsException
- if attribute doesn't exist
-
getAttributeById
Attribute getAttributeById(PerunSession sess, Resource resource, Group group, int id) throws WrongAttributeAssignmentException, AttributeNotExistsException, GroupResourceMismatchException Get particular group-resource attribute- Parameters:
sess
-resource
-group
-id
-- Returns:
- Throws:
InternalErrorException
WrongAttributeAssignmentException
AttributeNotExistsException
GroupResourceMismatchException
-
getAttributeById
Attribute getAttributeById(PerunSession sess, Group group, int id) throws WrongAttributeAssignmentException, AttributeNotExistsException Get particular group attribute- Parameters:
sess
-group
-id
-- Returns:
- Throws:
InternalErrorException
WrongAttributeAssignmentException
AttributeNotExistsException
-
getAttributeById
Attribute getAttributeById(PerunSession sess, UserExtSource ues, int id) throws WrongAttributeAssignmentException, AttributeNotExistsException Get particular attribute for the user external source- Parameters:
sess
- perun sessionues
- to get attribute fromid
- id of attribute- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if attribute is not user external source attributeAttributeNotExistsException
- if attribute doesn't exist
-
getAttributeDefinition
AttributeDefinition getAttributeDefinition(PerunSession sess, String attributeName) throws AttributeNotExistsException Get attribute definition (attribute without defined value).- Parameters:
attributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
-
getAttributeDefinitionById
AttributeDefinition getAttributeDefinitionById(PerunSession sess, int id) throws AttributeNotExistsException Get attribute definition (attribute without defined value).- Parameters:
id
- attribute id- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
-
getAttributeForUpdate
Attribute getAttributeForUpdate(PerunSession sess, User user, String attributeName) throws WrongAttributeAssignmentException, AttributeNotExistsException Get particular attribute for the user for update - locking the attribute for user.- Parameters:
sess
-user
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
AttributeNotExistsException
-
getAttributeModulesDependenciesGraph
Generates graph describing dependencies of attribute modules.- Parameters:
session
- session- Returns:
- graph of dependencies
-
getAttributeModulesDependenciesGraphAsString
Generates graph describing attribute modules dependencies. Text output format can be specified byGraphTextFormat
format.- Parameters:
session
- sessionformat
- text output format- Returns:
- body of text file containing description of modules dependencies.
-
getAttributeModulesDependenciesGraphAsString
String getAttributeModulesDependenciesGraphAsString(PerunSession session, GraphTextFormat format, AttributeDefinition attributeDefinition) Generates graph describing dependencies for given AttributeDefinition. Text output format can be specified byGraphTextFormat
format.- Parameters:
session
- sessionformat
- text output formatattributeDefinition
- attribute definition which dependencies will be used- Returns:
- body of text file containing description of modules dependencies.
-
getAttributePolicyCollections
Gets attribute policy collections for an attribute definition with given id.- Parameters:
sess
- perun sessionattributeId
- id of the attribute definition- Returns:
- all policy collections of the attribute definition
- Throws:
InternalErrorException
-
getAttributeRights
Deprecated.Gets attribute rights of an attribute with id given as a parameter. If the attribute has no rights for a role, it returns empty list. That means the returned list has always 4 items for each of the roles VOADMIN, FACILITYADMIN, GROUPADMIN, SELF. Info: not return rights for role VoObserver (could be same like read rights for VoAdmin)- Parameters:
sess
- perun sessionattributeId
- id of the attribute- Returns:
- all rights of the attribute
- Throws:
InternalErrorException
-
getAttributeRules
Gets attribute rules containing policy collections and critical actions for an attribute definition with given id- Parameters:
sess
- perun sessionattributeId
- id of the attribute definition- Returns:
- attribute rules of the attribute definition
-
getAttributes
Get all non-empty attributes associated with the facility.- Parameters:
sess
- perun sessionfacility
- facility to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all attributes associated with the facility which have name in list attrNames (empty too). Virtual attribute too.- Parameters:
sess
- perun sessionfacility
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all non-empty attributes associated with the vo.- Parameters:
sess
- perun sessionvo
- vo to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all non-empty attributes associated with the group.- Parameters:
sess
- perun sessiongroup
- group to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all non-empty attributes associated with the resource.- Parameters:
sess
- perun sessionresource
- resource to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
List<Attribute> getAttributes(PerunSession sess, Member member, Resource resource) throws MemberResourceMismatchException Get all non-empty attributes associated with the member on the resource.- Parameters:
sess
- perun sessionmember
- to get the attributes fromresource
- to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionMemberResourceMismatchException
-
getAttributes
List<Attribute> getAttributes(PerunSession sess, Member member, Resource resource, boolean workWithUserAttributes) throws MemberResourceMismatchException 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.- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionMemberResourceMismatchException
- !!WARNING THIS IS VERY TIME-CONSUMING METHOD. DON'T USE IT IN BATCH!!
-
getAttributes
List<Attribute> getAttributes(PerunSession sess, Member member, Resource resource, List<String> attrNames, boolean workWithUserAttributes) throws MemberResourceMismatchException 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.- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionMemberResourceMismatchException
- !!WARNING THIS IS VERY TIME-CONSUMING METHOD. DON'T USE IT IN BATCH!!
-
getAttributes
List<Attribute> getAttributes(PerunSession sess, Group group, Member member, Resource resource, List<String> attrNames, boolean workWithUserAttributes) throws MemberResourceMismatchException, GroupResourceMismatchException, MemberGroupMismatchException 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.- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionMemberResourceMismatchException
GroupResourceMismatchException
- !!WARNING THIS IS VERY TIME-CONSUMING METHOD. DON'T USE IT IN BATCH!!MemberGroupMismatchException
-
getAttributes
List<Attribute> getAttributes(PerunSession sess, Member member, Group group) throws MemberGroupMismatchException Get all non-empty attributes associated with the member in the group.- Parameters:
sess
- perun sessionmember
- to get the attributes fromgroup
- group to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionMemberGroupMismatchException
-
getAttributes
List<Attribute> getAttributes(PerunSession sess, Member member, Group group, List<String> attrNames) throws MemberGroupMismatchException Get all attributes (empty and virtual too) associated with the member in the group which have name in list attrNames.- Parameters:
sess
- perun sessionmember
- to get the attributes fromgroup
- group to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionMemberGroupMismatchException
-
getAttributes
List<Attribute> getAttributes(PerunSession sess, Member member, Group group, boolean workWithUserAttributes) throws MemberGroupMismatchException Get all attributes associated with the member in the group and if workWithUserAttributes is true, gets also all non-empty user and member attributes.- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionMemberGroupMismatchException
-
getAttributes
List<Attribute> getAttributes(PerunSession sess, Member member, Group group, List<String> attrNames, boolean workWithUserAttributes) throws MemberGroupMismatchException 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).- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionMemberGroupMismatchException
-
getAttributes
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.- Parameters:
sess
- perun sessionmember
- to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all non-empty attributes associated with the member.- Parameters:
sess
- perun sessionmember
- to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
List<Attribute> getAttributes(PerunSession sess, Resource resource, Group group, Member member, List<String> attrNames) throws GroupResourceMismatchException, MemberResourceMismatchException, MemberGroupMismatchException 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-facilityReturn all attributes even if they are empty or virtual.
PRIVILEGE: Get only those attributes the principal has access to.
- Parameters:
sess
- perun sessiongroup
-resource
-attrNames
- list of attributes' names- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionGroupResourceMismatchException
- if resource and group are not from the same voMemberResourceMismatchException
- if member and resource are not from the same voMemberGroupMismatchException
-
getAttributes
List<Attribute> 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.If workWithUserAttribute is true, return also all user attributes in list of attrNames (with virtual attributes too).
- 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
- Throws:
InternalErrorException
-
getAttributes
Get all attributes associated with the member which have name in list attrNames (empty and virtual too).- Parameters:
sess
- perun sessionmember
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all attributes associated with the group which have name in list attrNames (empty too). Virtual attribute too.- Parameters:
sess
- perun sessiongroup
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all attributes associated with the resource which have name in list attrNames (empty too). Virtual attribute too.- Parameters:
sess
- perun sessionresource
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all attributes associated with the vo which have name in list attrNames (empty and virtual too).- Parameters:
sess
- perun sessionvo
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wraped in InternalErrorException
-
getAttributes
Get all attributes associated with the user which have name in list attrNames (empty and virtual too).- Parameters:
sess
- perun sessionuser
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all attributes associated with the UserExtSource which have name in list attrNames (empty and virtual too).- Parameters:
sess
- perun sessionues
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wraped in InternalErrorException
-
getAttributes
Get all non-empty attributes associated with the user on the facility.- Parameters:
sess
- perun sessionfacility
- to get the attributes fromuser
- to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all non-empty attributes associated with the user.- Parameters:
sess
- perun sessionuser
- to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all non-empty attributes associated with the host- Parameters:
sess
- perun sessionhost
- host to get attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
List<Attribute> getAttributes(PerunSession sess, Host host, List<String> attrNames) throws InternalErrorException Get all attributes associated with the host which have name in list attrNames (empty and virtual too). Empty list attrNames will return no attributes.- Parameters:
sess
- perun sessionhost
- host to get attributes forattrNames
- list of attributes' names- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all non-empty attributes associated with the group on resource.- Parameters:
sess
-resource
-group
-- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
List<Attribute> getAttributes(PerunSession sess, Resource resource, Group group, boolean workWithGroupAttributes) throws GroupResourceMismatchException - Throws:
GroupResourceMismatchException
-
getAttributes
List<Attribute> getAttributes(PerunSession sess, Resource resource, Group group, List<String> attrNames, boolean workWithGroupAttributes) throws GroupResourceMismatchException 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.- Parameters:
sess
-resource
- the resourcegroup
- the groupworkWithGroupAttributes
- if true, get also group attributesattrNames
- list of selected attribtues- Returns:
- list of selected attributes associated with the group on resource
- Throws:
InternalErrorException
GroupResourceMismatchException
-
getAttributes
List<Attribute> getAttributes(PerunSession sess, Facility facility, Resource resource, User user, Member member) throws MemberResourceMismatchException Get all non-empty member, user, member-resource and user-facility attributes.- Parameters:
sess
-facility
-resource
-user
-member
-- Returns:
- Throws:
InternalErrorException
MemberResourceMismatchException
-
getAttributes
Get all entityless attributes with subject equaled String key- Parameters:
sess
-key
-- Returns:
- Throws:
InternalErrorException
-
getAttributes
Get all non-empty attributes associated with the UserExtSource.- Parameters:
sess
- perun sessionues
- to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributesByAttributeDefinition
List<Attribute> getAttributesByAttributeDefinition(PerunSession sess, AttributeDefinition attributeDefinition) throws WrongAttributeAssignmentException Returns all attributes with not-null value which fits the attributeDefinition. Can't process core or virtual attributes.- Parameters:
sess
-attributeDefinition
- can't be core or virtual attribute- Returns:
- list of attributes
- Throws:
InternalErrorException
WrongAttributeAssignmentException
-
getAttributesDefinition
Get all attributes definition (attribute without defined value).- Returns:
- List od attributes definitions
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributesDefinition
List<AttributeDefinition> getAttributesDefinition(PerunSession sess, List<String> listOfAttributesNames) throws AttributeNotExistsException From listOfAttributesNames get list of attributeDefinitions- Parameters:
sess
-listOfAttributesNames
-- Returns:
- list of AttributeDefinitions
- Throws:
InternalErrorException
AttributeNotExistsException
-
getAttributesDefinitionByNamespace
Get attributes definition (attribute without defined value) with specified namespace.- Parameters:
namespace
- get only attributes with this namespace- Returns:
- List of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributesDefinitionWithRights
List<AttributeDefinition> 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). 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"- Parameters:
sess
-entities
- list of perunBeans (member, user...)- Returns:
- list of AttributeDefinitions with rights (writable will be filled correctly by user in session)
- Throws:
InternalErrorException
-
getCriticalAttributeActions
Returns critical actions on given attribute.- Parameters:
sess
- sessionattrId
- attribute definition id- Returns:
- list of critical actions
-
getEntitylessAttributeForUpdate
Attribute getEntitylessAttributeForUpdate(PerunSession sess, String key, String attrName) throws AttributeNotExistsException 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.
- Parameters:
sess
-attrName
-key
-- Returns:
- attr_value in string
- Throws:
InternalErrorException
- if runtime error exception has been thrownAttributeNotExistsException
- throw exception if attribute with value not exists in DB
-
getEntitylessAttributes
Get all entityless attributes with attributeName- Parameters:
sess
- perun sessionattrName
-- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getEntitylessAttributesWithKeys
Map<String,Attribute> getEntitylessAttributesWithKeys(PerunSession sess, String attrName) throws AttributeNotExistsException, WrongAttributeAssignmentException Get entityless attributes mapped by their keys.- 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
Map<String,Attribute> getEntitylessAttributesWithKeys(PerunSession sess, String attrName, List<String> keys) throws AttributeNotExistsException, WrongAttributeAssignmentException Get entityless attributes mapped by their keys. Returns only attributes for specified keys.- 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
Returns list of Keys which fits the attributeDefinition.- Parameters:
sess
-attributeDefinition
-- Returns:
- Throws:
InternalErrorException
-
getEntitylessStringAttributeMapping
Map<String,String> getEntitylessStringAttributeMapping(PerunSession sess, String attributeName) throws WrongAttributeAssignmentException, AttributeNotExistsException Gets map from keys to string values for an entityless attribute.- Parameters:
sess
- sessionattributeName
- full attribute name- Returns:
- unordered hashmap
- Throws:
WrongAttributeAssignmentException
AttributeNotExistsException
-
getFriendlyNameFromAttributeName
Gets the friendly name from the attribute name.- Parameters:
attributeName
-- Returns:
- the friendly name from the attribute name
-
getIdpAttributeDefinitions
Returns list of definitions of IdP attributes that are filled to fedInfo- Parameters:
sess
- session- Returns:
- list of attribute definitions
-
getLogins
Get all non-empty attributes with user's logins.- Parameters:
sess
-user
-- Returns:
- list of attributes with login
- Throws:
InternalErrorException
-
getNamespaceFromAttributeName
Gets the namespace from the attribute name.- Parameters:
attributeName
-- Returns:
- the namespace from the attribute name
-
getPerunBeanIdsForUniqueAttributeValue
Set<Pair<Integer,Integer>> getPerunBeanIdsForUniqueAttributeValue(PerunSession sess, Attribute attribute) Finds ids of PerunBeans that have the attribute's value for the attribute. The attribute must be marked as unique.This method is intended for finding whether a unique value is already assigned, and if yes, then whether it is the same object which is being updated or some other object. This is typically needed in checkAttributeSemantics() method of attribute modules.
The return type is a set of pairs of ids. It is a set because for collection types (ArrayList and LinkedHashMap) each of the entries in the collection may be assigned to a different object. The set contains pairs, because some attribute types are attached to a pair of PerunBeans (e.g. group_resource) and some are attached to single beans (e.g. group).
If the attribute is attached to a pair of beans, the returned Pairs contain ids of the objects in the order of beans as listed in the attribute namespace, e.g. for group_resource attribute the left part of the pair contains group id, and the right part contains resource id. If the attribute is attached to a single bean, the left part of the pair contains the id, and the right part contains zero.
For simple value types (String, Integer, Boolean), this methods returns either an empty set (if the simple value is not assigned yet), or a set containing a single Pair. For collection values types (ArrayList, LinkedHashMap), this method returns an empty set, or a set with one or more pairs.
- Parameters:
sess
- sessionattribute
- attribute with a filled value that will be checked for uniqueness- Returns:
- a Set of Pairs with ids of PerunBeans that have the attribute value
-
getRequiredAttributes
Get facility attributes which are required by all services which are connected to this facility.- 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.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
Get resource attributes which are required by selected services.- Parameters:
sess
- perun sessionresource
- you get attributes for this resourceservices
-- Returns:
- list of resource attributes which are required by selected services.
- Throws:
InternalErrorException
-
getRequiredAttributes
Get resource attributes which are required by services which is related to this resource.- 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.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, Member member, Resource resource) throws MemberResourceMismatchException Get member-resource attributes which are required by services which are relater to this member-resource.- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionMemberResourceMismatchException
-
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, Member member, Resource resource, boolean workWithUserAttributes) throws MemberResourceMismatchException 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)- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionMemberResourceMismatchException
- !!WARNING THIS IS VERY TIME-CONSUMING METHOD. DON'T USE IT IN BATCH!!
-
getRequiredAttributes
Get user-facility attributes which are required by services which are related to this user-facility.- 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.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
Get user attributes which are required by services which are relater to this user.- Parameters:
sess
- perun sessionuser
-- Returns:
- list of user's attributes which are required by services which are related to this user
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
List<Attribute> 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 attributes- 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
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, Member member, Group group, boolean workWithUserAttributes) throws MemberGroupMismatchException 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.- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionMemberGroupMismatchException
-
getRequiredAttributes
Get facility attributes which are required by the service.- Parameters:
sess
- perun sessionfacility
- you get attributes for this facilityservice
- attribute required by this service you'll get- Returns:
- list of facility attributes which are required by the service
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
Get vo attributes which are required by the service.- Parameters:
sess
- perun sessionvo
- you get attributes for this voservice
- attribute required by this service you'll get- Returns:
- list of vo attributes which are required by the service
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
Get resource attributes which are required by the service.- Parameters:
sess
- perun sessionresource
- resource for which you want to get the attributesservice
- attribute required by this service you'll get- Returns:
- list of resource attributes which are required by the service
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Member member, Resource resource) throws MemberResourceMismatchException Get member-resource attributes which are required by the service.- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionMemberResourceMismatchException
-
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Member member, Resource resource, boolean workWithUserAttributes) throws MemberResourceMismatchException - Throws:
MemberResourceMismatchException
-
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Resource resource, Group group, Member member, boolean workWithUserAttributes) throws MemberResourceMismatchException, GroupResourceMismatchException Get member, member-resource and member-group attributes which are required by the service. if workWithUserAttributes == TRUE return also user and user-facility attributes- Parameters:
sess
- perun sessionresource
- 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 groupservice
- attribute required by this service you'll getworkWithUserAttributes
- if TRUE also user and user-facility attributes- Returns:
- list of attributes which are required by the service.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionMemberResourceMismatchException
GroupResourceMismatchException
-
getRequiredAttributes
HashMap<Member,List<Attribute>> getRequiredAttributes(PerunSession sess, Service service, Facility facility, Resource resource, List<Member> members, boolean workWithUserAttributes) throws MemberResourceMismatchException 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)!!!- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionMemberResourceMismatchException
- if methods checkMemberIsFromTheSameVoLikeResource finds that user is not from same vo like resource
-
getRequiredAttributes
HashMap<Member,List<Attribute>> 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. !!! Method checks if members list is not empty (returns empty HashMap)!!!- 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
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
HashMap<Member,List<Attribute>> 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. !!! Method checks if members list is not empty (returns empty HashMap)!!!- Parameters:
sess
- perun sessionservice
- attribute required by this serviceresource
- resource only to get allowed membersmembers
- you get attributes for this list of members- Returns:
- map of member objects and his list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
HashMap<User,List<Attribute>> 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. !!! Method checks if members list is not empty (returns empty HashMap)!!!- 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
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
HashMap<User,List<Attribute>> getRequiredAttributes(PerunSession sess, Service service, List<User> users) 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)!!!- 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
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Member member, Group group) throws MemberGroupMismatchException Get member-group attributes which are required by the service.- Parameters:
sess
- perun sessionmember
- you get attributes for this member and the groupgroup
- you get attributes for this group in which member is associatedservice
- attribute required by this service you'll get- Returns:
- list of attributes which are required by the service.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionMemberGroupMismatchException
-
getRequiredAttributes
Map<Member,List<Attribute>> getRequiredAttributes(PerunSession sess, Service service, List<Member> members, Group group) throws MemberGroupMismatchException Get member-group attributes which are required by the service, for the given members and the given group.- 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
List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Member member, Group group, boolean workWithUserAttributes) throws MemberGroupMismatchException - Throws:
MemberGroupMismatchException
-
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Facility facility, Resource resource, User user, Member member) throws MemberResourceMismatchException Get memner, user, member-resource, user-facility attributes which are required by the service.- Parameters:
sess
-service
-facility
-resource
-user
-member
-- Returns:
- Throws:
InternalErrorException
MemberResourceMismatchException
-
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, List<Service> services, Facility facility, Resource resource, User user, Member member) throws MemberResourceMismatchException Get member, user, member-resource, user-facility attributes which are required by the services. The same attributes are returned only once.- 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
List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Resource resource, Group group, boolean withGroupAttributes) throws GroupResourceMismatchException Get group-resource attributes which are required by the service.- Parameters:
sess
- perun sessionresource
-group
-service
- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionGroupResourceMismatchException
-
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, List<Service> services, Resource resource, Group group, boolean withGroupAttributes) throws GroupResourceMismatchException Get group-resource attributes which are required by the services.- 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
List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Resource resource, Group group) throws GroupResourceMismatchException - Throws:
GroupResourceMismatchException
-
getRequiredAttributes
-
getRequiredAttributes
Get host attributes which are required by service- Parameters:
sess
-service
-host
-- Returns:
- Throws:
InternalErrorException
-
getRequiredAttributes
Get member attributes which are required by the service.- Parameters:
sess
- perun sessionmember
- you get attributes for this memberservice
- attribute required by this service you'll get- Returns:
- list of attributes which are required by the service.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
Get user attributes which are required by the service.- Parameters:
sess
- perun sessionuser
- you get attributes for this userservice
- attribute required by this service you'll get- Returns:
- list of attributes which are required by the service.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Facility facility, User user) Get user-facility attributes which are required by the service.- Parameters:
sess
- perun sessionuser
- you get attributes for this user and the facilityfacility
- you get attributes for this facility and the userservice
- attribute required by this service you'll get- Returns:
- list of attributes which are required by the service.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributesDefinition
Get all attributes which are required by service. Required attributes are requisite for Service to run.- Parameters:
sess
- sessservice
- service from which the attributes will be listed- Returns:
- All attributes which are required by service.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributesForGroups
Map<Group,List<Attribute>> getRequiredAttributesForGroups(PerunSession sess, Service service, List<Group> groups) Get group attributes which are required by the given service for given groups.- Parameters:
sess
- sessionservice
- service for which are taken the required attributesgroups
- groups- Returns:
- attributes mapped by their groups
-
getResourceRequiredAttributes
List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Facility facility) Get facility attributes which are required by services. Services are known from the resource.- 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
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getResourceRequiredAttributes
List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Resource resource) Get resource attributes which are required by services. Services are known from the resourceToGetServicesFrom.- 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.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getResourceRequiredAttributes
List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Resource resource) throws MemberResourceMismatchException Get member-resource attributes which are required by services. Services are known from the resourceToGetServicesFrom.- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionMemberResourceMismatchException
-
getResourceRequiredAttributes
List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Resource resource, boolean workWithUserAttributes) throws MemberResourceMismatchException 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.- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionMemberResourceMismatchException
- !!WARNING THIS IS VERY TIME-CONSUMING METHOD. DON'T USE IT IN BATCH!!
-
getResourceRequiredAttributes
List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Group group) throws MemberGroupMismatchException Get member-group attributes which are required by services. Services are known from the resourceToGetServicesFrom.- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionMemberGroupMismatchException
-
getResourceRequiredAttributes
List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Group group, boolean workWithUserAttributes) throws MemberGroupMismatchException Get member-group attributes which are required by services if workWithUserAttributes is true also user and member attributes. Services are known from the resourceToGetServicesFrom.- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionMemberGroupMismatchException
-
getResourceRequiredAttributes
List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Facility facility, Resource resource, User user, Member member) throws MemberResourceMismatchException Get member, user, member-resource and user-facility attributes which are required by services which are defined on "resourceToGetServicesFrom" resource.- Parameters:
sess
- perun sessionresourceToGetServicesFrom
- getRequired attributes from services which are assigned on this resourcefacility
-resource
- you get attributes for this resource and the memberuser
-member
- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionMemberResourceMismatchException
-
getResourceRequiredAttributes
List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member) Get member attributes which are required by services defined on specified resource- Parameters:
sess
- perun sessionmember
- you get attributes for this memberresourceToGetServicesFrom
- getRequired attributes from services which are assigned on this resource- Returns:
- list of member attributes which are required by services defined on specified resource
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getResourceRequiredAttributes
List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Facility facility, User user) Get user-facility attributes which are required by services. Services are known from the resource.- 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
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getResourceRequiredAttributes
List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, User user) Get user attributes which are required by services. Services are known from the resource.- 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
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getResourceRequiredAttributes
List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Resource resource, Group group) Get the group-resource attributes which are required by services. Services are known from the resource.- Parameters:
sess
-resourceToGetServicesFrom
- resource from which the services are takenresource
-group
-- Returns:
- Throws:
InternalErrorException
GroupResourceMismatchException
-
getResourceRequiredAttributes
List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Resource resource, Group group, boolean workWithGroupAttributes) throws GroupResourceMismatchException - Throws:
GroupResourceMismatchException
-
getResourceRequiredAttributes
List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Host host) Get the host attributes which are required by services. Services are known from the resource.- Parameters:
sess
-resourceToGetServicesFrom
-host
-- Returns:
- Throws:
InternalErrorException
-
getResourceRequiredAttributes
List<Attribute> getResourceRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Group group) -
getResourceRequiredAttributesDefinition
List<AttributeDefinition> getResourceRequiredAttributesDefinition(PerunSession sess, Resource resource) Get attributes definions required by all services assigned on the resource.- Parameters:
sess
- perun sessionresource
-- Returns:
- attributes definions required by all services assigned on the resource.
- Throws:
InternalErrorException
-
getRichAttributesWithHoldersForAttributeDefinition
List<RichAttribute> getRichAttributesWithHoldersForAttributeDefinition(PerunSession sess, AttributeDefinition attrDef, RichAttribute aidingAttr) throws AttributeNotExistsException, VoNotExistsException, UserNotExistsException, WrongAttributeAssignmentException, GroupResourceMismatchException, MemberResourceMismatchException, MemberGroupMismatchException Method get attribute Definition attrDef and aidingAttr which only holds one or two useful objects in holders. Thanks useful objects, method find all possibly richAttributes which can be get on specific attrDef with all existing combinations of needed objects.Example: I am looking for Member attrDef and I have primaryHolder: User. So i will find all members of this user and return all richAttributes of combination attribute + specific member in primaryHolder.
- Parameters:
sess
-attrDef
-aidingAttr
-- Returns:
- Throws:
InternalErrorException
AttributeNotExistsException
VoNotExistsException
UserNotExistsException
WrongAttributeAssignmentException
MemberResourceMismatchException
GroupResourceMismatchException
MemberGroupMismatchException
-
getUserFacilityAttributesForAnyUser
Get All user_facility attributes for any existing user- Parameters:
sess
-facility
-- Returns:
- list of user facility attributes
- Throws:
InternalErrorException
-
getUserIdsByLogin
Gets IDs of users who use the given login in any namespace.- Parameters:
sess
- perun sessionlogin
- login- Returns:
- list of user IDs
-
getUserVirtualAttributeModule
UserVirtualAttributesModuleImplApi getUserVirtualAttributeModule(PerunSession sess, AttributeDefinition attribute) Get user virtual attribute module by the attribute.- Parameters:
sess
-attribute
- attribute for which you get the module- Returns:
- instance of user attribute module
- Throws:
InternalErrorException
WrongModuleTypeException
ModuleNotExistsException
-
getVirtualAttributes
Get all virtual attributes associated with the member-resource attributes.- Parameters:
sess
- perun sessionmember
- to get the attributes fromresource
- to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getVirtualAttributes
Get all virtual attributes associated with the user on the facility.- Parameters:
sess
- perun sessionfacility
- to get the attributes fromuser
- to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getVirtualAttributes
Get all virtual attributes associated with the user.- Parameters:
sess
- perun sessionuser
- to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
isAttributeActionCritical
boolean isAttributeActionCritical(PerunSession sess, AttributeDefinition attr, AttributeAction action) Checks if the action is critical on given attribute.- Parameters:
sess
- sessionattr
- attribute definitionaction
- critical action- Returns:
- true if action is critical, false otherwise
-
isAttributeActionGloballyCritical
boolean isAttributeActionGloballyCritical(PerunSession sess, AttributeDefinition attr, AttributeAction action) Checks if the action is critical on given attribute for all objects.- Parameters:
sess
- sessionattr
- attribute definitionaction
- critical action- Returns:
- true if action is globally critical, false otherwise
-
isCoreAttribute
Determine if attribute is core attribute.- Parameters:
sess
-attribute
-- Returns:
- true if attribute is core attribute
-
isCoreManagedAttribute
Determine if attribute is core-managed attribute.- Parameters:
sess
-attribute
-- Returns:
- true if attribute is core-managed
-
isDefAttribute
Determine if attribute is defined (def) attribute.- Parameters:
sess
-attribute
-- Returns:
- true if attribute is defined attribute false otherwise
-
isFromNamespace
Determine if attribute is from specified namespace.- Parameters:
sess
-attribute
-namespace
-- Returns:
- true if the attribute is from specified namespace false otherwise
-
isLoginAlreadyUsed
Check if the login is already in use for some namespace or globally- 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
-
isOptAttribute
Determine if attribute is optional (opt) attribute.- Parameters:
sess
-attribute
-- Returns:
- true if attribute is optional attribute false otherwise
-
isTrulyRequiredAttribute
boolean isTrulyRequiredAttribute(PerunSession sess, Facility facility, AttributeDefinition attributeDefinition) throws WrongAttributeAssignmentException Check if this the attribute is truly required for the facility right now. Truly means that the nothing (member, resource...) is invalid.- Parameters:
sess
-facility
-attributeDefinition
-- Returns:
- Throws:
InternalErrorException
WrongAttributeAssignmentException
-
isTrulyRequiredAttribute
boolean isTrulyRequiredAttribute(PerunSession sess, Resource resource, AttributeDefinition attributeDefinition) throws WrongAttributeAssignmentException Check if this the attribute is truly required for the resource right now. Truly means that the nothing (member, resource...) is invalid.- Parameters:
sess
-resource
-attributeDefinition
-- Returns:
- Throws:
InternalErrorException
WrongAttributeAssignmentException
-
isTrulyRequiredAttribute
boolean isTrulyRequiredAttribute(PerunSession sess, Member member, AttributeDefinition attributeDefinition) throws WrongAttributeAssignmentException Check if this the attribute is truly required for the member right now. Truly means that the nothing (member, resource...) is invalid.- Parameters:
sess
-member
-attributeDefinition
-- Returns:
- Throws:
InternalErrorException
WrongAttributeAssignmentException
-
isTrulyRequiredAttribute
boolean isTrulyRequiredAttribute(PerunSession sess, User user, AttributeDefinition attributeDefinition) throws WrongAttributeAssignmentException Check if this the attribute is truly required for the user right now. Truly means that the nothing (member, resource...) is invalid.- Parameters:
sess
-user
-attributeDefinition
-- Returns:
- Throws:
InternalErrorException
WrongAttributeAssignmentException
-
isTrulyRequiredAttribute
boolean isTrulyRequiredAttribute(PerunSession sess, Facility facility, User user, AttributeDefinition attributeDefinition) throws WrongAttributeAssignmentException Check if this the attribute is truly required for the user and the facility right now. Truly means that the nothing (member, resource...) is invalid.- Parameters:
sess
-facility
-user
-attributeDefinition
-- Returns:
- Throws:
InternalErrorException
WrongAttributeAssignmentException
-
isTrulyRequiredAttribute
boolean isTrulyRequiredAttribute(PerunSession sess, Member member, Resource resource, AttributeDefinition attributeDefinition) throws WrongAttributeAssignmentException, MemberResourceMismatchException Check if this the attribute is truly required for the member and the resource right now. Truly means that the nothing (member, resource...) is invalid.- Parameters:
sess
-member
-resource
-attributeDefinition
-- Returns:
- Throws:
InternalErrorException
WrongAttributeAssignmentException
MemberResourceMismatchException
-
isTrulyRequiredAttribute
boolean isTrulyRequiredAttribute(PerunSession sess, Member member, Group group, AttributeDefinition attributeDefinition) throws WrongAttributeAssignmentException, MemberGroupMismatchException Check if this the attribute is truly required for the member and the group right now. Truly means that the nothing (member, group...) is invalid.- Parameters:
sess
-member
-group
-attributeDefinition
-- Returns:
- Throws:
InternalErrorException
WrongAttributeAssignmentException
MemberGroupMismatchException
-
isVirtAttribute
Determine if attribute is virtual (virt) attribute.- Parameters:
sess
-attribute
-- Returns:
- true if attribute is virtual attribute false otherwise
-
mergeAttributeValue
Attribute mergeAttributeValue(PerunSession sess, User user, Attribute attribute) throws WrongAttributeValueException, WrongReferenceAttributeValueException, WrongAttributeAssignmentException Merges attribute value if the attribute type is list or map. In other cases it only stores new value. If the type is list, new values are added to the current stored list. It the type is map, new values are added and existing are overwritten with new values, but only if there is some change.- Parameters:
sess
-user
-attribute
-