Package cz.metacentrum.perun.core.impl
Class AttributesManagerImpl
java.lang.Object
cz.metacentrum.perun.core.impl.AttributesManagerImpl
- All Implemented Interfaces:
AttributesManagerImplApi
AttributesManager implementation.
- Author:
- Slavek Licehammer glory@ics.muni.cz
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
AttributesManagerImpl.AttributeRowMapper<T extends PerunBean,
V extends PerunBean> protected static class
protected static class
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final RowMapper<AttributeDefinition>
protected static final String
List of allowed values for attribute type.static final char
static final char
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
attributeExists
(PerunSession sess, AttributeDefinition attribute) Check if attribute exists in underlaying data source.void
changedAttributeHook
(PerunSession sess, Facility facility, Attribute attribute) If you need to do some further work with other modules, this method do thatvoid
changedAttributeHook
(PerunSession sess, Facility facility, User user, Attribute attribute) If you need to do some further work with other modules, this method do thatvoid
changedAttributeHook
(PerunSession sess, Group group, Attribute attribute) If you need to do some further work with other modules, this method do thatvoid
changedAttributeHook
(PerunSession sess, Host host, Attribute attribute) If you need to do some further work with other modules, this method do thatvoid
changedAttributeHook
(PerunSession sess, Member member, Attribute attribute) If you need to do some further work with other modules, this method do thatvoid
changedAttributeHook
(PerunSession sess, Member member, Group group, Attribute attribute) If you need to do some further work with other modules, this method do thatvoid
changedAttributeHook
(PerunSession sess, Member member, Resource resource, Attribute attribute) If you need to do some further work with other modules, this method do thatvoid
changedAttributeHook
(PerunSession sess, Resource resource, Attribute attribute) If you need to do some further work with other modules, this method do thatvoid
changedAttributeHook
(PerunSession sess, Resource resource, Group group, Attribute attribute) If you need to do some further work with other modules, this method do thatvoid
changedAttributeHook
(PerunSession sess, UserExtSource ues, Attribute attribute) If you need to do some further work with other modules, this method do thatvoid
changedAttributeHook
(PerunSession sess, User user, Attribute attribute) If you need to do some further work with other modules, this method do thatvoid
changedAttributeHook
(PerunSession sess, Vo vo, Attribute attribute) If you need to do some further work with other modules, this method do thatvoid
changedAttributeHook
(PerunSession sess, String key, Attribute attribute) If you need to do some further work with other modules, this method do thatvoid
checkActionTypeExists
(PerunSession sess, ActionType actionType) Deprecated.void
checkAttributeExists
(PerunSession sess, AttributeDefinition attribute) Check if attribute exists in underlaying data source.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 value of this host attribute has valid semantics.void
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 semantics.void
checkAttributeSemantics
(PerunSession sess, UserExtSource ues, Attribute attribute) Check if value of this user external 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 value of this entityless attribute has valid semantics.void
checkAttributesExists
(PerunSession sess, List<? extends AttributeDefinition> attributes) Batch version of checkAttributeExistsvoid
checkAttributesExists
(PerunSession sess, List<? extends AttributeDefinition> attributes, String expectedNamespace) void
checkAttributesSemantics
(PerunSession sess, Resource resource, List<Attribute> attributes) void
checkAttributeSyntax
(PerunSession sess, Facility facility, Attribute attribute) Check if value of this facility attribute has valid syntax.void
checkAttributeSyntax
(PerunSession sess, Facility facility, User user, Attribute attribute) Check if value of this user-facility attribute has valid syntax.void
checkAttributeSyntax
(PerunSession sess, Group group, Attribute attribute) Check if value of this group attribute has valid syntax.void
checkAttributeSyntax
(PerunSession sess, Host host, Attribute attribute) Check if 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 syntax.void
checkAttributeSyntax
(PerunSession sess, Resource resource, List<Attribute> attributes) void
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 value of this entityless attribute has valid syntax.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
convertAttributeValuesToNonunique
(PerunSession session, AttributeDefinition attrDef) Deletes all values of the attribute from table _attr_u_values which has unique constraint.void
convertAttributeValuesToUnique
(PerunSession session, AttributeDefinition attrDef) Copies all values of the attribute to table _attr_u_values which has unique constraint.createAttribute
(PerunSession sess, AttributeDefinition attribute) Creates an attribute, the attribute is stored into the appropriate DB table according to the namespace.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 attribute) Deletes the attribute.static String
escapeListAttributeValue
(String value) Escapes LIST_DELIMITER from the value.static String
escapeMapAttributeValue
(String value) Escapes LIST_DELIMITER and KEY_VALUE_DELIMITER from the value.escapeQueryParameters
(String value) Escapes QUERY PARAMETER VALUES in URL value.fillAttribute
(PerunSession sess, Facility facility, User user, Attribute attribute) This method try to fill value of the user-facility attribute.fillAttribute
(PerunSession sess, Group group, Attribute attribute) fillAttribute
(PerunSession sess, Host host, Attribute attribute) 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) fillAttribute
(PerunSession sess, UserExtSource ues, Attribute attribute) This method try 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.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.getAllGroupResourceValues
(PerunSession sess, AttributeDefinition attributeDefinition) Get all values for specified group-resource attribute.getAllGroupValues
(PerunSession sess, AttributeDefinition attributeDefinition) Get all values for specified group attribute.getAllNamespaces
(PerunSession sess) Returns list of all possible namespaces.getAllResourceValues
(PerunSession sess, AttributeDefinition attributeDefinition) Get all values for specified resource attribute.getAllSimilarAttributeNames
(PerunSession sess, String startingPartOfAttributeName) This method get all similar attr_names which start with partOfAttributeNamegetAllUserFacilityRichAttributes
(PerunSession sess, User user) Get all non-empty attributes associated with the user on the all facilities.getAllUserValues
(PerunSession sess, AttributeDefinition attributeDefinition) Get all values for specified user 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) getAttribute
(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) getAttribute
(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) getAttributeById
(PerunSession sess, Host host, int id) getAttributeById
(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) getAttributeById
(PerunSession sess, UserExtSource ues, int id) Get particular attribute for the user external source.getAttributeById
(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 attributes definition (attribute without defined value).getAttributeDefinitionById
(PerunSession sess, int id) Get attibute definition (attribute without defined value).getAttributePolicyCollections
(PerunSession sess, int attributeId) Gets attribute policy collections for an attribute definition with given id.getAttributeRights
(PerunSession sess, int attributeId) Deprecated.getAttributes
(PerunSession sess, Facility facility) Get all non-empty attributes associated with the facility.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, List<String> attrNames) Get all attributes associated with the group which have name in list attrNames (empty too).getAttributes
(PerunSession sess, Host host) getAttributes
(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, Group group) Get all non-empty, non-virtual attributes associated with the member in the group.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, Resource resource) Get all non-empty attributes associated with the member on the resource.getAttributes
(PerunSession sess, Member member, Resource resource, List<String> attrNames) Get all attributes (empty and virtual too) associated with the member on the resource which have name in list attrNames.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, Resource resource) Get all non-empty attributes associated with the resource.getAttributes
(PerunSession sess, Resource resource, Group group) getAttributes
(PerunSession sess, Resource resource, Group group, List<String> attrNames) Get all attributes (empty and virtual too) associated with the group on the resource which have name in list attrNames.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, Facility facility, List<String> attrNames) Get all attributes (empty and virtual too) associated with the user on the facility which have name in list attrNames.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 entiteless attributes with subject equaled String keygetAttributesByAttributeDefinition
(PerunSession sess, AttributeDefinition attributeDefinition) Returns all attributes with not-null value which fits the attributeDefinition.Get attributes definition (attribute without defined value).getAttributesDefinitionByNamespace
(PerunSession sess, String namespace) Get attributes definition (attribute without defined value) with specified namespace.getAttributesModule
(PerunSession sess, AttributeDefinition attribute) Get the attribute module for the attributegetCriticalAttributeActions
(PerunSession sess, int attrId) Returns critical actions on given attribute.getEntitylessAttributes
(PerunSession sess, String attrName) Get all entityless attributes with attributeNamegetEntitylessAttrValueForUpdate
(PerunSession sess, int attrId, String key) Return value of entityless attribute by attr_id and key (subject).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.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, Resource resource, Facility facility) Get facility attributes which are required by services.getRequiredAttributes
(PerunSession sess, Resource resource, Facility facility, User user) Get user-facility attributes which are required by services.getRequiredAttributes
(PerunSession sess, Resource resourceToGetServicesFrom, Group group) getRequiredAttributes
(PerunSession sess, Resource resourceToGetServicesFrom, Host host) getRequiredAttributes
(PerunSession sess, Resource resourceToGetServicesFrom, Member member) Get member attributes which are required by services.getRequiredAttributes
(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Group group) Get member-group attributes which are required by services.getRequiredAttributes
(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Resource resource) Get member-resource attributes which are required by services.getRequiredAttributes
(PerunSession sess, Resource resourceToGetServicesFrom, Resource resource) Get resource attributes which are required by services.getRequiredAttributes
(PerunSession sess, Resource resourceToGetServicesFrom, Resource resource, Group group) 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, Resource resource, User user) Get user attributes which are required by services.getRequiredAttributes
(PerunSession sess, Resource resource, List<Integer> serviceIds) Get resource attributes which are required by services.getRequiredAttributes
(PerunSession sess, Service service, Facility facility) Get facility attributes which are required by the service.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) getRequiredAttributes
(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, Resource resource) Get member-resource attributes which are required by the service.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, 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, List<Service> services, Group group) Get group attributes which are required by the given services.getRequiredAttributes
(PerunSession sess, List<Service> services, Resource resource, Group group) 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.getResourceRequiredAttributesDefinition
(PerunSession sess, Resource resource) Get attributes definions required by all services assigned on the resource.getUninitializedAttributesModule
(PerunSession sess, AttributeDefinition attributeDefinition) Get uninitiated attributeModule for the attributegetUserAttrValueForUpdate
(PerunSession sess, int attrId, int userId) Get particular attribute for the user for update - locking the attribute for user.getUserFacilityAttributesForAnyUser
(PerunSession sess, Facility facility) Get all non-empty attributes associated with any user on the facility.getUserIdsByLogin
(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) Get all virtual attributes associated with the facility.getVirtualAttributes
(PerunSession sess, Facility facility, User user) Get all virtual attributes associated with the user on the facility.getVirtualAttributes
(PerunSession sess, Group group) Get all virtual attributes associated with the group.getVirtualAttributes
(PerunSession sess, Host host) Get all virtual attributes associated with the host.getVirtualAttributes
(PerunSession sess, Member member) Get all virtual attributes associated with the member.getVirtualAttributes
(PerunSession sess, Member member, Group group) Get all virtual attributes associated with the member in the group.getVirtualAttributes
(PerunSession sess, Member member, Resource resource) Get all virtual attributes associated with the member on the resource.getVirtualAttributes
(PerunSession sess, Resource resource) Get all virtual attributes associated with the resource.getVirtualAttributes
(PerunSession sess, User user) Get all virtual attributes associated with the user.getVirtualAttributes
(PerunSession sess, UserExtSource ues) Get all virtual attributes associated with the UserExtSource.getVirtualAttributes
(PerunSession sess, Vo vo) Get all virtual attributes associated with the vo.void
initAndRegisterAttributeModules
(PerunSession sess, ServiceLoader<AttributesModuleImplApi> modules, Set<AttributeDefinition> allAttributesDef) Init attribute modules map in Impl layer.void
Add attribute module to attribute module map in Impl layer (if it is not there yet).boolean
insertAttribute
(PerunSession sess, Attribute attribute, String tableName, List<String> columnNames, List<Object> columnValues) Insert attribute value in DB.boolean
isAttributeActionCritical
(PerunSession sess, AttributeDefinition attr, AttributeAction action) Checks if the action is critical on given attribute.boolean
isAttributeActionGloballyCritical
(PerunSession sess, int attrId, AttributeAction action) Checks if the action is critical on given attribute for all objects.boolean
isAttributeRequiredByFacility
(PerunSession sess, Facility facility, AttributeDefinition attributeDefinition) Check if this attribute is currently required on this facility.boolean
isAttributeRequiredByGroup
(PerunSession sess, Group group, AttributeDefinition attributeDefinition) Check if this attribute is currently required on this group.boolean
isAttributeRequiredByResource
(PerunSession sess, Resource resource, AttributeDefinition attributeDefinition) Check if this attribute is currently required on this resource.boolean
isAttributeRequiredByVo
(PerunSession sess, Vo vo, AttributeDefinition attributeDefinition) Check if this attribute is currently required on this vo.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
(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
isVirtAttribute
(PerunSession sess, AttributeDefinition attribute) Determine if attribute is virtual attribute.void
Register attribute module in Auditer for message listening (if it is not there yet).boolean
removeAllAttributes
(PerunSession sess, Facility facility) Unset all attributes for the facility.boolean
removeAllAttributes
(PerunSession sess, Facility facility, User user) Unset all (user-facility) non-virtual attributes for the user on the facility.boolean
removeAllAttributes
(PerunSession sess, Group group) Unset all attributes for the group.boolean
removeAllAttributes
(PerunSession sess, Host host) Unset all user attributes for the host.boolean
removeAllAttributes
(PerunSession sess, Member member) Unset all member attributes for the member.boolean
removeAllAttributes
(PerunSession sess, Member member, Group group) Unset all attributes for the member in the group.boolean
removeAllAttributes
(PerunSession sess, Member member, Resource resource) Unset all (member-resource) attributes for the member on the resource.boolean
removeAllAttributes
(PerunSession sess, Resource resource) Unset all attributes for the resource.boolean
removeAllAttributes
(PerunSession sess, Resource resource, Group group) Unset all group_resource attributesboolean
removeAllAttributes
(PerunSession sess, User user) Unset all user attributes for the user.boolean
removeAllAttributes
(PerunSession sess, UserExtSource ues) Unset all UserExtSource attributes for the user external source.boolean
removeAllAttributes
(PerunSession sess, Vo vo) Unset all attributes for the vo.void
removeAllGroupResourceAttributes
(PerunSession sess, Resource resource) Remove all non-virtual group-resource attribute on selected resourcevoid
removeAllMemberResourceAttributes
(PerunSession sess, Resource resource) Remove all non-virtual member-resource attributes assigned to resourceboolean
removeAllUserFacilityAttributes
(PerunSession sess, User user) Unset all (user-facility) non-virtual attributes for the user and all facilitiesboolean
removeAllUserFacilityAttributesForAnyUser
(PerunSession sess, Facility facility) Unset all (user-facility) non-virtual attributes for any user on the facility.void
removeAndUnregisterAttrModule
(PerunSession sess, AttributeDefinition attribute) Remove attribute module of the given non-core attribute from attribute module map in Impl layer and unregister the module from Auditer, however only if it is namespace-specific to avoid removing common module from other active namespace-specific modules.boolean
removeAttribute
(PerunSession sess, Facility facility, AttributeDefinition attribute) Unset particular attribute for the facility.boolean
removeAttribute
(PerunSession sess, Facility facility, User user, AttributeDefinition attribute) Unset particular user-facility attributeboolean
removeAttribute
(PerunSession sess, Group group, AttributeDefinition attribute) Unset particular attribute for the group.boolean
removeAttribute
(PerunSession sess, Host host, AttributeDefinition attribute) Unset particular host attributeboolean
removeAttribute
(PerunSession sess, Member member, AttributeDefinition attribute) Unset particular member attributeboolean
removeAttribute
(PerunSession sess, Member member, Group group, AttributeDefinition attribute) Unset particular attribute for the member in the group.boolean
removeAttribute
(PerunSession sess, Member member, Resource resource, AttributeDefinition attribute) Unset particular member-resorce attribute for the member on the resource.boolean
removeAttribute
(PerunSession sess, Resource resource, AttributeDefinition attribute) Unset particular attribute for the resource.boolean
removeAttribute
(PerunSession sess, Resource resource, Group group, AttributeDefinition attribute) Unset particular group_resource attributeboolean
removeAttribute
(PerunSession sess, UserExtSource ues, AttributeDefinition attribute) Unset particular user external source attributeboolean
removeAttribute
(PerunSession sess, User user, AttributeDefinition attribute) Unset particular user attributeboolean
removeAttribute
(PerunSession sess, Vo vo, AttributeDefinition attribute) Unset particular attribute for the vo.boolean
removeAttribute
(PerunSession sess, String key, AttributeDefinition attribute) Unset particular entityless attribute with subject equals key.void
Remove attribute module from attribute module map in Impl layer.boolean
removeVirtualAttribute
(PerunSession sess, Facility facility, User user, AttributeDefinition attribute) Unset particular user-facility virtual attribute value.boolean
removeVirtualAttribute
(PerunSession sess, Resource resource, AttributeDefinition attribute) Unset particular resource virtual attribute value.boolean
removeVirtualAttribute
(PerunSession sess, Resource resource, Group group, AttributeDefinition attribute) Unset particular group-resource virtual attribute value.boolean
setAttribute
(PerunSession sess, PerunBean bean1, PerunBean bean2, Attribute attribute) Store the particular attribute associated with the bean1 and bean2.boolean
setAttribute
(PerunSession sess, Object object, Attribute attribute) Store the particular attribute associated with the given perun bean.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
setAttributePolicyCollections
(PerunSession sess, List<AttributePolicyCollection> policyCollections) Deletes old attribute policy collections and sets all new attribute policy collections.void
setAttributeRight
(PerunSession sess, AttributeRights rights) Deprecated.boolean
setAttributeWithNullValue
(PerunSession sess, int userId, Attribute attribute) Set user attribute with null value (for user and attribute).boolean
setAttributeWithNullValue
(PerunSession sess, String key, Attribute attribute) Set entityless attribute with null value (for key and attribute).void
void
boolean
setVirtualAttribute
(PerunSession sess, Facility facility, Attribute attribute) Store the particular virtual attribute associated with the facility.boolean
setVirtualAttribute
(PerunSession sess, Facility facility, User user, Attribute attribute) Store the particular virtual attribute associated with the facility and user combination.boolean
setVirtualAttribute
(PerunSession sess, Group group, Attribute attribute) Store the particular virtual attribute associated with the group.boolean
setVirtualAttribute
(PerunSession sess, Member member, Attribute attribute) Store the particular virtual attribute associated with the member.boolean
setVirtualAttribute
(PerunSession sess, Member member, Group group, Attribute attribute) Store the particular virtual attribute associated with the member and group combination.boolean
setVirtualAttribute
(PerunSession sess, Resource resource, Attribute attribute) Store the particular virtual attribute associated with the resource.boolean
setVirtualAttribute
(PerunSession sess, Resource resource, Group group, Attribute attribute) Store the particular virtual attribute associated with the resource and group combination.boolean
setVirtualAttribute
(PerunSession sess, UserExtSource ues, Attribute attribute) Store the particular virtual attribute associated with the user external source.boolean
setVirtualAttribute
(PerunSession sess, User user, Attribute attribute) Store the particular virtual attribute associated with the user.void
Unregister attribute module in Auditer from message listening (if it is not there yet).boolean
updateAttribute
(PerunSession sess, Attribute attribute, String tableName, List<String> columnNames, List<Object> columnValues) Update attribute value in DB.updateAttributeDefinition
(PerunSession perunSession, AttributeDefinition attributeDefinition) Updates AttributeDefinition.
-
Field Details
-
LIST_DELIMITER
public static final char LIST_DELIMITER- See Also:
-
KEY_VALUE_DELIMITER
public static final char KEY_VALUE_DELIMITER- See Also:
-
MAX_SIZE_FOR_IN_CLAUSE
public static final int MAX_SIZE_FOR_IN_CLAUSE- See Also:
-
BEANS_TO_NAMESPACES_MAP
-
ATTRIBUTE_TYPES
List of allowed values for attribute type. -
ATTRIBUTE_DEFINITION_MAPPING_SELECT_QUERY
- See Also:
-
ATTRIBUTE_DEFINITION_MAPPER
-
-
Constructor Details
-
AttributesManagerImpl
Constructor.- Parameters:
perunPool
- connection pool instance
-
-
Method Details
-
escapeListAttributeValue
Escapes LIST_DELIMITER from the value.- Returns:
- escaped value
-
escapeMapAttributeValue
Escapes LIST_DELIMITER and KEY_VALUE_DELIMITER from the value.- Returns:
- escaped value
-
attributeExists
Description copied from interface:AttributesManagerImplApi
Check if attribute exists in underlaying data source.- Specified by:
attributeExists
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionattribute
- attribute to check- Returns:
- true if attribute exists in underlaying data source, false othewise
-
changedAttributeHook
Description copied from interface:AttributesManagerImplApi
If you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHook
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun session
-
changedAttributeHook
Description copied from interface:AttributesManagerImplApi
If you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHook
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun session
-
changedAttributeHook
Description copied from interface:AttributesManagerImplApi
If you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHook
in interfaceAttributesManagerImplApi
-
changedAttributeHook
Description copied from interface:AttributesManagerImplApi
If you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHook
in interfaceAttributesManagerImplApi
-
changedAttributeHook
public void changedAttributeHook(PerunSession sess, Group group, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApi
If you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHook
in interfaceAttributesManagerImplApi
- Throws:
WrongReferenceAttributeValueException
-
changedAttributeHook
public void changedAttributeHook(PerunSession sess, User user, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApi
If you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHook
in interfaceAttributesManagerImplApi
- Throws:
WrongReferenceAttributeValueException
-
changedAttributeHook
public void changedAttributeHook(PerunSession sess, Member member, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApi
If you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHook
in interfaceAttributesManagerImplApi
- Throws:
WrongReferenceAttributeValueException
-
changedAttributeHook
public void changedAttributeHook(PerunSession sess, Resource resource, Group group, Attribute attribute) Description copied from interface:AttributesManagerImplApi
If you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHook
in interfaceAttributesManagerImplApi
-
changedAttributeHook
public void changedAttributeHook(PerunSession sess, Resource resource, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApi
If you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHook
in interfaceAttributesManagerImplApi
- Throws:
WrongReferenceAttributeValueException
-
changedAttributeHook
public void changedAttributeHook(PerunSession sess, Member member, Resource resource, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApi
If you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHook
in interfaceAttributesManagerImplApi
- Throws:
WrongReferenceAttributeValueException
-
changedAttributeHook
public void changedAttributeHook(PerunSession sess, Member member, Group group, Attribute attribute) Description copied from interface:AttributesManagerImplApi
If you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHook
in interfaceAttributesManagerImplApi
-
changedAttributeHook
public void changedAttributeHook(PerunSession sess, Facility facility, User user, Attribute attribute) Description copied from interface:AttributesManagerImplApi
If you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHook
in interfaceAttributesManagerImplApi
-
changedAttributeHook
Description copied from interface:AttributesManagerImplApi
If you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHook
in interfaceAttributesManagerImplApi
-
checkActionTypeExists
@Deprecated public void checkActionTypeExists(PerunSession sess, ActionType actionType) throws ActionTypeNotExistsException Deprecated.Description copied from interface:AttributesManagerImplApi
Check if actionType exists in underlaying data source.- Specified by:
checkActionTypeExists
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionactionType
- actionType to check- Throws:
ActionTypeNotExistsException
- if attriobute doesn't exists
-
checkAttributeExists
public void checkAttributeExists(PerunSession sess, AttributeDefinition attribute) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Check if attribute exists in underlaying data source.- Specified by:
checkAttributeExists
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionattribute
- attribute to check- Throws:
AttributeNotExistsException
- if attribute doesn';t exists
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSession sess, Facility facility, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApi
Check if value of this facility attribute has valid semantics.- Specified by:
checkAttributeSemantics
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionfacility
- facility for which you want to check validity of attributeattribute
- attribute to check- Throws:
WrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSession sess, Vo vo, Attribute attribute) throws WrongReferenceAttributeValueException, WrongAttributeAssignmentException Description copied from interface:AttributesManagerImplApi
Check if value of this vo attribute has valid semantics.- Specified by:
checkAttributeSemantics
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionvo
- vo for which you want to check validity of attributeattribute
- attribute to check- Throws:
WrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semanticsWrongAttributeAssignmentException
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSession sess, Group group, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApi
Check if value of this group attribute has valid semantics.- Specified by:
checkAttributeSemantics
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessiongroup
- group for which you want to check validity of attributeattribute
- attribute to check- Throws:
WrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSession sess, Resource resource, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApi
Check if value of this resource attribute has valid semantics.- Specified by:
checkAttributeSemantics
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionresource
- resource for which you want to check validity of attributeattribute
- attribute to check- Throws:
WrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSession sess, Member member, Resource resource, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApi
Check if value of this member-resource attribute has valid semantics.- Specified by:
checkAttributeSemantics
in interfaceAttributesManagerImplApi
- 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:
WrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSession sess, Member member, Group group, Attribute attribute) Description copied from interface:AttributesManagerImplApi
Check if value of this member-group attribute has valid semantics.- Specified by:
checkAttributeSemantics
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionmember
- member for which (and for specified group) you want to check validity of attributegroup
- group for which (and for specified member) you want to check validity of attributeattribute
- attribute to check
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSession sess, Facility facility, User user, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApi
Check if value of this user-facility attribute has valid semantics.- Specified by:
checkAttributeSemantics
in interfaceAttributesManagerImplApi
- 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:
WrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSession sess, User user, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApi
Check if value of this user attribute has valid semantics.- Specified by:
checkAttributeSemantics
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionuser
- user for which (and for specified facility) you want to check validity of attributeattribute
- attribute to check- Throws:
WrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSession sess, Member member, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApi
Check if value of this member attribute has valid semantics.- Specified by:
checkAttributeSemantics
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionmember
- member for which you want to check validity of attributeattribute
- attribute to check- Throws:
WrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
Description copied from interface:AttributesManagerImplApi
Check if value of this host attribute has valid semantics.- Specified by:
checkAttributeSemantics
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionhost
- host for which you want to check validity of attributeattribute
- attribute to check
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSession sess, Resource resource, Group group, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApi
Check if value of this group-resource attribute has valid semantics.- Specified by:
checkAttributeSemantics
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionresource
- resource for which (and for specified group) you want to check validity of attributegroup
- group for which (and for specified member) you want to check validity of attributeattribute
- attribute to check- Throws:
WrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSession sess, String key, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApi
Check if value of this entityless attribute has valid semantics.- Specified by:
checkAttributeSemantics
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionkey
- key for which you want to check validity of attributeattribute
- attribute to check- Throws:
WrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
Description copied from interface:AttributesManagerImplApi
Check if value of this user external source attribute has valid semantics.- Specified by:
checkAttributeSemantics
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionues
- user external source for which you want to check validity of attributeattribute
- attribute to check
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, Resource resource, List<Attribute> attributes) throws WrongAttributeValueException - Throws:
WrongAttributeValueException
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, Facility facility, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApi
Check if value of this facility attribute has valid syntax.- Specified by:
checkAttributeSyntax
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionfacility
- facility for which you want to check validity of attributeattribute
- attribute to check- Throws:
WrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, Vo vo, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApi
Check if value of this vo attribute has valid syntax.- Specified by:
checkAttributeSyntax
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionvo
- vo for which you want to check validity of attributeattribute
- attribute to check- Throws:
WrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, Group group, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApi
Check if value of this group attribute has valid syntax.- Specified by:
checkAttributeSyntax
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessiongroup
- group for which you want to check validity of attributeattribute
- attribute to check- Throws:
WrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, Resource resource, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApi
Check if value of this resource attribute has valid syntax.- Specified by:
checkAttributeSyntax
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionresource
- resource for which you want to check validity of attributeattribute
- attribute to check- Throws:
WrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, Member member, Resource resource, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApi
Check if value of this member-resource attribute has valid syntax.- Specified by:
checkAttributeSyntax
in interfaceAttributesManagerImplApi
- 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:
WrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, Member member, Group group, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApi
Check if value of this member-group attribute has valid syntax.- Specified by:
checkAttributeSyntax
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionmember
- member for which (and for specified group) you want to check validity of attributegroup
- group for which (and for specified member) you want to check validity of attributeattribute
- attribute to check- Throws:
WrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, Facility facility, User user, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApi
Check if value of this user-facility attribute has valid syntax.- Specified by:
checkAttributeSyntax
in interfaceAttributesManagerImplApi
- 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:
WrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, User user, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApi
Check if value of this user attribute has valid syntax.- Specified by:
checkAttributeSyntax
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionuser
- user for which (and for specified facility) you want to check validity of attributeattribute
- attribute to check- Throws:
WrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, Member member, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApi
Check if value of this member attribute has valid syntax.- Specified by:
checkAttributeSyntax
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionmember
- member for which you want to check validity of attributeattribute
- attribute to check- Throws:
WrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, Host host, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApi
Check if value of this host attribute has valid syntax.- Specified by:
checkAttributeSyntax
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionhost
- host for which you want to check validity of attributeattribute
- attribute to check- Throws:
WrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, Resource resource, Group group, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApi
Check if value of this group-resource attribute has valid syntax.- Specified by:
checkAttributeSyntax
in interfaceAttributesManagerImplApi
- 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 attributeattribute
- attribute to check- Throws:
WrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, String key, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApi
Check if value of this entityless attribute has valid syntax.- Specified by:
checkAttributeSyntax
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionkey
- key for which you want to check validity of attributeattribute
- attribute to check- Throws:
WrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, UserExtSource ues, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApi
Check if value of this user external source attribute has valid syntax.- Specified by:
checkAttributeSyntax
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionues
- user external source for which you want to check validity of attributeattribute
- attribute to check- Throws:
WrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributesExists
public void checkAttributesExists(PerunSession sess, List<? extends AttributeDefinition> attributes, String expectedNamespace) throws AttributeNotExistsException, WrongAttributeAssignmentException -
checkAttributesExists
public void checkAttributesExists(PerunSession sess, List<? extends AttributeDefinition> attributes) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Batch version of checkAttributeExists- Specified by:
checkAttributesExists
in interfaceAttributesManagerImplApi
- Throws:
AttributeNotExistsException
-
checkAttributesSemantics
public void checkAttributesSemantics(PerunSession sess, Resource resource, List<Attribute> attributes) throws WrongReferenceAttributeValueException -
checkNamespace
public void checkNamespace(PerunSession sess, AttributeDefinition attribute, String namespace) throws WrongAttributeAssignmentException Description copied from interface:AttributesManagerImplApi
Determine if attribute is from specified namespace.- Specified by:
checkNamespace
in interfaceAttributesManagerImplApi
- Throws:
WrongAttributeAssignmentException
- if the attribute isn't from specified namespace
-
checkNamespace
public void checkNamespace(PerunSession sess, List<? extends AttributeDefinition> attributes, String namespace) throws WrongAttributeAssignmentException Description copied from interface:AttributesManagerImplApi
Determine if attributes are from specified namespace.- Specified by:
checkNamespace
in interfaceAttributesManagerImplApi
- Throws:
WrongAttributeAssignmentException
- if any of the attribute isn't from specified namespace
-
convertAttributeValuesToNonunique
Description copied from interface:AttributesManagerImplApi
Deletes all values of the attribute from table _attr_u_values which has unique constraint. And returns how many rows were deleted.- Specified by:
convertAttributeValuesToNonunique
in interfaceAttributesManagerImplApi
-
convertAttributeValuesToUnique
Description copied from interface:AttributesManagerImplApi
Copies all values of the attribute to table _attr_u_values which has unique constraint.- Specified by:
convertAttributeValuesToUnique
in interfaceAttributesManagerImplApi
-
createAttribute
public AttributeDefinition createAttribute(PerunSession sess, AttributeDefinition attribute) throws AttributeDefinitionExistsException Description copied from interface:AttributesManagerImplApi
Creates an attribute, the attribute is stored into the appropriate DB table according to the namespace.- Specified by:
createAttribute
in interfaceAttributesManagerImplApi
attribute
- attribute to create- Returns:
- attribute with set id
- Throws:
AttributeDefinitionExistsException
- if attribute already exists
-
decorateMembersWithDefOptMemberAttributes
public List<RichMember> decorateMembersWithDefOptMemberAttributes(PerunSession sess, List<RichMember> members, List<String> memberAttrNames) Description copied from interface:AttributesManagerImplApi
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.- Specified by:
decorateMembersWithDefOptMemberAttributes
in interfaceAttributesManagerImplApi
- 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
-
decorateMembersWithDefOptUserAttributes
public List<RichMember> decorateMembersWithDefOptUserAttributes(PerunSession sess, List<RichMember> members, List<String> userAttrNames) Description copied from interface:AttributesManagerImplApi
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.- Specified by:
decorateMembersWithDefOptUserAttributes
in interfaceAttributesManagerImplApi
- 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
-
deleteAllAttributeAuthz
Deprecated.Description copied from interface:AttributesManagerImplApi
Delete all authz for the attribute.- Specified by:
deleteAllAttributeAuthz
in interfaceAttributesManagerImplApi
attribute
- the attribute
-
deleteAttribute
Description copied from interface:AttributesManagerImplApi
Deletes the attribute. Definition and all values.- Specified by:
deleteAttribute
in interfaceAttributesManagerImplApi
attribute
- attribute to delete
-
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'- Specified by:
escapeQueryParameters
in interfaceAttributesManagerImplApi
- Returns:
- url with escaped special characters in query parameter's values
-
fillAttribute
Description copied from interface:AttributesManagerImplApi
This method try to fill a value of the resource attribute. Value may be copied from some facility attribute.- Specified by:
fillAttribute
in interfaceAttributesManagerImplApi
- 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 owerwriten. This means the attribute value must be empty otherwise this method won't fill it.- Returns:
- attribute which MAY have filled value
-
fillAttribute
public Attribute fillAttribute(PerunSession sess, Member member, Resource resource, Attribute attribute) Description copied from interface:AttributesManagerImplApi
This method try to fill value of the member-resource attribute. This value is automatically generated, but not all atrributes can be filled this way.- Specified by:
fillAttribute
in interfaceAttributesManagerImplApi
- 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 owerwriten. This means the attribute value must be empty otherwise this method won't fill it.- Returns:
- attribute which MAY have filled value
-
fillAttribute
Description copied from interface:AttributesManagerImplApi
This method tries to fill value of the member-group attribute. This value is automatically generated, but not all attributes can be filled this way.- Specified by:
fillAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionmember
- attribute of this member (and group) you want to fillgroup
- attribute of this group 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
-
fillAttribute
public Attribute fillAttribute(PerunSession sess, Facility facility, User user, Attribute attribute) Description copied from interface:AttributesManagerImplApi
This method try to fill value of the user-facility attribute. This value is automatically generated, but not all atrributes can be filled this way.- Specified by:
fillAttribute
in interfaceAttributesManagerImplApi
- 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 owerwriten. This means the attribute value must be empty otherwise this method won't fill it.- Returns:
- attribute which MAY have filled value
-
fillAttribute
Description copied from interface:AttributesManagerImplApi
This method try to fill value of the user attribute. This value is automatically generated, but not all atrributes can be filled this way.- Specified by:
fillAttribute
in interfaceAttributesManagerImplApi
- 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 owerwriten. This means the attribute value must be empty otherwise this method won't fill it.- Returns:
- attribute which MAY have filled value
-
fillAttribute
Description copied from interface:AttributesManagerImplApi
This method try to fill value of the member attribute. This value is automatically generated, but not all atrributes can be filled this way.- Specified by:
fillAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionmember
- attribute of this member (and facility) and you want to fillattribute
- attribute to fill. If attributes already have set value, this value won't be owerwriten. This means the attribute value must be empty otherwise this method won't fill it.- Returns:
- attribute which MAY have filled value
-
fillAttribute
- Specified by:
fillAttribute
in interfaceAttributesManagerImplApi
-
fillAttribute
public Attribute fillAttribute(PerunSession sess, Resource resource, Group group, Attribute attribute) - Specified by:
fillAttribute
in interfaceAttributesManagerImplApi
-
fillAttribute
- Specified by:
fillAttribute
in interfaceAttributesManagerImplApi
-
fillAttribute
Description copied from interface:AttributesManagerImplApi
This method try to fill value of the user external source attribute. This value is automatically generated, but not all atrributes can be filled this way.- Specified by:
fillAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionues
- attribute of this user external source you want to fillattribute
- attribute to fill. If attributes already have set value, this value won't be owerwriten. This means the attribute value must be empty otherwise this method won't fill it.- Returns:
- attribute which may have filled value
-
getAllAttributesStartWithNameWithoutNullValue
public List<Attribute> getAllAttributesStartWithNameWithoutNullValue(PerunSession sess, Group group, String startPartOfName) Description copied from interface:AttributesManagerImplApi
Get all non-empty attributes associated with the group starts with name startPartOfName. Get only nonvirtual attributes with NotNull value.PRIVILEGE: Get only those attributes the principal has access to.
- Specified by:
getAllAttributesStartWithNameWithoutNullValue
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessiongroup
- to get the attributes fromstartPartOfName
- attribute name start with this part- Returns:
- list of attributes which name start with startPartOfName
-
getAllAttributesStartWithNameWithoutNullValue
public List<Attribute> getAllAttributesStartWithNameWithoutNullValue(PerunSession sess, Resource resource, String startPartOfName) Description copied from interface:AttributesManagerImplApi
Get all non-empty attributes associated with the resource starts with name startPartOfName. Get only nonvirtual attributes with notNull value.PRIVILEGE: Get only those attributes the principal has access to.
- Specified by:
getAllAttributesStartWithNameWithoutNullValue
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionresource
- to get the attributes fromstartPartOfName
- attribute name start with this part- Returns:
- list of attributes which name start with startPartOfName
-
getAllGroupResourceValues
public List<Object> getAllGroupResourceValues(PerunSession sess, AttributeDefinition attributeDefinition) Description copied from interface:AttributesManagerImplApi
Get all values for specified group-resource attribute. Atibute can't be core or virt.- Specified by:
getAllGroupResourceValues
in interfaceAttributesManagerImplApi
attributeDefinition
- attribute definition, namespace group-resource- Returns:
-
getAllGroupValues
Description copied from interface:AttributesManagerImplApi
Get all values for specified group attribute. Atibute can't be core or virt.- Specified by:
getAllGroupValues
in interfaceAttributesManagerImplApi
attributeDefinition
- attribute definition, namespace group- Returns:
-
getAllNamespaces
Description copied from interface:AttributesManagerImplApi
Returns list of all possible namespaces.- Specified by:
getAllNamespaces
in interfaceAttributesManagerImplApi
- Parameters:
sess
- session- Returns:
- list of namespaces
-
getAllResourceValues
public List<Object> getAllResourceValues(PerunSession sess, AttributeDefinition attributeDefinition) Description copied from interface:AttributesManagerImplApi
Get all values for specified resource attribute. Atibute can't be core or virt.- Specified by:
getAllResourceValues
in interfaceAttributesManagerImplApi
attributeDefinition
- attribute definition, namespace resource- Returns:
-
getAllSimilarAttributeNames
public List<String> getAllSimilarAttributeNames(PerunSession sess, String startingPartOfAttributeName) Description copied from interface:AttributesManagerImplApi
This method get all similar attr_names which start with partOfAttributeName- Specified by:
getAllSimilarAttributeNames
in interfaceAttributesManagerImplApi
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.
-
getAllUserFacilityRichAttributes
public List<RichAttribute<User,Facility>> getAllUserFacilityRichAttributes(PerunSession sess, User user) Description copied from interface:AttributesManagerImplApi
Get all non-empty attributes associated with the user on the all facilities. This method doesn't use cache.- Specified by:
getAllUserFacilityRichAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun session- Returns:
- list of attributes
-
getAllUserValues
Description copied from interface:AttributesManagerImplApi
Get all values for specified user attribute. Atibute can't be core or virt.- Specified by:
getAllUserValues
in interfaceAttributesManagerImplApi
attributeDefinition
- attribute definition, namespace user- Returns:
-
getAnonymizedValue
public Attribute getAnonymizedValue(PerunSession sess, User user, Attribute attribute) throws AnonymizationNotSupportedException Description copied from interface:AttributesManagerImplApi
Gets anonymized value of the attribute.- Specified by:
getAnonymizedValue
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionuser
- userattribute
- attribute to get anonymized value from- Returns:
- attribute with anonymized value
- Throws:
AnonymizationNotSupportedException
- if the module doesn't exist or it doesn't implement this method
-
getAppFormItemsForAppFormAndAttribute
public List<String> getAppFormItemsForAppFormAndAttribute(PerunSession sess, int appFormId, AttributeDefinition attr) Description copied from interface:AttributesManagerImplApi
Returns list of app form items' shortnames for which the given attribute is a source or a destination attribute in the given application form- Specified by:
getAppFormItemsForAppFormAndAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- sessionappFormId
- id of application formattr
- attribute definition- Returns:
- list of shortnames
-
getAppFormsWhereAttributeRelated
public List<ApplicationForm> getAppFormsWhereAttributeRelated(PerunSession sess, AttributeDefinition attr) Description copied from interface:AttributesManagerImplApi
Returns all application forms where the given attribute definition is a source or a destination attribute for any application from item- Specified by:
getAppFormsWhereAttributeRelated
in interfaceAttributesManagerImplApi
- Parameters:
sess
- sessionattr
- attribute definition- Returns:
- list of application forms where the given attribute definition has relation to any application form item
-
getAttribute
public Attribute getAttribute(PerunSession sess, Facility facility, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Get particular attribute for the facility.- Specified by:
getAttribute
in interfaceAttributesManagerImplApi
facility
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttribute
public Attribute getAttribute(PerunSession sess, Vo vo, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Get particular attribute for the vo.- Specified by:
getAttribute
in interfaceAttributesManagerImplApi
vo
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttribute
public Attribute getAttribute(PerunSession sess, Group group, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Get particular attribute for the group.- Specified by:
getAttribute
in interfaceAttributesManagerImplApi
group
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttribute
public Attribute getAttribute(PerunSession sess, Resource resource, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Get particular attribute for the resource.- Specified by:
getAttribute
in interfaceAttributesManagerImplApi
resource
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttribute
public Attribute getAttribute(PerunSession sess, Member member, Resource resource, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Get particular attribute for the member on this resource.- Specified by:
getAttribute
in interfaceAttributesManagerImplApi
member
- to get attribute fromresource
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttribute
public Attribute getAttribute(PerunSession sess, Member member, Group group, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Get particular attribute for the member in this group.- Specified by:
getAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionmember
- to get attribute fromgroup
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlying data source
-
getAttribute
public Attribute getAttribute(PerunSession sess, Member member, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Get particular attribute for the member.- Specified by:
getAttribute
in interfaceAttributesManagerImplApi
member
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttribute
public Attribute getAttribute(PerunSession sess, Facility facility, User user, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Get particular attribute for the user on this facility.- Specified by:
getAttribute
in interfaceAttributesManagerImplApi
attributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttribute
public Attribute getAttribute(PerunSession sess, User user, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Get particular attribute for the user.- Specified by:
getAttribute
in interfaceAttributesManagerImplApi
attributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttribute
public Attribute getAttribute(PerunSession sess, Host host, String attributeName) throws AttributeNotExistsException - Specified by:
getAttribute
in interfaceAttributesManagerImplApi
- Throws:
AttributeNotExistsException
-
getAttribute
public Attribute getAttribute(PerunSession sess, Resource resource, Group group, String attributeName) throws AttributeNotExistsException - Specified by:
getAttribute
in interfaceAttributesManagerImplApi
- Throws:
AttributeNotExistsException
-
getAttribute
public Attribute getAttribute(PerunSession sess, String key, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Get particular entityless attribute- Specified by:
getAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionkey
- key to get attribute for- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttribute
public Attribute getAttribute(PerunSession sess, UserExtSource ues, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Get particular attribute for the User External Source.- Specified by:
getAttribute
in interfaceAttributesManagerImplApi
attributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Facility facility, int id) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Get particular attribute for the facility.- Specified by:
getAttributeById
in interfaceAttributesManagerImplApi
facility
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Vo vo, int id) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Get particular attribute for the vo.- Specified by:
getAttributeById
in interfaceAttributesManagerImplApi
vo
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Resource resource, int id) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Get particular attribute for the resource.- Specified by:
getAttributeById
in interfaceAttributesManagerImplApi
resource
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Member member, Resource resource, int id) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Get particular attribute for the member on this resource.- Specified by:
getAttributeById
in interfaceAttributesManagerImplApi
member
- to get attribute fromresource
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Member member, Group group, int id) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Get particular attribute for the member in this group.- Specified by:
getAttributeById
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionmember
- to get attribute fromgroup
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlying data source
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Member member, int id) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Get particular attribute for the member.- Specified by:
getAttributeById
in interfaceAttributesManagerImplApi
id
- attribute id- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Facility facility, User user, int id) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Get particular attribute for the user on this facility.- Specified by:
getAttributeById
in interfaceAttributesManagerImplApi
id
- attribute id- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, User user, int id) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Get particular attribute for the user.- Specified by:
getAttributeById
in interfaceAttributesManagerImplApi
id
- attribute id- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Host host, int id) throws AttributeNotExistsException - Specified by:
getAttributeById
in interfaceAttributesManagerImplApi
- Throws:
AttributeNotExistsException
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Resource resource, Group group, int id) throws AttributeNotExistsException - Specified by:
getAttributeById
in interfaceAttributesManagerImplApi
- Throws:
AttributeNotExistsException
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Group group, int id) throws AttributeNotExistsException - Specified by:
getAttributeById
in interfaceAttributesManagerImplApi
- Throws:
AttributeNotExistsException
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, UserExtSource ues, int id) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Get particular attribute for the user external source.- Specified by:
getAttributeById
in interfaceAttributesManagerImplApi
id
- attribute id- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttributeDefinition
public AttributeDefinition getAttributeDefinition(PerunSession sess, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Get attributes definition (attribute without defined value).- Specified by:
getAttributeDefinition
in interfaceAttributesManagerImplApi
attributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttributeDefinitionById
public AttributeDefinition getAttributeDefinitionById(PerunSession sess, int id) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Get attibute definition (attribute without defined value).- Specified by:
getAttributeDefinitionById
in interfaceAttributesManagerImplApi
id
- attribute id- Returns:
- attribute
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttributePolicyCollections
public List<AttributePolicyCollection> getAttributePolicyCollections(PerunSession sess, int attributeId) Description copied from interface:AttributesManagerImplApi
Gets attribute policy collections for an attribute definition with given id.- Specified by:
getAttributePolicyCollections
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionattributeId
- id of the attribute definition- Returns:
- all policy collections of the attribute definition
-
getAttributeRights
Deprecated.Description copied from interface:AttributesManagerImplApi
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)- Specified by:
getAttributeRights
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionattributeId
- id of the attribute- Returns:
- all rights of the attribute
-
getAttributes
Description copied from interface:AttributesManagerImplApi
Get all non-empty attributes associated with the facility.- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionfacility
- facility to get the attributes from- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApi
Get all attributes associated with the facility which have name in list attrNames (empty too). Virtual attribute too.- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionfacility
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApi
Get all non-empty attributes associated with the vo.- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionvo
- vo to get the attributes from- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApi
Get all non-empty attributes associated with the group.- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessiongroup
- group to get the attributes from- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApi
Get all non-empty attributes associated with the resource.- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionresource
- resource to get the attributes from- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApi
Get all non-empty attributes associated with the member on the resource.- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionmember
- to get the attributes fromresource
- to get the attributes from- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApi
Get all non-empty, non-virtual attributes associated with the member in the group.- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionmember
- to get the attributes fromgroup
- group to get the attributes from- Returns:
- list of attributes
-
getAttributes
public List<Attribute> getAttributes(PerunSession sess, Member member, Group group, List<String> attrNames) Description copied from interface:AttributesManagerImplApi
Get all attributes (empty and virtual too) associated with the member in the group which have name in list attrNames.- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionmember
- to get the attributes fromgroup
- group to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
-
getAttributes
public List<Attribute> getAttributes(PerunSession sess, Member member, Resource resource, List<String> attrNames) Description copied from interface:AttributesManagerImplApi
Get all attributes (empty and virtual too) associated with the member on the resource which have name in list attrNames.- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionmember
- to get the attributes fromresource
- resource to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
-
getAttributes
public List<Attribute> getAttributes(PerunSession sess, Resource resource, Group group, List<String> attrNames) Description copied from interface:AttributesManagerImplApi
Get all attributes (empty and virtual too) associated with the group on the resource which have name in list attrNames.- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionresource
- to get the attributes forgroup
- to get the attributes forattrNames
- list of attributes names- Returns:
- list of selected attributes for group and resource objects
-
getAttributes
public List<Attribute> getAttributes(PerunSession sess, User user, Facility facility, List<String> attrNames) Description copied from interface:AttributesManagerImplApi
Get all attributes (empty and virtual too) associated with the user on the facility which have name in list attrNames.- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionuser
- to get the attributes fromfacility
- facility to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApi
Get all non-empty attributes associated with the member.- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionmember
- member to get the attributes from- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApi
Get all attributes associated with the vo which have name in list attrNames (empty and virtual too).- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionvo
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApi
Get all attributes associated with the member which have name in list attrNames (empty and virtual too).- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionmember
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApi
Get all attributes associated with the group which have name in list attrNames (empty too).- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessiongroup
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApi
Get all attributes associated with the resource which have name in list attrNames (empty too).- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionresource
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApi
Get all attributes associated with the UserExtSource which have name in list attrNames (empty and virtual too).- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionues
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApi
Get all non-empty attributes associated with the user on the facility.- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun session- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApi
Get all entiteless attributes with subject equaled String key- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
- Returns:
-
getAttributes
Description copied from interface:AttributesManagerImplApi
Get all non-empty attributes associated with the user.- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun session- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApi
Get all attributes associated with the user which have name in list attrNames (empty and virtual too).- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionuser
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
-
getAttributes
- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
-
getAttributes
Description copied from interface:AttributesManagerImplApi
Get all attributes associated with the host which have name in list attrNames (empty and virtual too). Empty list attrNames will return no attributes.- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionhost
- host to get attributes forattrNames
- list of attributes' names- Returns:
- list of attributes
-
getAttributes
- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
-
getAttributes
Description copied from interface:AttributesManagerImplApi
Get all non-empty attributes associated with the UserExtSource.- Specified by:
getAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionues
- to get the attributes from- Returns:
- list of attributes
-
getAttributesByAttributeDefinition
public List<Attribute> getAttributesByAttributeDefinition(PerunSession sess, AttributeDefinition attributeDefinition) Description copied from interface:AttributesManagerImplApi
Returns all attributes with not-null value which fits the attributeDefinition. Can't process core or virtual attributes.- Specified by:
getAttributesByAttributeDefinition
in interfaceAttributesManagerImplApi
- Returns:
- list of attributes
-
getAttributesDefinition
Description copied from interface:AttributesManagerImplApi
Get attributes definition (attribute without defined value).- Specified by:
getAttributesDefinition
in interfaceAttributesManagerImplApi
- Returns:
- List of attributes
-
getAttributesDefinitionByNamespace
public List<AttributeDefinition> getAttributesDefinitionByNamespace(PerunSession sess, String namespace) Description copied from interface:AttributesManagerImplApi
Get attributes definition (attribute without defined value) with specified namespace.- Specified by:
getAttributesDefinitionByNamespace
in interfaceAttributesManagerImplApi
namespace
- get only attributes with this namespace- Returns:
- List of attributes
-
getAttributesModule
Get the attribute module for the attribute- Specified by:
getAttributesModule
in interfaceAttributesManagerImplApi
- Parameters:
attribute
- get the attribute module for this attribute- See Also:
-
cz.metacentrum.perun.core.impl.AttributesManagerImpl#getAttributesModule(PerunSession, String)
-
getCriticalAttributeActions
Description copied from interface:AttributesManagerImplApi
Returns critical actions on given attribute.- Specified by:
getCriticalAttributeActions
in interfaceAttributesManagerImplApi
- Parameters:
sess
- sessionattrId
- attribute definition id- Returns:
- list of critical actions
-
getEntitylessAttrValueForUpdate
public String getEntitylessAttrValueForUpdate(PerunSession sess, int attrId, String key) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Return value of entityless attribute by attr_id and key (subject). Value is in the format from DB. IMPORTANT: return only values in String (special format for Map or List)!If value is null, return null. If attribute with subject=key not exists, create new one with null value and return null.
- Specified by:
getEntitylessAttrValueForUpdate
in interfaceAttributesManagerImplApi
- Returns:
- attr_value in string
- Throws:
AttributeNotExistsException
- throw exception if attribute with value not exists in DB
-
getEntitylessAttributes
Description copied from interface:AttributesManagerImplApi
Get all entityless attributes with attributeName- Specified by:
getEntitylessAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun session- Returns:
- attribute
-
getEntitylessKeys
Description copied from interface:AttributesManagerImplApi
Returns list of Keys which fits the attributeDefinition.- Specified by:
getEntitylessKeys
in interfaceAttributesManagerImplApi
- Returns:
-
getEntitylessStringAttributeMapping
public Map<String,String> getEntitylessStringAttributeMapping(PerunSession sess, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Gets map from keys to string values for an entityless attribute.- Specified by:
getEntitylessStringAttributeMapping
in interfaceAttributesManagerImplApi
- Parameters:
sess
- not usedattributeName
- full attribute name- Returns:
- unordered hashmap
- Throws:
AttributeNotExistsException
-
getPerunBeanIdsForUniqueAttributeValue
public Set<Pair<Integer,Integer>> getPerunBeanIdsForUniqueAttributeValue(PerunSession sess, Attribute attribute) Description copied from interface:AttributesManagerImplApi
Finds ids of PerunBeans that have the attribute's value for the attribute.See
AttributesManagerBl.getPerunBeanIdsForUniqueAttributeValue(PerunSession, Attribute)
for details.- Specified by:
getPerunBeanIdsForUniqueAttributeValue
in interfaceAttributesManagerImplApi
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Resource resource, Facility facility) Description copied from interface:AttributesManagerImplApi
Get facility attributes which are required by services. Services are known from the resource.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionresource
- 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
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Resource resource, List<Integer> serviceIds) Description copied from interface:AttributesManagerImplApi
Get resource attributes which are required by services.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun session- Returns:
- list of resource attributes which are required by services which are selceted
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Resource resource) Description copied from interface:AttributesManagerImplApi
Get resource attributes which are required by services. Services are known from the resourceToGetServicesFrom.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionresourceToGetServicesFrom
- resource from which the services are takenresource
- resource for which you want to get the attributes- Returns:
- list of resource attributes which are required by services which are assigned to resource.
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member) Description copied from interface:AttributesManagerImplApi
Get member attributes which are required by services. Services are known from the resourceToGetServicesFrom.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionresourceToGetServicesFrom
- resource from which the services are takenmember
- you get attributes for this member- Returns:
- list of member attributes which are required by services which are assigned to resource.
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Resource resource) Description copied from interface:AttributesManagerImplApi
Get member-resource attributes which are required by services. Services are known from the resourceToGetServicesFrom.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionresourceToGetServicesFrom
- resource from which the services are takenmember
- you get attributes for this member and the resourceresource
- you get attributes for this resource and the member- Returns:
- list of member-resource attributes which are required by services which are assigned to another resource.
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Resource resource, Facility facility, User user) Description copied from interface:AttributesManagerImplApi
Get user-facility attributes which are required by services. Services are known from the resource.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionresource
- resource from which the services are takenfacility
- facility from which the services are takenuser
- you get attributes for this user- Returns:
- list of member-resource attributes which are required by services which are assigned to another resource.
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Resource resource, Group group) - Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
-
getRequiredAttributes
Description copied from interface:AttributesManagerImplApi
Get user attributes which are required by services. Services are known from the resource.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionuser
- you get attributes for this user- Returns:
- list of user attributes which are required by services which are assigned to resource.
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Host host) - Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Group group) - Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
-
getRequiredAttributes
Description copied from interface:AttributesManagerImplApi
Get facility attributes which are required by all services which are connected to this facility.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionfacility
- you get attributes for this facility- Returns:
- list of facility attributes which are required by all services which are connected to this facility.
-
getRequiredAttributes
Description copied from interface:AttributesManagerImplApi
Get facility attributes which are required by the service.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionservice
- attribute required by this service you'll getfacility
- you get attributes for this facility- Returns:
- list of facility attributes which are required by the service
-
getRequiredAttributes
Description copied from interface:AttributesManagerImplApi
Get vo attributes which are required by the service.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionservice
- attribute required by this service you'll getvo
- you get attributes for this vo- Returns:
- list of vo attributes which are required by the service
-
getRequiredAttributes
Description copied from interface:AttributesManagerImplApi
Get resource attributes which are required by the service.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionservice
- attribute required by this service you'll getresource
- resource for which you want to get the attributes- Returns:
- list of resource attributes which are required by the service
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Member member, Resource resource) Description copied from interface:AttributesManagerImplApi
Get member-resource attributes which are required by the service.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- 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.
-
getRequiredAttributes
public HashMap<Member,List<Attribute>> getRequiredAttributes(PerunSession sess, Service service, Resource resource, List<Member> members) Description copied from interface:AttributesManagerImplApi
Get member-resource attributes which are required by service for each member in list of members.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- 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 and his list of attributes
-
getRequiredAttributes
public HashMap<Member,List<Attribute>> getRequiredAttributes(PerunSession sess, Resource resource, Service service, List<Member> members) Description copied from interface:AttributesManagerImplApi
Get member attributes which are required by service for each member in list of members.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionresource
- resource only to get allowed membersservice
- attribute required by this servicemembers
- you get attributes for this list of members- Returns:
- map of member and his list of attributes
-
getRequiredAttributes
public HashMap<User,List<Attribute>> getRequiredAttributes(PerunSession sess, Service service, Facility facility, List<User> users) Description copied from interface:AttributesManagerImplApi
Get user-facility attributes which are required by the service for each user in list of users.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- 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 userID and his list of attributes
-
getRequiredAttributes
public HashMap<User,List<Attribute>> getRequiredAttributes(PerunSession sess, Service service, List<User> users) Description copied from interface:AttributesManagerImplApi
Get user attributes which are required by the service for each user in list of users.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionservice
- attribute required by this serviceusers
- you get attributes for this user and facility- Returns:
- map of userID and his list of attributes
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Member member, Group group) Description copied from interface:AttributesManagerImplApi
Get member-group attributes which are required by the service.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionservice
- attribute required by this service you'll getmember
- you get attributes for this member and the groupgroup
- you get attributes for this group in which member is associated- Returns:
- list of attributes which are required by the service.
-
getRequiredAttributes
public Map<Member,List<Attribute>> getRequiredAttributes(PerunSession sess, Service service, List<Member> members, Group group) Description copied from interface:AttributesManagerImplApi
Get member-group attributes which are required by the service, for the given members and the given group.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionservice
- attribute required by this service you'll getmembers
- you get attributes for this member and the groupgroup
- you get attributes for these groups in which member is associated- Returns:
- list of attributes which are required by the service.
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Group group) Description copied from interface:AttributesManagerImplApi
Get member-group attributes which are required by services. Services are known from the resourceToGetServicesFrom.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionresourceToGetServicesFrom
- resource from which the services are takenmember
- you get attributes for this member and the groupgroup
- you get attributes for this group and the member- Returns:
- list of member-group attributes which are required by services which are assigned to another resource.
-
getRequiredAttributes
Description copied from interface:AttributesManagerImplApi
Get member attributes which are required by the service.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionservice
- attribute required by this service you'll get- Returns:
- list of attributes which are required by the service.
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Facility facility, User user) Description copied from interface:AttributesManagerImplApi
Get user-facility attributes which are required by the service.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionservice
- attribute required by this service you'll get- Returns:
- list of attributes which are required by the service.
-
getRequiredAttributes
Description copied from interface:AttributesManagerImplApi
Get user attributes which are required by the service.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionservice
- attribute required by this service you'll get- Returns:
- list of attributes which are required by the service.
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Resource resource, Group group) - Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, List<Service> services, Resource resource, Group group) Description copied from interface:AttributesManagerImplApi
Get group-resource attributes which are required by the services.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- sessionservices
- servicesresource
- resourcegroup
- group- Returns:
- list of attributes which are required by the service.
-
getRequiredAttributes
- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
-
getRequiredAttributes
- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, List<Service> services, Group group) Description copied from interface:AttributesManagerImplApi
Get group attributes which are required by the given services.- Specified by:
getRequiredAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- sessionservices
- servicesgroup
- group- Returns:
- list of group attributes which are required by the given services
-
getRequiredAttributesDefinition
public List<AttributeDefinition> getRequiredAttributesDefinition(PerunSession sess, Service service) Description copied from interface:AttributesManagerImplApi
Get all attributes which are required by service. Required attribues are requisite for Service to run.- Specified by:
getRequiredAttributesDefinition
in interfaceAttributesManagerImplApi
- Parameters:
sess
- sessservice
- service from which the attributes will be listed- Returns:
- All attributes which are required by service.
-
getRequiredAttributesForGroups
public Map<Group,List<Attribute>> getRequiredAttributesForGroups(PerunSession sess, Service service, List<Group> groups) Description copied from interface:AttributesManagerImplApi
Get group attributes which are required by the given service for given groups.- Specified by:
getRequiredAttributesForGroups
in interfaceAttributesManagerImplApi
- Parameters:
sess
- sessionservice
- service for which are taken the required attributesgroups
- groups- Returns:
- attributes mapped by their groups
-
getResourceRequiredAttributesDefinition
public List<AttributeDefinition> getResourceRequiredAttributesDefinition(PerunSession sess, Resource resource) Description copied from interface:AttributesManagerImplApi
Get attributes definions required by all services assigned on the resource.- Specified by:
getResourceRequiredAttributesDefinition
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun session- Returns:
- attributes definions required by all services assigned on the resource.
-
getUninitializedAttributesModule
public AttributesModuleImplApi getUninitializedAttributesModule(PerunSession sess, AttributeDefinition attributeDefinition) Description copied from interface:AttributesManagerImplApi
Get uninitiated attributeModule for the attribute- Specified by:
getUninitializedAttributesModule
in interfaceAttributesManagerImplApi
attributeDefinition
- get the attribute module for this attribute- See Also:
-
getUserAttrValueForUpdate
public String getUserAttrValueForUpdate(PerunSession sess, int attrId, int userId) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApi
Get particular attribute for the user for update - locking the attribute for user.- Specified by:
getUserAttrValueForUpdate
in interfaceAttributesManagerImplApi
- Returns:
- attribute value
- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlying data source
-
getUserFacilityAttributesForAnyUser
Description copied from interface:AttributesManagerImplApi
Get all non-empty attributes associated with any user on the facility.- Specified by:
getUserFacilityAttributesForAnyUser
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun session- Returns:
- list of attributes
-
getUserIdsByLogin
Description copied from interface:AttributesManagerImplApi
Gets IDs of users who use the given login in any namespace.- Specified by:
getUserIdsByLogin
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionlogin
- login- Returns:
- list of user IDs
-
getUserVirtualAttributeModule
public UserVirtualAttributesModuleImplApi getUserVirtualAttributeModule(PerunSession sess, AttributeDefinition attribute) Description copied from interface:AttributesManagerImplApi
Get user virtual attribute module by the attribute.- Specified by:
getUserVirtualAttributeModule
in interfaceAttributesManagerImplApi
attribute
- attribute for which you get the module- Returns:
- instance of user attribute module
-
getVirtualAttributes
Description copied from interface:AttributesManagerImplApi
Get all virtual attributes associated with the facility.- Specified by:
getVirtualAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionfacility
- to get the attributes from- Returns:
- list of attributes
-
getVirtualAttributes
Description copied from interface:AttributesManagerImplApi
Get all virtual attributes associated with the member.- Specified by:
getVirtualAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionmember
- to get the attributes from- Returns:
- list of attributes
-
getVirtualAttributes
Description copied from interface:AttributesManagerImplApi
Get all virtual attributes associated with the vo.- Specified by:
getVirtualAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionvo
- to get the attributes from- Returns:
- list of attributes
-
getVirtualAttributes
Description copied from interface:AttributesManagerImplApi
Get all virtual attributes associated with the group.- Specified by:
getVirtualAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessiongroup
- to get the attributes from- Returns:
- list of attributes
-
getVirtualAttributes
Description copied from interface:AttributesManagerImplApi
Get all virtual attributes associated with the host.- Specified by:
getVirtualAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionhost
- to get the attributes from- Returns:
- list of attributes
-
getVirtualAttributes
Description copied from interface:AttributesManagerImplApi
Get all virtual attributes associated with the resource.- Specified by:
getVirtualAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionresource
- to get the attributes from- Returns:
- list of attributes
-
getVirtualAttributes
Description copied from interface:AttributesManagerImplApi
Get all virtual attributes associated with the member on the resource.- Specified by:
getVirtualAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionmember
- to get the attributes fromresource
- to get the attributes from- Returns:
- list of attributes
-
getVirtualAttributes
Description copied from interface:AttributesManagerImplApi
Get all virtual attributes associated with the user on the facility.- Specified by:
getVirtualAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionfacility
- to get the attributes fromuser
- to get the attributes from- Returns:
- list of attributes
-
getVirtualAttributes
Description copied from interface:AttributesManagerImplApi
Get all virtual attributes associated with the member in the group.- Specified by:
getVirtualAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionmember
- to get the attributes fromgroup
- to get the attributes from- Returns:
- list of attributes
-
getVirtualAttributes
Description copied from interface:AttributesManagerImplApi
Get all virtual attributes associated with the user.- Specified by:
getVirtualAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionuser
- to get the attributes from- Returns:
- list of attributes
-
getVirtualAttributes
Description copied from interface:AttributesManagerImplApi
Get all virtual attributes associated with the UserExtSource.- Specified by:
getVirtualAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionues
- to get the attributes from- Returns:
- list of attributes
-
initAndRegisterAttributeModules
public void initAndRegisterAttributeModules(PerunSession sess, ServiceLoader<AttributesModuleImplApi> modules, Set<AttributeDefinition> allAttributesDef) Description copied from interface:AttributesManagerImplApi
Init attribute modules map in Impl layer. And register them in Auditer for message listening.- Specified by:
initAndRegisterAttributeModules
in interfaceAttributesManagerImplApi
modules
- List of attribute module class instances- See Also:
-
initAttributeModule
Description copied from interface:AttributesManagerImplApi
Add attribute module to attribute module map in Impl layer (if it is not there yet).- Specified by:
initAttributeModule
in interfaceAttributesManagerImplApi
- Parameters:
module
- module to add- See Also:
-
insertAttribute
public boolean insertAttribute(PerunSession sess, Attribute attribute, String tableName, List<String> columnNames, List<Object> columnValues) Description copied from interface:AttributesManagerImplApi
Insert attribute value in DB.- Specified by:
insertAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionattribute
- that will be stored in the DBtableName
- in the database in which the attribute will be insertedcolumnNames
- of the database table in which the attribute will be writtencolumnValues
- of the objects, for which the attribute will be written, corresponding to the columnNames- Returns:
- true if new value differs from old value (i.e. values changed) false otherwise (value do not change)
-
isAttributeActionCritical
public boolean isAttributeActionCritical(PerunSession sess, AttributeDefinition attr, AttributeAction action) Description copied from interface:AttributesManagerImplApi
Checks if the action is critical on given attribute.- Specified by:
isAttributeActionCritical
in interfaceAttributesManagerImplApi
- Parameters:
sess
- sessionattr
- attribute definitionaction
- critical action- Returns:
- true if action is critical, false otherwise
-
isAttributeActionGloballyCritical
public boolean isAttributeActionGloballyCritical(PerunSession sess, int attrId, AttributeAction action) Description copied from interface:AttributesManagerImplApi
Checks if the action is critical on given attribute for all objects.- Specified by:
isAttributeActionGloballyCritical
in interfaceAttributesManagerImplApi
- Parameters:
sess
- sessionattrId
- attribute definition idaction
- critical action- Returns:
- true if action is globally critical, false otherwise
-
isAttributeRequiredByFacility
public boolean isAttributeRequiredByFacility(PerunSession sess, Facility facility, AttributeDefinition attributeDefinition) Description copied from interface:AttributesManagerImplApi
Check if this attribute is currently required on this facility. Attribute can be from any namespace.- Specified by:
isAttributeRequiredByFacility
in interfaceAttributesManagerImplApi
- Returns:
-
isAttributeRequiredByGroup
public boolean isAttributeRequiredByGroup(PerunSession sess, Group group, AttributeDefinition attributeDefinition) Description copied from interface:AttributesManagerImplApi
Check if this attribute is currently required on this group. Attribute can be from any namespace.- Specified by:
isAttributeRequiredByGroup
in interfaceAttributesManagerImplApi
- Returns:
-
isAttributeRequiredByResource
public boolean isAttributeRequiredByResource(PerunSession sess, Resource resource, AttributeDefinition attributeDefinition) Description copied from interface:AttributesManagerImplApi
Check if this attribute is currently required on this resource. Attribute can be from any namespace.- Specified by:
isAttributeRequiredByResource
in interfaceAttributesManagerImplApi
- Returns:
-
isAttributeRequiredByVo
public boolean isAttributeRequiredByVo(PerunSession sess, Vo vo, AttributeDefinition attributeDefinition) Description copied from interface:AttributesManagerImplApi
Check if this attribute is currently required on this vo. Attribute can be from any namespace.- Specified by:
isAttributeRequiredByVo
in interfaceAttributesManagerImplApi
- Returns:
-
isCoreAttribute
Description copied from interface:AttributesManagerImplApi
Determine if attribute is core attribute.- Specified by:
isCoreAttribute
in interfaceAttributesManagerImplApi
- Returns:
- true if attribute is core attribute
-
isCoreManagedAttribute
Description copied from interface:AttributesManagerImplApi
Determine if attribute is core-managed attribute.- Specified by:
isCoreManagedAttribute
in interfaceAttributesManagerImplApi
- Returns:
- true if attribute is core-managed
-
isDefAttribute
Description copied from interface:AttributesManagerImplApi
Determine if attribute is defined (def) attribute.- Specified by:
isDefAttribute
in interfaceAttributesManagerImplApi
- Returns:
- true if attribute is defined attribute false otherwise
-
isFromNamespace
Description copied from interface:AttributesManagerImplApi
Determine if attribute is from specified namespace.- Specified by:
isFromNamespace
in interfaceAttributesManagerImplApi
- Returns:
- true if the attribute is from specified namespace false otherwise
-
isLoginAlreadyUsed
Description copied from interface:AttributesManagerImplApi
Check if the login is already in use for some namespace or globally- Specified by:
isLoginAlreadyUsed
in interfaceAttributesManagerImplApi
- 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
Description copied from interface:AttributesManagerImplApi
Determine if attribute is optional (opt) attribute.- Specified by:
isOptAttribute
in interfaceAttributesManagerImplApi
- Returns:
- true if attribute is optional attribute false otherwise
-
isVirtAttribute
Description copied from interface:AttributesManagerImplApi
Determine if attribute is virtual attribute.- Specified by:
isVirtAttribute
in interfaceAttributesManagerImplApi
- Returns:
- true if attribute is virtual
-
registerAttributeModule
Description copied from interface:AttributesManagerImplApi
Register attribute module in Auditer for message listening (if it is not there yet).- Specified by:
registerAttributeModule
in interfaceAttributesManagerImplApi
- Parameters:
module
- module to register- See Also:
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApi
Unset all attributes for the facility.- Specified by:
removeAllAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionfacility
- remove attributes from this facility- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApi
Unset all attributes for the vo.- Specified by:
removeAllAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionvo
- remove attributes from this vo- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApi
Unset all attributes for the group.- Specified by:
removeAllAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessiongroup
- remove attributes from this group- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApi
Unset all attributes for the resource.- Specified by:
removeAllAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionresource
- remove attributes from this resource- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApi
Unset all (member-resource) attributes for the member on the resource.- Specified by:
removeAllAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionmember
- remove attributes from this memberresource
- remove attributes from this resource- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApi
Unset all attributes for the member in the group.- Specified by:
removeAllAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionmember
- remove attributes from this membergroup
- remove attributes for this group- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApi
Unset all member attributes for the member.- Specified by:
removeAllAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun session- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApi
Unset all (user-facility) non-virtual attributes for the user on the facility.- Specified by:
removeAllAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun session- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApi
Unset all user attributes for the user.- Specified by:
removeAllAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun session- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApi
Unset all user attributes for the host.- Specified by:
removeAllAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun session- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApi
Unset all group_resource attributes- Specified by:
removeAllAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionresource
- Resourcegroup
- Group- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApi
Unset all UserExtSource attributes for the user external source.- Specified by:
removeAllAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun session- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted
-
removeAllGroupResourceAttributes
Description copied from interface:AttributesManagerImplApi
Remove all non-virtual group-resource attribute on selected resource- Specified by:
removeAllGroupResourceAttributes
in interfaceAttributesManagerImplApi
-
removeAllMemberResourceAttributes
Description copied from interface:AttributesManagerImplApi
Remove all non-virtual member-resource attributes assigned to resource- Specified by:
removeAllMemberResourceAttributes
in interfaceAttributesManagerImplApi
-
removeAllUserFacilityAttributes
Description copied from interface:AttributesManagerImplApi
Unset all (user-facility) non-virtual attributes for the user and all facilities- Specified by:
removeAllUserFacilityAttributes
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun session- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted
-
removeAllUserFacilityAttributesForAnyUser
Description copied from interface:AttributesManagerImplApi
Unset all (user-facility) non-virtual attributes for any user on the facility.- Specified by:
removeAllUserFacilityAttributesForAnyUser
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun session
-
removeAndUnregisterAttrModule
Description copied from interface:AttributesManagerImplApi
Remove attribute module of the given non-core attribute from attribute module map in Impl layer and unregister the module from Auditer, however only if it is namespace-specific to avoid removing common module from other active namespace-specific modules. If no namespace-specific modules remain for the attribute, the common module will not be removed. To remove the common module, pass the common definition as parameter.- Specified by:
removeAndUnregisterAttrModule
in interfaceAttributesManagerImplApi
- Parameters:
sess
- sessattribute
- attribute of which module to remove
-
removeAttribute
Description copied from interface:AttributesManagerImplApi
Unset particular attribute for the facility.- Specified by:
removeAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionfacility
- remove attribute from this facilityattribute
- attribute to remove- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place
-
removeAttribute
Description copied from interface:AttributesManagerImplApi
Unset particular entityless attribute with subject equals key.- Specified by:
removeAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionkey
- subject of entityless attributeattribute
- attribute to remove- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place
-
removeAttribute
Description copied from interface:AttributesManagerImplApi
Unset particular attribute for the vo.- Specified by:
removeAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionvo
- remove attribute from this voattribute
- attribute to remove- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place
-
removeAttribute
Description copied from interface:AttributesManagerImplApi
Unset particular attribute for the group.- Specified by:
removeAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessiongroup
- remove attribute from this groupattribute
- attribute to remove- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place
-
removeAttribute
Description copied from interface:AttributesManagerImplApi
Unset particular attribute for the resource.- Specified by:
removeAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionresource
- remove attribute from this resourceattribute
- attribute to remove- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place
-
removeAttribute
public boolean removeAttribute(PerunSession sess, Member member, Resource resource, AttributeDefinition attribute) Description copied from interface:AttributesManagerImplApi
Unset particular member-resorce attribute for the member on the resource.- Specified by:
removeAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionmember
- remove attribute from this memberresource
- remove attributes for this resourceattribute
- attribute to remove- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place
-
removeAttribute
public boolean removeAttribute(PerunSession sess, Member member, Group group, AttributeDefinition attribute) Description copied from interface:AttributesManagerImplApi
Unset particular attribute for the member in the group. Core attributes can't be removed this way.- Specified by:
removeAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionmember
- remove attribute from this membergroup
- remove attributes for this groupattribute
- attribute to remove- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place
-
removeAttribute
Description copied from interface:AttributesManagerImplApi
Unset particular member attribute- Specified by:
removeAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionattribute
- attribute to remove- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place
-
removeAttribute
public boolean removeAttribute(PerunSession sess, Facility facility, User user, AttributeDefinition attribute) Description copied from interface:AttributesManagerImplApi
Unset particular user-facility attribute- Specified by:
removeAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionattribute
- attribute to remove- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place
-
removeAttribute
Description copied from interface:AttributesManagerImplApi
Unset particular user attribute- Specified by:
removeAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionattribute
- attribute to remove- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place
-
removeAttribute
Description copied from interface:AttributesManagerImplApi
Unset particular host attribute- Specified by:
removeAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionattribute
- attribute to remove- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place
-
removeAttribute
public boolean removeAttribute(PerunSession sess, Resource resource, Group group, AttributeDefinition attribute) Description copied from interface:AttributesManagerImplApi
Unset particular group_resource attribute- Specified by:
removeAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionresource
- resourcegroup
- groupattribute
- attribute to remove- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place
-
removeAttribute
Description copied from interface:AttributesManagerImplApi
Unset particular user external source attribute- Specified by:
removeAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionattribute
- attribute to remove- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place
-
removeAttributeModule
Description copied from interface:AttributesManagerImplApi
Remove attribute module from attribute module map in Impl layer.- Specified by:
removeAttributeModule
in interfaceAttributesManagerImplApi
- Parameters:
module
- module to remove- See Also:
-
removeVirtualAttribute
public boolean removeVirtualAttribute(PerunSession sess, Facility facility, User user, AttributeDefinition attribute) Description copied from interface:AttributesManagerImplApi
Unset particular user-facility virtual attribute value.- Specified by:
removeVirtualAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionattribute
- attribute to remove- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place
-
removeVirtualAttribute
public boolean removeVirtualAttribute(PerunSession sess, Resource resource, AttributeDefinition attribute) throws WrongAttributeValueException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApi
Unset particular resource virtual attribute value.- Specified by:
removeVirtualAttribute
in interfaceAttributesManagerImplApi
- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place- Throws:
WrongAttributeValueException
WrongReferenceAttributeValueException
-
removeVirtualAttribute
public boolean removeVirtualAttribute(PerunSession sess, Resource resource, Group group, AttributeDefinition attribute) Description copied from interface:AttributesManagerImplApi
Unset particular group-resource virtual attribute value.- Specified by:
removeVirtualAttribute
in interfaceAttributesManagerImplApi
- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place
-
setAttribute
public boolean setAttribute(PerunSession sess, Object object, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException Description copied from interface:AttributesManagerImplApi
Store the particular attribute associated with the given perun bean. If an attribute is core attribute then the attribute isn't stored (It's skkiped whithout any notification).- Specified by:
setAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionobject
- object of setting the attribute, must be one of perunBean or stringattribute
- attribute to set- Returns:
- true if new value differs from old value (i.e. values changed) false otherwise (value do not change)
- Throws:
WrongAttributeAssignmentException
- if the namespace of the attribute does not match the perunBeanWrongAttributeValueException
-
setAttribute
public boolean setAttribute(PerunSession sess, PerunBean bean1, PerunBean bean2, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException Description copied from interface:AttributesManagerImplApi
Store the particular attribute associated with the bean1 and bean2. If an attribute is core attribute then the attribute isn't stored (It's skkiped whithout any notification).- Specified by:
setAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionbean1
- first perun beanbean2
- second perun beanattribute
- attribute to set- Returns:
- true if new value differs from old value (i.e. values changed) false otherwise (value do not change)
- Throws:
WrongAttributeAssignmentException
WrongAttributeValueException
-
setAttributeActionCriticality
public void setAttributeActionCriticality(PerunSession sess, AttributeDefinition attr, AttributeAction action, boolean critical, boolean global) throws RelationExistsException, RelationNotExistsException Description copied from interface:AttributesManagerImplApi
Marks the action on attribute as critical, which may require additional authentication of user performing that action on attribute.- Specified by:
setAttributeActionCriticality
in interfaceAttributesManagerImplApi
- Parameters:
sess
- sessionattr
- attribute definitionaction
- critical actioncritical
- true if action should be set critical, false to non-criticalglobal
- true if action should be globally critical, false if action should be critical only for critical objects- Throws:
RelationExistsException
- if trying to mark already critical actionRelationNotExistsException
- if trying to unmark not critical action
-
setAttributePolicyCollections
public void setAttributePolicyCollections(PerunSession sess, List<AttributePolicyCollection> policyCollections) Description copied from interface:AttributesManagerImplApi
Deletes old attribute policy collections and sets all new attribute policy collections.- Specified by:
setAttributePolicyCollections
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionpolicyCollections
- list of policy collections to set
-
setAttributeRight
Deprecated.Description copied from interface:AttributesManagerImplApi
Sets attribute right given as a parameter. The method sets the rights for attribute and role exactly as it is given in the list of action types. That means it can remove a right, if the right is missing in the list. Info: If there is role VoAdmin in the list, use it for setting also VoObserver rights (only for read) automatic- Specified by:
setAttributeRight
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionrights
- attribute right
-
setAttributeWithNullValue
Description copied from interface:AttributesManagerImplApi
Set entityless attribute with null value (for key and attribute). Shouldn't be called from upper layer !!!- Specified by:
setAttributeWithNullValue
in interfaceAttributesManagerImplApi
key
- key for storing entityless attributeattribute
- attribute to set- Returns:
- true if insert is ok
-
setAttributeWithNullValue
Description copied from interface:AttributesManagerImplApi
Set user attribute with null value (for user and attribute). Shouldn't be called from upper layer !!!- Specified by:
setAttributeWithNullValue
in interfaceAttributesManagerImplApi
userId
- ID of User to store attribute forattribute
- attribute to set- Returns:
- true if insert is ok
-
setPerun
-
setSelf
-
setVirtualAttribute
public boolean setVirtualAttribute(PerunSession sess, Facility facility, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApi
Store the particular virtual attribute associated with the facility.- Specified by:
setVirtualAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionattribute
- attribute to set- Returns:
- true if attribute was really changed
- Throws:
WrongReferenceAttributeValueException
-
setVirtualAttribute
public boolean setVirtualAttribute(PerunSession sess, Resource resource, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApi
Store the particular virtual attribute associated with the resource.- Specified by:
setVirtualAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionattribute
- attribute to set- Returns:
- true if attribute was really changed
- Throws:
WrongReferenceAttributeValueException
-
setVirtualAttribute
Description copied from interface:AttributesManagerImplApi
Store the particular virtual attribute associated with the group.- Specified by:
setVirtualAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionattribute
- attribute to set- Returns:
- true if attribute was really changed
-
setVirtualAttribute
public boolean setVirtualAttribute(PerunSession sess, Facility facility, User user, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApi
Store the particular virtual attribute associated with the facility and user combination.- Specified by:
setVirtualAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionattribute
- attribute to set- Returns:
- true if attribute was really changed
- Throws:
WrongReferenceAttributeValueException
-
setVirtualAttribute
public boolean setVirtualAttribute(PerunSession sess, Resource resource, Group group, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApi
Store the particular virtual attribute associated with the resource and group combination.- Specified by:
setVirtualAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionattribute
- attribute to set- Returns:
- true if attribute was really changed
- Throws:
WrongReferenceAttributeValueException
-
setVirtualAttribute
public boolean setVirtualAttribute(PerunSession sess, Member member, Group group, Attribute attribute) Description copied from interface:AttributesManagerImplApi
Store the particular virtual attribute associated with the member and group combination.- Specified by:
setVirtualAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionmember
- member to set ongroup
- group to set onattribute
- attribute to set- Returns:
- true if attribute was really changed
-
setVirtualAttribute
Description copied from interface:AttributesManagerImplApi
Store the particular virtual attribute associated with the member.- Specified by:
setVirtualAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionattribute
- attribute to set- Returns:
- true if attribute was really changed
-
setVirtualAttribute
Description copied from interface:AttributesManagerImplApi
Store the particular virtual attribute associated with the user.- Specified by:
setVirtualAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionattribute
- attribute to set- Returns:
- true if attribute was really changed
-
setVirtualAttribute
Description copied from interface:AttributesManagerImplApi
Store the particular virtual attribute associated with the user external source.- Specified by:
setVirtualAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionattribute
- attribute to set- Returns:
- true if attribute was really changed
-
unregisterAttributeModule
Description copied from interface:AttributesManagerImplApi
Unregister attribute module in Auditer from message listening (if it is not there yet).- Specified by:
unregisterAttributeModule
in interfaceAttributesManagerImplApi
- Parameters:
module
- module to unregister- See Also:
-
updateAttribute
public boolean updateAttribute(PerunSession sess, Attribute attribute, String tableName, List<String> columnNames, List<Object> columnValues) Description copied from interface:AttributesManagerImplApi
Update attribute value in DB.- Specified by:
updateAttribute
in interfaceAttributesManagerImplApi
- Parameters:
sess
- perun sessionattribute
- that will be stored in the DBtableName
- in the database for updatingcolumnNames
- of the database table in which the attribute will be writtencolumnValues
- of the objects, for which the attribute will be written, corresponding to the columnNames- Returns:
- true if new value differs from old value (i.e. values changed) false otherwise (value do not change)
-
updateAttributeDefinition
public AttributeDefinition updateAttributeDefinition(PerunSession perunSession, AttributeDefinition attributeDefinition) Description copied from interface:AttributesManagerImplApi
Updates AttributeDefinition.- Specified by:
updateAttributeDefinition
in interfaceAttributesManagerImplApi
- Returns:
- returns updated attributeDefinition
-