Interface AttributesManagerImplApi
- All Known Implementing Classes:
AttributesManagerImpl
public interface AttributesManagerImplApi
- Author:
- Michal Prochazka invalid input: '<'michalp@ics.muni.cz>, Slavek Licehammer invalid input: '<'glory@ics.muni.cz>
-
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
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
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, 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
deleteAttribute
(PerunSession sess, AttributeDefinition attribute) Deletes the attribute.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.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 attributeModule 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 resourceToGetServicesFrom, Facility facility) Get facility attributes which are required by services.getRequiredAttributes
(PerunSession sess, Resource resourceToGetServicesFrom, 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 resourceToGetServicesFrom, 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 attribute) 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 session, 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.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).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.
-
Method Details
-
attributeExists
Check if attribute exists in underlaying data source.- Parameters:
sess
- perun sessionattribute
- attribute to check- Returns:
- true if attribute exists in underlaying data source, false othewise
- Throws:
InternalErrorException
- if unexpected error occured
-
changedAttributeHook
If you need to do some further work with other modules, this method do that- Parameters:
sess
- perun sessionfacility
-attribute
-- Throws:
InternalErrorException
-
changedAttributeHook
If you need to do some further work with other modules, this method do that- Parameters:
sess
- perun sessionkey
-attribute
-- Throws:
InternalErrorException
-
changedAttributeHook
If you need to do some further work with other modules, this method do that- Parameters:
sess
-vo
-attribute
-- Throws:
InternalErrorException
-
changedAttributeHook
If you need to do some further work with other modules, this method do that- Parameters:
sess
-host
-attribute
-- Throws:
InternalErrorException
-
changedAttributeHook
void changedAttributeHook(PerunSession sess, Group group, Attribute attribute) throws WrongReferenceAttributeValueException If you need to do some further work with other modules, this method do that- Parameters:
sess
-group
-attribute
-- Throws:
InternalErrorException
WrongReferenceAttributeValueException
-
changedAttributeHook
void changedAttributeHook(PerunSession sess, User user, Attribute attribute) throws WrongReferenceAttributeValueException If you need to do some further work with other modules, this method do that- Parameters:
sess
-user
-attribute
-- Throws:
InternalErrorException
WrongReferenceAttributeValueException
-
changedAttributeHook
void changedAttributeHook(PerunSession sess, Member member, Attribute attribute) throws WrongReferenceAttributeValueException If you need to do some further work with other modules, this method do that- Parameters:
sess
-member
-attribute
-- Throws:
InternalErrorException
WrongReferenceAttributeValueException
-
changedAttributeHook
If you need to do some further work with other modules, this method do that- Parameters:
sess
-resource
-group
-attribute
-- Throws:
InternalErrorException
-
changedAttributeHook
void changedAttributeHook(PerunSession sess, Resource resource, Attribute attribute) throws WrongReferenceAttributeValueException If you need to do some further work with other modules, this method do that- Parameters:
sess
-resource
-attribute
-- Throws:
InternalErrorException
WrongReferenceAttributeValueException
-
changedAttributeHook
void changedAttributeHook(PerunSession sess, Member member, Resource resource, Attribute attribute) throws WrongReferenceAttributeValueException If you need to do some further work with other modules, this method do that- Parameters:
sess
-member
-resource
-attribute
-- Throws:
InternalErrorException
WrongReferenceAttributeValueException
-
changedAttributeHook
If you need to do some further work with other modules, this method do that- Parameters:
sess
-member
-group
-attribute
-- Throws:
InternalErrorException
-
changedAttributeHook
If you need to do some further work with other modules, this method do that- Parameters:
sess
-facility
-user
-attribute
-- Throws:
InternalErrorException
-
changedAttributeHook
If you need to do some further work with other modules, this method do that- Parameters:
sess
-ues
-attribute
-- Throws:
InternalErrorException
-
checkAttributeExists
void checkAttributeExists(PerunSession sess, AttributeDefinition attribute) throws AttributeNotExistsException Check if attribute exists in underlaying data source.- Parameters:
sess
- perun sessionattribute
- attribute to check- Throws:
InternalErrorException
- if unexpected error occuredAttributeNotExistsException
- if attribute doesn';t exists
-
checkAttributeSemantics
void checkAttributeSemantics(PerunSession sess, Facility facility, Attribute attribute) throws WrongReferenceAttributeValueException Check if value of this facility attribute has valid semantics.- Parameters:
sess
- perun sessionfacility
- facility for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
void checkAttributeSemantics(PerunSession sess, Vo vo, Attribute attribute) throws WrongReferenceAttributeValueException, WrongAttributeAssignmentException Check if value of this vo attribute has valid semantics.- Parameters:
sess
- perun sessionvo
- vo for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semanticsWrongAttributeAssignmentException
-
checkAttributeSemantics
void checkAttributeSemantics(PerunSession sess, Group group, Attribute attribute) throws WrongReferenceAttributeValueException Check if value of this group attribute has valid semantics.- Parameters:
sess
- perun sessiongroup
- group for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
void checkAttributeSemantics(PerunSession sess, Resource resource, Attribute attribute) throws WrongReferenceAttributeValueException Check if value of this resource attribute has valid semantics.- Parameters:
sess
- perun sessionresource
- resource for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
void checkAttributeSemantics(PerunSession sess, Member member, Resource resource, Attribute attribute) throws WrongReferenceAttributeValueException Check if value of this member-resource attribute has valid semantics.- Parameters:
sess
- perun sessionmember
- member for which (and for specified resource) you want to check validity of attributeresource
- resource for which (and for specified member) you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
Check if value of this member-group attribute has valid semantics.- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
checkAttributeSemantics
void checkAttributeSemantics(PerunSession sess, Facility facility, User user, Attribute attribute) throws WrongReferenceAttributeValueException Check if value of this user-facility attribute has valid semantics.- Parameters:
sess
- perun sessionfacility
- facility for which (and for specified user) you want to check validity of attributeuser
- user for which (and for specified facility) you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
void checkAttributeSemantics(PerunSession sess, User user, Attribute attribute) throws WrongReferenceAttributeValueException Check if value of this user attribute has valid semantics.- Parameters:
sess
- perun sessionuser
- user for which (and for specified facility) you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
void checkAttributeSemantics(PerunSession sess, Member member, Attribute attribute) throws WrongReferenceAttributeValueException Check if value of this member attribute has valid semantics.- Parameters:
sess
- perun sessionmember
- member for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
Check if value of this host attribute has valid semantics.- Parameters:
sess
- perun sessionhost
- host for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
checkAttributeSemantics
void checkAttributeSemantics(PerunSession sess, Resource resource, Group group, Attribute attribute) throws WrongReferenceAttributeValueException Check if value of this group-resource attribute has valid semantics.- Parameters:
sess
- perun sessionresource
- resource for which (and for specified group) you want to check validity of attributegroup
- group for which (and for specified member) you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
void checkAttributeSemantics(PerunSession sess, String key, Attribute attribute) throws WrongReferenceAttributeValueException Check if value of this entityless attribute has valid semantics.- Parameters:
sess
- perun sessionkey
- key for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongReferenceAttributeValueException
- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
Check if value of this user external source attribute has valid semantics.- Parameters:
sess
- perun sessionues
- user external source for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, Facility facility, Attribute attribute) throws WrongAttributeValueException Check if value of this facility attribute has valid syntax.- Parameters:
sess
- perun sessionfacility
- facility for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, Vo vo, Attribute attribute) throws WrongAttributeValueException Check if value of this vo attribute has valid syntax.- Parameters:
sess
- perun sessionvo
- vo for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, Group group, Attribute attribute) throws WrongAttributeValueException Check if value of this group attribute has valid syntax.- Parameters:
sess
- perun sessiongroup
- group for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, Resource resource, Attribute attribute) throws WrongAttributeValueException Check if value of this resource attribute has valid syntax.- Parameters:
sess
- perun sessionresource
- resource for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, Member member, Resource resource, Attribute attribute) throws WrongAttributeValueException Check if value of this member-resource attribute has valid syntax.- Parameters:
sess
- perun sessionmember
- member for which (and for specified resource) you want to check validity of attributeresource
- resource for which (and for specified member) you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, Member member, Group group, Attribute attribute) throws WrongAttributeValueException Check if value of this member-group attribute has valid syntax.- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, Facility facility, User user, Attribute attribute) throws WrongAttributeValueException Check if value of this user-facility attribute has valid syntax.- Parameters:
sess
- perun sessionfacility
- facility for which (and for specified user) you want to check validity of attributeuser
- user for which (and for specified facility) you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, User user, Attribute attribute) throws WrongAttributeValueException Check if value of this user attribute has valid syntax.- Parameters:
sess
- perun sessionuser
- user for which (and for specified facility) you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, Member member, Attribute attribute) throws WrongAttributeValueException Check if value of this member attribute has valid syntax.- Parameters:
sess
- perun sessionmember
- member for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, Host host, Attribute attribute) throws WrongAttributeValueException Check if value of this host attribute has valid syntax.- Parameters:
sess
- perun sessionhost
- host for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, Resource resource, Group group, Attribute attribute) throws WrongAttributeValueException Check if value of this group-resource attribute has valid syntax.- Parameters:
sess
- perun sessionresource
- resource for which (and for specified group) you want to check validity of attributegroup
- group for which (and for specified resource) you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, String key, Attribute attribute) throws WrongAttributeValueException Check if value of this entityless attribute has valid syntax.- Parameters:
sess
- perun sessionkey
- key for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
void checkAttributeSyntax(PerunSession sess, UserExtSource ues, Attribute attribute) throws WrongAttributeValueException Check if value of this user external source attribute has valid syntax.- Parameters:
sess
- perun sessionues
- user external source for which you want to check validity of attributeattribute
- attribute to check- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeValueException
- if the attribute value has wrong/illegal syntax
-
checkAttributesExists
void checkAttributesExists(PerunSession sess, List<? extends AttributeDefinition> attributes) throws AttributeNotExistsException Batch version of checkAttributeExists- Throws:
AttributeNotExistsException
-
checkNamespace
void checkNamespace(PerunSession sess, AttributeDefinition attribute, String namespace) throws WrongAttributeAssignmentException Determine if attribute is from specified namespace.- Parameters:
sess
-attribute
-namespace
-- Throws:
WrongAttributeAssignmentException
- if the attribute isn't from specified namespace
-
checkNamespace
void checkNamespace(PerunSession sess, List<? extends AttributeDefinition> attributes, String namespace) throws WrongAttributeAssignmentException Determine if attributes are from specified namespace.- Parameters:
sess
-attributes
-namespace
-- Throws:
WrongAttributeAssignmentException
- if any of the attribute isn't from specified namespace
-
convertAttributeValuesToNonunique
Deletes all values of the attribute from table _attr_u_values which has unique constraint. And returns how many rows were deleted. -
convertAttributeValuesToUnique
Copies all values of the attribute to table _attr_u_values which has unique constraint. -
createAttribute
AttributeDefinition createAttribute(PerunSession sess, AttributeDefinition attribute) throws AttributeDefinitionExistsException Creates an attribute, the attribute is stored into the appropriate DB table according to the namespace.- Parameters:
sess
-attribute
- attribute to create- Returns:
- attribute with set id
- Throws:
AttributeDefinitionExistsException
- if attribute already existsInternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
decorateMembersWithDefOptMemberAttributes
List<RichMember> decorateMembersWithDefOptMemberAttributes(PerunSession sess, List<RichMember> members, List<String> memberAttrNames) Appends each member with the member attributes (only def and opt) named in the memberAttrNames list if the value of the attribute for the given member is found in the database.- Parameters:
sess
- perun sessionmembers
- to decorate with the given member attributesmemberAttrNames
- list of the member attribute names- Returns:
- the original list of RichMembers with added member attributes
- Throws:
InternalErrorException
- if RuntimeErrorException has been thrown
-
decorateMembersWithDefOptUserAttributes
List<RichMember> decorateMembersWithDefOptUserAttributes(PerunSession sess, List<RichMember> members, List<String> userAttrNames) Appends each member with the user attributes (only def and opt) named in the userAttrNames list if the value of the attribute for the given member(user) is found in the database.- Parameters:
sess
- perun sessionmembers
- to decorate with the given user attributesuserAttrNames
- list of the user attribute names- Returns:
- the original list of RichMembers with added user attributes
- Throws:
InternalErrorException
- if RuntimeErrorException has been thrown
-
deleteAttribute
Deletes the attribute. Definition and all values.- Parameters:
sess
-attribute
- attribute to delete- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
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' -
fillAttribute
This method try to fill a value of the resource attribute. Value may be copied from some facility attribute.- Parameters:
sess
- perun sessionresource
- resource, attribute of which you want to fillattribute
- attribute to fill. If attributes already have set value, this value won't be owerwriten. This means the attribute value must be empty otherwise this method won't fill it.- Returns:
- attribute which MAY have filled value
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
fillAttribute
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.- 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
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
fillAttribute
This method tries to fill value of the member-group attribute. This value is automatically generated, but not all attributes can be filled this way.- Parameters:
sess
- perun sessionmember
- attribute of this member (and group) you want to fillgroup
- attribute of this group you want to fillattribute
- attribute to fill. If attributes already have set value, this value won't be overwritten. This means the attribute value must be empty otherwise this method won't fill it.- Returns:
- attribute which MAY have filled value
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
fillAttribute
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.- 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
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
fillAttribute
This method try to fill value of the user attribute. This value is automatically generated, but not all atrributes can be filled this way.- Parameters:
sess
- perun sessionuser
- attribute of this user (and facility) and you want to fillattribute
- attribute to fill. If attributes already have set value, this value won't be owerwriten. This means the attribute value must be empty otherwise this method won't fill it.- Returns:
- attribute which MAY have filled value
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
fillAttribute
This method try to fill value of the member attribute. This value is automatically generated, but not all atrributes can be filled this way.- 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
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
fillAttribute
-
fillAttribute
-
fillAttribute
-
fillAttribute
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.- 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
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAllAttributesStartWithNameWithoutNullValue
List<Attribute> getAllAttributesStartWithNameWithoutNullValue(PerunSession sess, Group group, String startPartOfName) Get all non-empty attributes associated with the group starts with name startPartOfName. Get only nonvirtual attributes with NotNull value.PRIVILEGE: Get only those attributes the principal has access to.
- Parameters:
sess
- perun sessiongroup
- to get the attributes fromstartPartOfName
- attribute name start with this part- Returns:
- list of attributes which name start with startPartOfName
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAllAttributesStartWithNameWithoutNullValue
List<Attribute> getAllAttributesStartWithNameWithoutNullValue(PerunSession sess, Resource resource, String startPartOfName) Get all non-empty attributes associated with the resource starts with name startPartOfName. Get only nonvirtual attributes with notNull value.PRIVILEGE: Get only those attributes the principal has access to.
- Parameters:
sess
- perun sessionresource
- to get the attributes fromstartPartOfName
- attribute name start with this part- Returns:
- list of attributes which name start with startPartOfName
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAllGroupResourceValues
Get all values for specified group-resource attribute. Atibute can't be core or virt.- Parameters:
sess
-attributeDefinition
- attribute definition, namespace group-resource- Returns:
- Throws:
InternalErrorException
-
getAllGroupValues
Get all values for specified group attribute. Atibute can't be core or virt.- Parameters:
sess
-attributeDefinition
- attribute definition, namespace group- Returns:
- Throws:
InternalErrorException
-
getAllNamespaces
Returns list of all possible namespaces.- Parameters:
sess
- session- Returns:
- list of namespaces
-
getAllResourceValues
Get all values for specified resource attribute. Atibute can't be core or virt.- Parameters:
sess
-attributeDefinition
- attribute definition, namespace resource- Returns:
- Throws:
InternalErrorException
-
getAllSimilarAttributeNames
This method get all similar attr_names which start with partOfAttributeName- Parameters:
sess
-startingPartOfAttributeName
- is something like: urn:perun:user_facility:attribute-def:def:login-namespace:- Returns:
- list of similar attribute names like: urn:perun:user_facility:attribute-def:def:login-namespace:cesnet etc.
- Throws:
InternalErrorException
AttributeNotExistsException
-
getAllUserFacilityRichAttributes
Get all non-empty attributes associated with the user on the all facilities. This method doesn't use cache.- Parameters:
sess
- perun sessionuser
-- Returns:
- list of attributes
- Throws:
InternalErrorException
-
getAllUserValues
Get all values for specified user attribute. Atibute can't be core or virt.- Parameters:
sess
-attributeDefinition
- attribute definition, namespace user- Returns:
- Throws:
InternalErrorException
-
getAnonymizedValue
Attribute getAnonymizedValue(PerunSession sess, User user, Attribute attribute) throws AnonymizationNotSupportedException Gets anonymized value of the attribute.- Parameters:
sess
- perun sessionuser
- userattribute
- attribute to get anonymized value from- Returns:
- attribute with anonymized value
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAnonymizationNotSupportedException
- if the module doesn't exist or it doesn't implement this method
-
getAppFormItemsForAppFormAndAttribute
List<String> getAppFormItemsForAppFormAndAttribute(PerunSession sess, int appFormId, AttributeDefinition attr) Returns list of app form items' shortnames for which the given attribute is a source or a destination attribute in the given application form- Parameters:
sess
- sessionappFormId
- id of application formattr
- attribute definition- Returns:
- list of shortnames
-
getAppFormsWhereAttributeRelated
Returns all application forms where the given attribute definition is a source or a destination attribute for any application from item- Parameters:
sess
- sessionattr
- attribute definition- Returns:
- list of application forms where the given attribute definition has relation to any application form item
-
getAttribute
Attribute getAttribute(PerunSession sess, Facility facility, String attributeName) throws AttributeNotExistsException Get particular attribute for the facility.- Parameters:
facility
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttribute
Attribute getAttribute(PerunSession sess, Vo vo, String attributeName) throws AttributeNotExistsException Get particular attribute for the vo.- Parameters:
vo
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttribute
Attribute getAttribute(PerunSession sess, Group group, String attributeName) throws AttributeNotExistsException Get particular attribute for the group.- Parameters:
group
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttribute
Attribute getAttribute(PerunSession sess, Resource resource, String attributeName) throws AttributeNotExistsException Get particular attribute for the resource.- Parameters:
resource
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttribute
Attribute getAttribute(PerunSession sess, Member member, Resource resource, String attributeName) throws AttributeNotExistsException Get particular attribute for the member on this resource.- Parameters:
member
- to get attribute fromresource
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttribute
Attribute getAttribute(PerunSession sess, Member member, Group group, String attributeName) throws AttributeNotExistsException Get particular attribute for the member in this group.- Parameters:
sess
- perun sessionmember
- to get attribute fromgroup
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlying data source
-
getAttribute
Attribute getAttribute(PerunSession sess, Member member, String attributeName) throws AttributeNotExistsException Get particular attribute for the member.- Parameters:
member
- to get attribute fromattributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttribute
Attribute getAttribute(PerunSession sess, Facility facility, User user, String attributeName) throws AttributeNotExistsException Get particular attribute for the user on this facility.- Parameters:
attributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttribute
Attribute getAttribute(PerunSession sess, User user, String attributeName) throws AttributeNotExistsException Get particular attribute for the user.- Parameters:
sess
-user
-attributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttribute
Attribute getAttribute(PerunSession sess, Host host, String attributeName) throws AttributeNotExistsException - Throws:
AttributeNotExistsException
-
getAttribute
Attribute getAttribute(PerunSession sess, Resource resource, Group group, String attributeName) throws AttributeNotExistsException - Throws:
AttributeNotExistsException
-
getAttribute
Attribute getAttribute(PerunSession sess, String key, String attributeName) throws AttributeNotExistsException Get particular entityless attribute- Parameters:
sess
- perun sessionkey
- key to get attribute forattributeName
-- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttribute
Attribute getAttribute(PerunSession sess, UserExtSource ues, String attributeName) throws AttributeNotExistsException Get particular attribute for the User External Source.- Parameters:
sess
-ues
-attributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
Attribute getAttributeById(PerunSession sess, Facility facility, int id) throws AttributeNotExistsException Get particular attribute for the facility.- Parameters:
facility
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
Get particular attribute for the vo.- Parameters:
vo
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
Attribute getAttributeById(PerunSession sess, Resource resource, int id) throws AttributeNotExistsException Get particular attribute for the resource.- Parameters:
resource
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
Attribute getAttributeById(PerunSession sess, Member member, Resource resource, int id) throws AttributeNotExistsException Get particular attribute for the member on this resource.- Parameters:
member
- to get attribute fromresource
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
Attribute getAttributeById(PerunSession sess, Member member, Group group, int id) throws AttributeNotExistsException Get particular attribute for the member in this group.- Parameters:
sess
- perun sessionmember
- to get attribute fromgroup
- to get attribute fromid
- attribute id- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlying data source
-
getAttributeById
Attribute getAttributeById(PerunSession sess, Member member, int id) throws AttributeNotExistsException Get particular attribute for the member.- Parameters:
sess
-member
-id
- attribute id- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
Attribute getAttributeById(PerunSession sess, Facility facility, User user, int id) throws AttributeNotExistsException Get particular attribute for the user on this facility.- Parameters:
sess
-facility
-user
-id
- attribute id- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
Get particular attribute for the user.- Parameters:
sess
-user
-id
- attribute id- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
- Throws:
AttributeNotExistsException
-
getAttributeById
Attribute getAttributeById(PerunSession sess, Resource resource, Group group, int id) throws AttributeNotExistsException - Throws:
AttributeNotExistsException
-
getAttributeById
Attribute getAttributeById(PerunSession sess, Group group, int id) throws AttributeNotExistsException - Throws:
AttributeNotExistsException
-
getAttributeById
Attribute getAttributeById(PerunSession sess, UserExtSource ues, int id) throws AttributeNotExistsException Get particular attribute for the user external source.- Parameters:
sess
-ues
-id
- attribute id- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttributeDefinition
AttributeDefinition getAttributeDefinition(PerunSession sess, String attributeName) throws AttributeNotExistsException Get attributes definition (attribute without defined value).- Parameters:
attributeName
- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttributeDefinitionById
AttributeDefinition getAttributeDefinitionById(PerunSession sess, int id) throws AttributeNotExistsException Get attibute definition (attribute without defined value).- Parameters:
id
- attribute id- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlaying data source
-
getAttributePolicyCollections
Gets attribute policy collections for an attribute definition with given id.- Parameters:
sess
- perun sessionattributeId
- id of the attribute definition- Returns:
- all policy collections of the attribute definition
- Throws:
InternalErrorException
-
getAttributes
Get all non-empty attributes associated with the facility.- Parameters:
sess
- perun sessionfacility
- facility to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all attributes associated with the facility which have name in list attrNames (empty too). Virtual attribute too.- Parameters:
sess
- perun sessionfacility
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all non-empty attributes associated with the vo.- Parameters:
sess
- perun sessionvo
- vo to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all non-empty attributes associated with the group.- Parameters:
sess
- perun sessiongroup
- group to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all non-empty attributes associated with the resource.- Parameters:
sess
- perun sessionresource
- resource to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all non-empty attributes associated with the member on the resource.- Parameters:
sess
- perun sessionmember
- to get the attributes fromresource
- to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all non-empty, non-virtual attributes associated with the member in the group.- Parameters:
sess
- perun sessionmember
- to get the attributes fromgroup
- group to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
List<Attribute> 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.- Parameters:
sess
- perun sessionmember
- to get the attributes fromgroup
- group to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
List<Attribute> 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.- Parameters:
sess
- perun sessionmember
- to get the attributes fromresource
- resource to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
List<Attribute> 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.- 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
- Throws:
InternalErrorException
-
getAttributes
List<Attribute> 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.- Parameters:
sess
- perun sessionuser
- to get the attributes fromfacility
- facility to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all non-empty attributes associated with the member.- Parameters:
sess
- perun sessionmember
- member to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all attributes associated with the vo which have name in list attrNames (empty and virtual too).- Parameters:
sess
- perun sessionvo
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all attributes associated with the member which have name in list attrNames (empty and virtual too).- Parameters:
sess
- perun sessionmember
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all attributes associated with the group which have name in list attrNames (empty too).- Parameters:
sess
- perun sessiongroup
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raises in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all attributes associated with the resource which have name in list attrNames (empty too).- Parameters:
sess
- perun sessionresource
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raises in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all attributes associated with the UserExtSource which have name in list attrNames (empty and virtual too).- Parameters:
sess
- perun sessionues
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
Get all non-empty attributes associated with the user on the facility.- Parameters:
sess
- perun sessionfacility
-user
-- Returns:
- list of attributes
- Throws:
InternalErrorException
-
getAttributes
Get all entiteless attributes with subject equaled String key- Parameters:
sess
-key
-- Returns:
- Throws:
InternalErrorException
-
getAttributes
Get all non-empty attributes associated with the user.- Parameters:
sess
- perun sessionuser
-- Returns:
- list of attributes
- Throws:
InternalErrorException
-
getAttributes
Get all attributes associated with the user which have name in list attrNames (empty and virtual too).- Parameters:
sess
- perun sessionuser
- to get the attributes fromattrNames
- list of attributes' names- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributes
-
getAttributes
Get all attributes associated with the host which have name in list attrNames (empty and virtual too). Empty list attrNames will return no attributes.- Parameters:
sess
- perun sessionhost
- host to get attributes forattrNames
- list of attributes' names- Returns:
- list of attributes
-
getAttributes
-
getAttributes
Get all non-empty attributes associated with the UserExtSource.- Parameters:
sess
- perun sessionues
- to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
-
getAttributesByAttributeDefinition
List<Attribute> getAttributesByAttributeDefinition(PerunSession sess, AttributeDefinition attributeDefinition) Returns all attributes with not-null value which fits the attributeDefinition. Can't process core or virtual attributes.- Parameters:
sess
-attributeDefinition
-- Returns:
- list of attributes
- Throws:
InternalErrorException
-
getAttributesDefinition
Get attributes definition (attribute without defined value).- Returns:
- List of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributesDefinitionByNamespace
Get attributes definition (attribute without defined value) with specified namespace.- Parameters:
namespace
- get only attributes with this namespace- Returns:
- List of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getAttributesModule
Get the attributeModule for the attribute- Parameters:
attribute
- get the attribute module for this attribute- See Also:
-
getCriticalAttributeActions
Returns critical actions on given attribute.- Parameters:
sess
- sessionattrId
- attribute definition id- Returns:
- list of critical actions
-
getEntitylessAttrValueForUpdate
String getEntitylessAttrValueForUpdate(PerunSession sess, int attrId, String key) throws AttributeNotExistsException 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.
- Parameters:
sess
-attrId
-key
-- Returns:
- attr_value in string
- Throws:
InternalErrorException
- if runtime error exception has been thrownAttributeNotExistsException
- throw exception if attribute with value not exists in DB
-
getEntitylessAttributes
Get all entityless attributes with attributeName- Parameters:
sess
- perun sessionattrName
-- Returns:
- attribute
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getEntitylessKeys
Returns list of Keys which fits the attributeDefinition.- Parameters:
sess
-attributeDefinition
-- Returns:
- Throws:
InternalErrorException
-
getEntitylessStringAttributeMapping
Map<String,String> getEntitylessStringAttributeMapping(PerunSession sess, String attributeName) throws AttributeNotExistsException Gets map from keys to string values for an entityless attribute.- Parameters:
sess
- not usedattributeName
- full attribute name- Returns:
- unordered hashmap
- Throws:
AttributeNotExistsException
-
getPerunBeanIdsForUniqueAttributeValue
Set<Pair<Integer,Integer>> getPerunBeanIdsForUniqueAttributeValue(PerunSession sess, Attribute attribute) Finds ids of PerunBeans that have the attribute's value for the attribute.See
AttributesManagerBl.getPerunBeanIdsForUniqueAttributeValue(PerunSession, Attribute)
for details. -
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Facility facility) Get facility attributes which are required by services. Services are known from the resource.- Parameters:
sess
- perun sessionresourceToGetServicesFrom
- resource from which the services are takenfacility
- you get attributes for this facility- Returns:
- list of facility attributes which are required by services which are assigned to resource
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, Resource resource, List<Integer> serviceIds) Get resource attributes which are required by services.- Parameters:
sess
- perun sessionresource
-serviceIds
-- Returns:
- list of resource attributes which are required by services which are selceted
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Resource resource) Get resource attributes which are required by services. Services are known from the resourceToGetServicesFrom.- Parameters:
sess
- perun sessionresourceToGetServicesFrom
- resource from which the services are takenresource
- resource for which you want to get the attributes- Returns:
- list of resource attributes which are required by services which are assigned to resource.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member) Get member attributes which are required by services. Services are known from the resourceToGetServicesFrom.- Parameters:
sess
- perun sessionresourceToGetServicesFrom
- resource from which the services are takenmember
- you get attributes for this member- Returns:
- list of member attributes which are required by services which are assigned to resource.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Resource resource) Get member-resource attributes which are required by services. Services are known from the resourceToGetServicesFrom.- Parameters:
sess
- perun sessionresourceToGetServicesFrom
- resource from which the services are takenmember
- you get attributes for this 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.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Facility facility, User user) Get user-facility attributes which are required by services. Services are known from the resource.- Parameters:
sess
- perun sessionresourceToGetServicesFrom
- resource from which the services are takenfacility
- facility from which the services are takenuser
- you get attributes for this user- Returns:
- list of member-resource attributes which are required by services which are assigned to another resource.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
-
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, User user) Get user attributes which are required by services. Services are known from the resource.- Parameters:
sess
- perun sessionresourceToGetServicesFrom
-user
- you get attributes for this user- Returns:
- list of user attributes which are required by services which are assigned to resource.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Host host) -
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Group group) -
getRequiredAttributes
Get facility attributes which are required by all services which are connected to this facility.- Parameters:
sess
- perun sessionfacility
- you get attributes for this facility- Returns:
- list of facility attributes which are required by all services which are connected to this facility.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
Get facility attributes which are required by the service.- 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
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
Get vo attributes which are required by the service.- Parameters:
sess
- perun 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
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
Get resource attributes which are required by the service.- Parameters:
sess
- perun 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
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Member member, Resource resource) Get member-resource attributes which are required by the service.- Parameters:
sess
- perun sessionservice
- attribute required by this service you'll getmember
- you get attributes for this member and the resourceresource
- you get attributes for this resource and the member- Returns:
- list of attributes which are required by the service.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
HashMap<Member,List<Attribute>> getRequiredAttributes(PerunSession sess, Service service, Resource resource, List<Member> members) Get member-resource attributes which are required by service for each member in list of members.- 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
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
HashMap<Member,List<Attribute>> getRequiredAttributes(PerunSession sess, Resource resource, Service service, List<Member> members) Get member attributes which are required by service for each member in list of members.- 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
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
HashMap<User,List<Attribute>> getRequiredAttributes(PerunSession sess, Service service, Facility facility, List<User> users) Get user-facility attributes which are required by the service for each user in list of users.- 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
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
HashMap<User,List<Attribute>> getRequiredAttributes(PerunSession sess, Service service, List<User> users) Get user attributes which are required by the service for each user in list of users.- 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
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Member member, Group group) Get member-group attributes which are required by the service.- Parameters:
sess
- perun sessionservice
- attribute required by this service you'll getmember
- you get attributes for this member and the groupgroup
- you get attributes for this group in which member is associated- Returns:
- list of attributes which are required by the service.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
Map<Member,List<Attribute>> 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.- 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.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Group group) Get member-group attributes which are required by services. Services are known from the resourceToGetServicesFrom.- Parameters:
sess
- perun sessionresourceToGetServicesFrom
- resource from which the services are takenmember
- you get attributes for this 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.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
Get member attributes which are required by the service.- Parameters:
sess
- perun sessionservice
- attribute required by this service you'll getmember
-- Returns:
- list of attributes which are required by the service.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Facility facility, User user) Get user-facility attributes which are required by the service.- Parameters:
sess
- perun sessionservice
- attribute required by this service you'll getfacility
-user
-- Returns:
- list of attributes which are required by the service.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
Get user attributes which are required by the service.- Parameters:
sess
- perun sessionservice
- attribute required by this service you'll getuser
-- Returns:
- list of attributes which are required by the service.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributes
-
getRequiredAttributes
List<Attribute> getRequiredAttributes(PerunSession sess, List<Service> services, Resource resource, Group group) Get group-resource attributes which are required by the services.- Parameters:
sess
- sessionservices
- servicesresource
- resourcegroup
- group- Returns:
- list of attributes which are required by the service.
-
getRequiredAttributes
-
getRequiredAttributes
-
getRequiredAttributes
Get group attributes which are required by the given services.- Parameters:
sess
- sessionservices
- servicesgroup
- group- Returns:
- list of group attributes which are required by the given services
-
getRequiredAttributesDefinition
Get all attributes which are required by service. Required attribues are requisite for Service to run.- Parameters:
sess
- sessservice
- service from which the attributes will be listed- Returns:
- All attributes which are required by service.
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getRequiredAttributesForGroups
Map<Group,List<Attribute>> getRequiredAttributesForGroups(PerunSession sess, Service service, List<Group> groups) Get group attributes which are required by the given service for given groups.- Parameters:
sess
- sessionservice
- service for which are taken the required attributesgroups
- groups- Returns:
- attributes mapped by their groups
-
getResourceRequiredAttributesDefinition
List<AttributeDefinition> getResourceRequiredAttributesDefinition(PerunSession sess, Resource resource) Get attributes definions required by all services assigned on the resource.- Parameters:
sess
- perun sessionresource
-- Returns:
- attributes definions required by all services assigned on the resource.
- Throws:
InternalErrorException
-
getUninitializedAttributesModule
AttributesModuleImplApi getUninitializedAttributesModule(PerunSession sess, AttributeDefinition attribute) Get uninitiated attributeModule for the attribute- Parameters:
attribute
- get the attribute module for this attribute- See Also:
-
getUserAttrValueForUpdate
String getUserAttrValueForUpdate(PerunSession sess, int attrId, int userId) throws AttributeNotExistsException Get particular attribute for the user for update - locking the attribute for user.- Parameters:
sess
-attrId
-userId
-- Returns:
- attribute value
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionAttributeNotExistsException
- if the attribute doesn't exists in the underlying data source
-
getUserFacilityAttributesForAnyUser
Get all non-empty attributes associated with any user on the facility.- Parameters:
sess
- perun sessionfacility
-- Returns:
- list of attributes
- Throws:
InternalErrorException
-
getUserIdsByLogin
Gets IDs of users who use the given login in any namespace.- Parameters:
sess
- perun sessionlogin
- login- Returns:
- list of user IDs
-
getUserVirtualAttributeModule
UserVirtualAttributesModuleImplApi getUserVirtualAttributeModule(PerunSession sess, AttributeDefinition attribute) Get user virtual attribute module by the attribute.- Parameters:
sess
-attribute
- attribute for which you get the module- Returns:
- instance of user attribute module
- Throws:
InternalErrorException
WrongModuleTypeException
ModuleNotExistsException
-
getVirtualAttributes
Get all virtual attributes associated with the facility.- Parameters:
sess
- perun sessionfacility
- to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getVirtualAttributes
Get all virtual attributes associated with the member.- Parameters:
sess
- perun sessionmember
- to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getVirtualAttributes
Get all virtual attributes associated with the vo.- Parameters:
sess
- perun sessionvo
- to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getVirtualAttributes
Get all virtual attributes associated with the group.- Parameters:
sess
- perun sessiongroup
- to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getVirtualAttributes
Get all virtual attributes associated with the host.- Parameters:
sess
- perun sessionhost
- to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getVirtualAttributes
Get all virtual attributes associated with the resource.- Parameters:
sess
- perun sessionresource
- to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getVirtualAttributes
Get all virtual attributes associated with the member on the resource.- Parameters:
sess
- perun sessionmember
- to get the attributes fromresource
- to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getVirtualAttributes
Get all virtual attributes associated with the user on the facility.- Parameters:
sess
- perun sessionfacility
- to get the attributes fromuser
- to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getVirtualAttributes
Get all virtual attributes associated with the member in the group.- Parameters:
sess
- perun sessionmember
- to get the attributes fromgroup
- to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getVirtualAttributes
Get all virtual attributes associated with the user.- Parameters:
sess
- perun sessionuser
- to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
getVirtualAttributes
Get all virtual attributes associated with the UserExtSource.- Parameters:
sess
- perun sessionues
- to get the attributes from- Returns:
- list of attributes
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
initAndRegisterAttributeModules
void initAndRegisterAttributeModules(PerunSession session, ServiceLoader<AttributesModuleImplApi> modules, Set<AttributeDefinition> allAttributesDef) Init attribute modules map in Impl layer. And register them in Auditer for message listening.- Parameters:
modules
- List of attribute module class instances- See Also:
-
initAttributeModule
Add attribute module to attribute module map in Impl layer (if it is not there yet).- Parameters:
module
- module to add- See Also:
-
insertAttribute
boolean insertAttribute(PerunSession sess, Attribute attribute, String tableName, List<String> columnNames, List<Object> columnValues) Insert attribute value in DB.- 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
boolean isAttributeActionCritical(PerunSession sess, AttributeDefinition attr, AttributeAction action) Checks if the action is critical on given attribute.- Parameters:
sess
- sessionattr
- attribute definitionaction
- critical action- Returns:
- true if action is critical, false otherwise
-
isAttributeActionGloballyCritical
Checks if the action is critical on given attribute for all objects.- Parameters:
sess
- sessionattrId
- attribute definition idaction
- critical action- Returns:
- true if action is globally critical, false otherwise
-
isAttributeRequiredByFacility
boolean isAttributeRequiredByFacility(PerunSession sess, Facility facility, AttributeDefinition attributeDefinition) Check if this attribute is currently required on this facility. Attribute can be from any namespace.- Parameters:
sess
-facility
-attributeDefinition
-- Returns:
- Throws:
InternalErrorException
-
isAttributeRequiredByGroup
boolean isAttributeRequiredByGroup(PerunSession sess, Group group, AttributeDefinition attributeDefinition) Check if this attribute is currently required on this group. Attribute can be from any namespace.- Parameters:
sess
-group
-attributeDefinition
-- Returns:
- Throws:
InternalErrorException
-
isAttributeRequiredByResource
boolean isAttributeRequiredByResource(PerunSession sess, Resource resource, AttributeDefinition attributeDefinition) Check if this attribute is currently required on this resource. Attribute can be from any namespace.- Parameters:
sess
-resource
-attributeDefinition
-- Returns:
- Throws:
InternalErrorException
-
isAttributeRequiredByVo
Check if this attribute is currently required on this vo. Attribute can be from any namespace.- Parameters:
sess
-vo
-attributeDefinition
-- Returns:
- Throws:
InternalErrorException
-
isCoreAttribute
Determine if attribute is core attribute.- Parameters:
sess
-attribute
-- Returns:
- true if attribute is core attribute
-
isCoreManagedAttribute
Determine if attribute is core-managed attribute.- Parameters:
sess
-attribute
-- Returns:
- true if attribute is core-managed
-
isDefAttribute
Determine if attribute is defined (def) attribute.- Parameters:
sess
-attribute
-- Returns:
- true if attribute is defined attribute false otherwise
-
isFromNamespace
Determine if attribute is from specified namespace.- Parameters:
attribute
-namespace
-- Returns:
- true if the attribute is from specified namespace false otherwise
-
isLoginAlreadyUsed
Check if the login is already in use for some namespace or globally- Parameters:
sess
- perun sessionlogin
- login to be checkednamespace
- login can be checked for given namespace or globally, if namespace is null- Returns:
- true if login is already in use
-
isOptAttribute
Determine if attribute is optional (opt) attribute.- Parameters:
sess
-attribute
-- Returns:
- true if attribute is optional attribute false otherwise
-
isVirtAttribute
Determine if attribute is virtual attribute.- Parameters:
sess
-attribute
-- Returns:
- true if attribute is virtual
-
registerAttributeModule
Register attribute module in Auditer for message listening (if it is not there yet).- Parameters:
module
- module to register- See Also:
-
removeAllAttributes
Unset all attributes for the facility.- Parameters:
sess
- perun sessionfacility
- remove attributes from this facility- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAllAttributes
Unset all attributes for the vo.- Parameters:
sess
- perun sessionvo
- remove attributes from this vo- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAllAttributes
Unset all attributes for the group.- Parameters:
sess
- perun sessiongroup
- remove attributes from this group- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAllAttributes
Unset all attributes for the resource.- Parameters:
sess
- perun sessionresource
- remove attributes from this resource- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAllAttributes
Unset all (member-resource) attributes for the member on the resource.- 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- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAllAttributes
Unset all attributes for the member in the group.- 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- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAllAttributes
Unset all member attributes for the member.- Parameters:
sess
- perun sessionmember
-- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAllAttributes
Unset all (user-facility) non-virtual attributes for the user on the facility.- Parameters:
sess
- perun sessionfacility
-user
-- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAllAttributes
Unset all user attributes for the user.- Parameters:
sess
- perun sessionuser
-- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAllAttributes
Unset all user attributes for the host.- Parameters:
sess
- perun sessionhost
-- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAllAttributes
Unset all group_resource attributes- Parameters:
sess
- perun sessionresource
- Resourcegroup
- Group- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAllAttributes
Unset all UserExtSource attributes for the user external source.- Parameters:
sess
- perun sessionues
-- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAllGroupResourceAttributes
Remove all non-virtual group-resource attribute on selected resource- Parameters:
sess
-resource
-- Throws:
InternalErrorException
-
removeAllMemberResourceAttributes
Remove all non-virtual member-resource attributes assigned to resource- Parameters:
sess
-resource
-- Throws:
InternalErrorException
-
removeAllUserFacilityAttributes
Unset all (user-facility) non-virtual attributes for the user and all facilities- Parameters:
sess
- perun sessionuser
-- Returns:
true
if attributes was deleted orfalse
if attributes was not deleted- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAllUserFacilityAttributesForAnyUser
Unset all (user-facility) non-virtual attributes for any user on the facility.- Parameters:
sess
- perun sessionfacility
-- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAndUnregisterAttrModule
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.- Parameters:
sess
- sessattribute
- attribute of which module to remove
-
removeAttribute
Unset particular attribute for the facility.- 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- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAttribute
Unset particular entityless attribute with subject equals key.- 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- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAttribute
Unset particular attribute for the vo.- 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- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAttribute
Unset particular attribute for the group.- 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- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAttribute
Unset particular attribute for the resource.- 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- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAttribute
boolean removeAttribute(PerunSession sess, Member member, Resource resource, AttributeDefinition attribute) Unset particular member-resorce attribute for the member on the resource.- 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- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAttribute
boolean removeAttribute(PerunSession sess, Member member, Group group, AttributeDefinition attribute) Unset particular attribute for the member in the group. Core attributes can't be removed this way.- 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- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAttribute
Unset particular member attribute- Parameters:
sess
- perun sessionmember
-attribute
- attribute to remove- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAttribute
boolean removeAttribute(PerunSession sess, Facility facility, User user, AttributeDefinition attribute) Unset particular user-facility attribute- Parameters:
sess
- perun sessionfacility
-user
-attribute
- attribute to remove- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAttribute
Unset particular user attribute- Parameters:
sess
- perun sessionuser
-attribute
- attribute to remove- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAttribute
Unset particular host attribute- Parameters:
sess
- perun sessionhost
-attribute
- attribute to remove- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAttribute
boolean removeAttribute(PerunSession sess, Resource resource, Group group, AttributeDefinition attribute) Unset particular group_resource attribute- 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- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAttribute
Unset particular user external source attribute- Parameters:
sess
- perun sessionues
-attribute
- attribute to remove- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeAttributeModule
Remove attribute module from attribute module map in Impl layer.- Parameters:
module
- module to remove- See Also:
-
removeVirtualAttribute
boolean removeVirtualAttribute(PerunSession sess, Facility facility, User user, AttributeDefinition attribute) Unset particular user-facility virtual attribute value.- Parameters:
sess
- perun sessionfacility
-user
-attribute
- attribute to remove- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
-
removeVirtualAttribute
boolean removeVirtualAttribute(PerunSession sess, Resource resource, AttributeDefinition attribute) throws WrongAttributeValueException, WrongReferenceAttributeValueException Unset particular resource virtual attribute value.- Parameters:
sess
-resource
-attribute
-- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place- Throws:
InternalErrorException
WrongAttributeValueException
WrongReferenceAttributeValueException
-
removeVirtualAttribute
boolean removeVirtualAttribute(PerunSession sess, Resource resource, Group group, AttributeDefinition attribute) Unset particular group-resource virtual attribute value.- Parameters:
sess
-resource
-group
-attribute
-- Returns:
true
if attribute was changed (deleted) orfalse
if attribute was not present in a first place- Throws:
InternalErrorException
-
setAttribute
boolean setAttribute(PerunSession sess, Object object, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException 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).- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
- if the namespace of the attribute does not match the perunBeanWrongAttributeValueException
-
setAttribute
boolean setAttribute(PerunSession sess, PerunBean bean1, PerunBean bean2, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException 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).- 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:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionWrongAttributeAssignmentException
WrongAttributeValueException
-
setAttributeActionCriticality
void setAttributeActionCriticality(PerunSession sess, AttributeDefinition attr, AttributeAction action, boolean critical, boolean global) throws RelationExistsException, RelationNotExistsException Marks the action on attribute as critical, which may require additional authentication of user performing that action on attribute.- 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
void setAttributePolicyCollections(PerunSession sess, List<AttributePolicyCollection> policyCollections) Deletes old attribute policy collections and sets all new attribute policy collections.- Parameters:
sess
- perun sessionpolicyCollections
- list of policy collections to set- Throws:
InternalErrorException
-
setAttributeWithNullValue
Set entityless attribute with null value (for key and attribute). Shouldn't be called from upper layer !!!- Parameters:
sess
-key
- key for storing entityless attributeattribute
- attribute to set- Returns:
- true if insert is ok
- Throws:
InternalErrorException
- if runtimeException is thrown
-
setAttributeWithNullValue
Set user attribute with null value (for user and attribute). Shouldn't be called from upper layer !!!- Parameters:
sess
-userId
- ID of User to store attribute forattribute
- attribute to set- Returns:
- true if insert is ok
- Throws:
InternalErrorException
- if runtimeException is thrown
-
setVirtualAttribute
boolean setVirtualAttribute(PerunSession sess, Facility facility, Attribute attribute) throws WrongReferenceAttributeValueException Store the particular virtual attribute associated with the facility.- Parameters:
sess
- perun sessionfacility
-attribute
- attribute to set- Returns:
- true if attribute was really changed
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionModuleNotExistsException
WrongModuleTypeException
WrongReferenceAttributeValueException
-
setVirtualAttribute
boolean setVirtualAttribute(PerunSession sess, Resource resource, Attribute attribute) throws WrongReferenceAttributeValueException Store the particular virtual attribute associated with the resource.- Parameters:
sess
- perun sessionresource
-attribute
- attribute to set- Returns:
- true if attribute was really changed
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionModuleNotExistsException
WrongModuleTypeException
WrongReferenceAttributeValueException
-
setVirtualAttribute
Store the particular virtual attribute associated with the group.- Parameters:
sess
- perun sessiongroup
-attribute
- attribute to set- Returns:
- true if attribute was really changed
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionModuleNotExistsException
WrongModuleTypeException
-
setVirtualAttribute
boolean setVirtualAttribute(PerunSession sess, Facility facility, User user, Attribute attribute) throws WrongReferenceAttributeValueException Store the particular virtual attribute associated with the facility and user combination.- Parameters:
sess
- perun sessionfacility
-user
-attribute
- attribute to set- Returns:
- true if attribute was really changed
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionModuleNotExistsException
WrongModuleTypeException
WrongReferenceAttributeValueException
-
setVirtualAttribute
boolean setVirtualAttribute(PerunSession sess, Resource resource, Group group, Attribute attribute) throws WrongReferenceAttributeValueException Store the particular virtual attribute associated with the resource and group combination.- Parameters:
sess
- perun sessionresource
-group
-attribute
- attribute to set- Returns:
- true if attribute was really changed
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionModuleNotExistsException
WrongModuleTypeException
WrongReferenceAttributeValueException
-
setVirtualAttribute
Store the particular virtual attribute associated with the member and group combination.- Parameters:
sess
- perun sessionmember
- member to set ongroup
- group to set onattribute
- attribute to set- Returns:
- true if attribute was really changed
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionModuleNotExistsException
WrongModuleTypeException
-
setVirtualAttribute
Store the particular virtual attribute associated with the member.- Parameters:
sess
- perun sessionmember
-attribute
- attribute to set- Returns:
- true if attribute was really changed
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionModuleNotExistsException
WrongModuleTypeException
-
setVirtualAttribute
Store the particular virtual attribute associated with the user.- Parameters:
sess
- perun sessionuser
-attribute
- attribute to set- Returns:
- true if attribute was really changed
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionModuleNotExistsException
WrongModuleTypeException
-
setVirtualAttribute
Store the particular virtual attribute associated with the user external source.- Parameters:
sess
- perun sessionues
-attribute
- attribute to set- Returns:
- true if attribute was really changed
- Throws:
InternalErrorException
- if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptionModuleNotExistsException
WrongModuleTypeException
-
unregisterAttributeModule
Unregister attribute module in Auditer from message listening (if it is not there yet).- Parameters:
module
- module to unregister- See Also:
-
updateAttribute
boolean updateAttribute(PerunSession sess, Attribute attribute, String tableName, List<String> columnNames, List<Object> columnValues) Update attribute value in DB.- 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
AttributeDefinition updateAttributeDefinition(PerunSession perunSession, AttributeDefinition attributeDefinition) Updates AttributeDefinition.- Parameters:
perunSession
-attributeDefinition
-- Returns:
- returns updated attributeDefinition
- Throws:
InternalErrorException
-