Package cz.metacentrum.perun.core.impl
Class AttributesManagerImpl
java.lang.Object
cz.metacentrum.perun.core.impl.AttributesManagerImpl
- All Implemented Interfaces:
AttributesManagerImplApi
AttributesManager implementation.
- Author:
- Slavek Licehammer glory@ics.muni.cz
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classAttributesManagerImpl.AttributeRowMapper<T extends PerunBean,V extends PerunBean> protected static classprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final RowMapper<AttributeDefinition> protected static final StringList of allowed values for attribute type.static final charstatic final charstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanattributeExists(PerunSession sess, AttributeDefinition attribute) Check if attribute exists in underlaying data source.voidblockAttributeValue(PerunSession session, Attribute attribute) Blocks the attribute value for future use (optionally in the attribute namespace)voidchangedAttributeHook(PerunSession sess, Facility facility, Attribute attribute) If you need to do some further work with other modules, this method do thatvoidchangedAttributeHook(PerunSession sess, Facility facility, User user, Attribute attribute) If you need to do some further work with other modules, this method do thatvoidchangedAttributeHook(PerunSession sess, Group group, Attribute attribute) If you need to do some further work with other modules, this method do thatvoidchangedAttributeHook(PerunSession sess, Host host, Attribute attribute) If you need to do some further work with other modules, this method do thatvoidchangedAttributeHook(PerunSession sess, Member member, Attribute attribute) If you need to do some further work with other modules, this method do thatvoidchangedAttributeHook(PerunSession sess, Member member, Group group, Attribute attribute) If you need to do some further work with other modules, this method do thatvoidchangedAttributeHook(PerunSession sess, Member member, Resource resource, Attribute attribute) If you need to do some further work with other modules, this method do thatvoidchangedAttributeHook(PerunSession sess, Resource resource, Attribute attribute) If you need to do some further work with other modules, this method do thatvoidchangedAttributeHook(PerunSession sess, Resource resource, Group group, Attribute attribute) If you need to do some further work with other modules, this method do thatvoidchangedAttributeHook(PerunSession sess, UserExtSource ues, Attribute attribute) If you need to do some further work with other modules, this method do thatvoidchangedAttributeHook(PerunSession sess, User user, Attribute attribute) If you need to do some further work with other modules, this method do thatvoidchangedAttributeHook(PerunSession sess, Vo vo, Attribute attribute) If you need to do some further work with other modules, this method do thatvoidchangedAttributeHook(PerunSession sess, String key, Attribute attribute) If you need to do some further work with other modules, this method do thatvoidcheckAttributeExists(PerunSession sess, AttributeDefinition attribute) Check if attribute exists in underlaying data source.voidcheckAttributeSemantics(PerunSession sess, Facility facility, Attribute attribute) Check if value of this facility attribute has valid semantics.voidcheckAttributeSemantics(PerunSession sess, Facility facility, User user, Attribute attribute) Check if value of this user-facility attribute has valid semantics.voidcheckAttributeSemantics(PerunSession sess, Group group, Attribute attribute) Check if value of this group attribute has valid semantics.voidcheckAttributeSemantics(PerunSession sess, Host host, Attribute attribute) Check if value of this host attribute has valid semantics.voidcheckAttributeSemantics(PerunSession sess, Member member, Attribute attribute) Check if value of this member attribute has valid semantics.voidcheckAttributeSemantics(PerunSession sess, Member member, Group group, Attribute attribute) Check if value of this member-group attribute has valid semantics.voidcheckAttributeSemantics(PerunSession sess, Member member, Resource resource, Attribute attribute) Check if value of this member-resource attribute has valid semantics.voidcheckAttributeSemantics(PerunSession sess, Resource resource, Attribute attribute) Check if value of this resource attribute has valid semantics.voidcheckAttributeSemantics(PerunSession sess, Resource resource, Group group, Attribute attribute) Check if value of this group-resource attribute has valid semantics.voidcheckAttributeSemantics(PerunSession sess, UserExtSource ues, Attribute attribute) Check if value of this user external source attribute has valid semantics.voidcheckAttributeSemantics(PerunSession sess, User user, Attribute attribute) Check if value of this user attribute has valid semantics.voidcheckAttributeSemantics(PerunSession sess, Vo vo, Attribute attribute) Check if value of this vo attribute has valid semantics.voidcheckAttributeSemantics(PerunSession sess, String key, Attribute attribute) Check if value of this entityless attribute has valid semantics.voidcheckAttributesExists(PerunSession sess, List<? extends AttributeDefinition> attributes) Batch version of checkAttributeExistsvoidcheckAttributesExists(PerunSession sess, List<? extends AttributeDefinition> attributes, String expectedNamespace) voidcheckAttributesSemantics(PerunSession sess, Resource resource, List<Attribute> attributes) voidcheckAttributeSyntax(PerunSession sess, Facility facility, Attribute attribute) Check if value of this facility attribute has valid syntax.voidcheckAttributeSyntax(PerunSession sess, Facility facility, User user, Attribute attribute) Check if value of this user-facility attribute has valid syntax.voidcheckAttributeSyntax(PerunSession sess, Group group, Attribute attribute) Check if value of this group attribute has valid syntax.voidcheckAttributeSyntax(PerunSession sess, Host host, Attribute attribute) Check if value of this host attribute has valid syntax.voidcheckAttributeSyntax(PerunSession sess, Member member, Attribute attribute) Check if value of this member attribute has valid syntax.voidcheckAttributeSyntax(PerunSession sess, Member member, Group group, Attribute attribute) Check if value of this member-group attribute has valid syntax.voidcheckAttributeSyntax(PerunSession sess, Member member, Resource resource, Attribute attribute) Check if value of this member-resource attribute has valid syntax.voidcheckAttributeSyntax(PerunSession sess, Resource resource, Attribute attribute) Check if value of this resource attribute has valid syntax.voidcheckAttributeSyntax(PerunSession sess, Resource resource, Group group, Attribute attribute) Check if value of this group-resource attribute has valid syntax.voidcheckAttributeSyntax(PerunSession sess, Resource resource, List<Attribute> attributes) voidcheckAttributeSyntax(PerunSession sess, UserExtSource ues, Attribute attribute) Check if value of this user external source attribute has valid syntax.voidcheckAttributeSyntax(PerunSession sess, User user, Attribute attribute) Check if value of this user attribute has valid syntax.voidcheckAttributeSyntax(PerunSession sess, Vo vo, Attribute attribute) Check if value of this vo attribute has valid syntax.voidcheckAttributeSyntax(PerunSession sess, String key, Attribute attribute) Check if value of this entityless attribute has valid syntax.voidcheckNamespace(PerunSession sess, AttributeDefinition attribute, String namespace) Determine if attribute is from specified namespace.voidcheckNamespace(PerunSession sess, List<? extends AttributeDefinition> attributes, String namespace) Determine if attributes are from specified namespace.intconvertAttributeValuesToNonunique(PerunSession session, AttributeDefinition attrDef) Deletes all values of the attribute from table _attr_u_values which has unique constraint.voidconvertAttributeValuesToUnique(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.voiddeleteAttribute(PerunSession sess, AttributeDefinition attribute) Deletes the attribute.voiddeletedEntityHook(PerunSession sess, User user, Attribute attribute) Executes extra logic for attribute module connected to a user entity being deletedstatic StringescapeListAttributeValue(String value) Escapes LIST_DELIMITER from the value.static StringescapeMapAttributeValue(String value) Escapes LIST_DELIMITER and KEY_VALUE_DELIMITER from the value.escapeQueryParameters(String value) Escapes QUERY PARAMETER VALUES in URL value.fillAttribute(PerunSession sess, Facility facility, User user, Attribute attribute) This method try to fill value of the user-facility attribute.fillAttribute(PerunSession sess, Group group, Attribute attribute) fillAttribute(PerunSession sess, Host host, Attribute attribute) fillAttribute(PerunSession sess, Member member, Attribute attribute) This method try to fill value of the member attribute.fillAttribute(PerunSession sess, Member member, Group group, Attribute attribute) This method tries to fill value of the member-group attribute.fillAttribute(PerunSession sess, Member member, Resource resource, Attribute attribute) This method try to fill value of the member-resource attribute.fillAttribute(PerunSession sess, Resource resource, Attribute attribute) This method try to fill a value of the resource attribute.fillAttribute(PerunSession sess, Resource resource, Group group, Attribute attribute) fillAttribute(PerunSession sess, UserExtSource ues, Attribute attribute) This method try to fill value of the user external source attribute.fillAttribute(PerunSession sess, User user, Attribute attribute) This method try to fill value of the user attribute.getAllAttributesStartWithNameWithoutNullValue(PerunSession sess, Group group, String startPartOfName) Get all non-empty attributes associated with the group starts with name startPartOfName.getAllAttributesStartWithNameWithoutNullValue(PerunSession sess, Resource resource, String startPartOfName) Get all non-empty attributes associated with the resource starts with name startPartOfName.getAllGroupResourceValues(PerunSession sess, AttributeDefinition attributeDefinition) Get all values for specified group-resource attribute.getAllGroupValues(PerunSession sess, AttributeDefinition attributeDefinition) Get all values for specified group attribute.getAllNamespaces(PerunSession sess) Returns list of all possible namespaces.getAllResourceValues(PerunSession sess, AttributeDefinition attributeDefinition) Get all values for specified resource attribute.getAllSimilarAttributeNames(PerunSession sess, String startingPartOfAttributeName) This method get all similar attr_names which start with partOfAttributeNamegetAllUserFacilityRichAttributes(PerunSession sess, User user) Get all non-empty attributes associated with the user on the all facilities.getAllUserValues(PerunSession sess, AttributeDefinition attributeDefinition) Get all values for specified user attribute.getAnonymizedValue(PerunSession sess, User user, Attribute attribute) Gets anonymized value of the attribute.getAppFormItemsForAppFormAndAttribute(PerunSession sess, int appFormId, AttributeDefinition attr) Returns list of app form items' shortnames for which the given attribute is a source or a destination attribute in the given application formReturns all application forms where the given attribute definition is a source or a destination attribute for any application from itemgetAttribute(PerunSession sess, Facility facility, User user, String attributeName) Get particular attribute for the user on this facility.getAttribute(PerunSession sess, Facility facility, String attributeName) Get particular attribute for the facility.getAttribute(PerunSession sess, Group group, String attributeName) Get particular attribute for the group.getAttribute(PerunSession sess, Host host, String attributeName) getAttribute(PerunSession sess, Member member, Group group, String attributeName) Get particular attribute for the member in this group.getAttribute(PerunSession sess, Member member, Resource resource, String attributeName) Get particular attribute for the member on this resource.getAttribute(PerunSession sess, Member member, String attributeName) Get particular attribute for the member.getAttribute(PerunSession sess, Resource resource, Group group, String attributeName) getAttribute(PerunSession sess, Resource resource, String attributeName) Get particular attribute for the resource.getAttribute(PerunSession sess, UserExtSource ues, String attributeName) Get particular attribute for the User External Source.getAttribute(PerunSession sess, User user, String attributeName) Get particular attribute for the user.getAttribute(PerunSession sess, Vo vo, String attributeName) Get particular attribute for the vo.getAttribute(PerunSession sess, String key, String attributeName) Get particular entityless attributegetAttributeById(PerunSession sess, Facility facility, int id) Get particular attribute for the facility.getAttributeById(PerunSession sess, Facility facility, User user, int id) Get particular attribute for the user on this facility.getAttributeById(PerunSession sess, Group group, int id) getAttributeById(PerunSession sess, Host host, int id) getAttributeById(PerunSession sess, Member member, int id) Get particular attribute for the member.getAttributeById(PerunSession sess, Member member, Group group, int id) Get particular attribute for the member in this group.getAttributeById(PerunSession sess, Member member, Resource resource, int id) Get particular attribute for the member on this resource.getAttributeById(PerunSession sess, Resource resource, int id) Get particular attribute for the resource.getAttributeById(PerunSession sess, Resource resource, Group group, int id) getAttributeById(PerunSession sess, UserExtSource ues, int id) Get particular attribute for the user external source.getAttributeById(PerunSession sess, User user, int id) Get particular attribute for the user.getAttributeById(PerunSession sess, Vo vo, int id) Get particular attribute for the vo.getAttributeDefinition(PerunSession sess, String attributeName) Get attributes definition (attribute without defined value).getAttributeDefinitionById(PerunSession sess, int id) Get attibute definition (attribute without defined value).getAttributePolicyCollections(PerunSession sess, int attributeId) Gets attribute policy collections for an attribute definition with given id.getAttributes(PerunSession sess, Facility facility) Get all non-empty attributes associated with the facility.getAttributes(PerunSession sess, Facility facility, User user) Get all non-empty attributes associated with the user on the facility.getAttributes(PerunSession sess, Facility facility, List<String> attrNames) Get all attributes associated with the facility which have name in list attrNames (empty too).getAttributes(PerunSession sess, Group group) Get all non-empty attributes associated with the group.getAttributes(PerunSession sess, Group group, List<String> attrNames) Get all attributes associated with the group which have name in list attrNames (empty too).getAttributes(PerunSession sess, Host host) getAttributes(PerunSession sess, Host host, List<String> attrNames) Get all attributes associated with the host which have name in list attrNames (empty and virtual too).getAttributes(PerunSession sess, Member member) Get all non-empty attributes associated with the member.getAttributes(PerunSession sess, Member member, Group group) Get all non-empty, non-virtual attributes associated with the member in the group.getAttributes(PerunSession sess, Member member, Group group, List<String> attrNames) Get all attributes (empty and virtual too) associated with the member in the group which have name in list attrNames.getAttributes(PerunSession sess, Member member, Resource resource) Get all non-empty attributes associated with the member on the resource.getAttributes(PerunSession sess, Member member, Resource resource, List<String> attrNames) Get all attributes (empty and virtual too) associated with the member on the resource which have name in list attrNames.getAttributes(PerunSession sess, Member member, List<String> attrNames) Get all attributes associated with the member which have name in list attrNames (empty and virtual too).getAttributes(PerunSession sess, Resource resource) Get all non-empty attributes associated with the resource.getAttributes(PerunSession sess, Resource resource, Group group) getAttributes(PerunSession sess, Resource resource, Group group, List<String> attrNames) Get all attributes (empty and virtual too) associated with the group on the resource which have name in list attrNames.getAttributes(PerunSession sess, Resource resource, List<String> attrNames) Get all attributes associated with the resource which have name in list attrNames (empty too).getAttributes(PerunSession sess, User user) Get all non-empty attributes associated with the user.getAttributes(PerunSession sess, UserExtSource ues) Get all non-empty attributes associated with the UserExtSource.getAttributes(PerunSession sess, UserExtSource ues, List<String> attrNames) Get all attributes associated with the UserExtSource which have name in list attrNames (empty and virtual too).getAttributes(PerunSession sess, User user, Facility facility, List<String> attrNames) Get all attributes (empty and virtual too) associated with the user on the facility which have name in list attrNames.getAttributes(PerunSession sess, User user, List<String> attrNames) Get all attributes associated with the user which have name in list attrNames (empty and virtual too).getAttributes(PerunSession sess, Vo vo) Get all non-empty attributes associated with the vo.getAttributes(PerunSession sess, Vo vo, List<String> attrNames) Get all attributes associated with the vo which have name in list attrNames (empty and virtual too).getAttributes(PerunSession sess, String key) Get all entiteless attributes with subject equaled String keygetAttributesByAttributeDefinition(PerunSession sess, AttributeDefinition attributeDefinition) Returns all attributes with not-null value which fits the attributeDefinition.Get attributes definition (attribute without defined value).getAttributesDefinitionByNamespace(PerunSession sess, String namespace) Get attributes definition (attribute without defined value) with specified namespace.getAttributesModule(PerunSession sess, AttributeDefinition attribute) Get the attribute module for the attributegetCriticalAttributeActions(PerunSession sess, int attrId) Returns critical actions on given attribute.getEntitylessAttributes(PerunSession sess, String attrName) Get all entityless attributes with attributeNamegetEntitylessAttrValueForUpdate(PerunSession sess, int attrId, String key) Return value of entityless attribute by attr_id and key (subject).getEntitylessKeys(PerunSession sess, AttributeDefinition attributeDefinition) Returns list of Keys which fits the attributeDefinition.getEntitylessStringAttributeMapping(PerunSession sess, String attributeName) Gets map from keys to string values for an entityless attribute.getPerunBeanIdsForUniqueAttributeValue(PerunSession sess, Attribute attribute) Finds ids of PerunBeans that have the attribute's value for the attribute.getRequiredAttributes(PerunSession sess, Facility facility) Get facility attributes which are required by all services which are connected to this facility.getRequiredAttributes(PerunSession sess, Resource resource, Facility facility) Get facility attributes which are required by services.getRequiredAttributes(PerunSession sess, Resource resource, Facility facility, User user) Get user-facility attributes which are required by services.getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Group group) getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Host host) getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member) Get member attributes which are required by services.getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Group group) Get member-group attributes which are required by services.getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Resource resource) Get member-resource attributes which are required by services.getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Resource resource) Get resource attributes which are required by services.getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Resource resource, Group group) getRequiredAttributes(PerunSession sess, Resource resource, Service service, List<Member> members) Get member attributes which are required by service for each member in list of members.getRequiredAttributes(PerunSession sess, Resource resource, User user) Get user attributes which are required by services.getRequiredAttributes(PerunSession sess, Resource resource, List<Integer> serviceIds) Get resource attributes which are required by services.getRequiredAttributes(PerunSession sess, Service service, Facility facility) Get facility attributes which are required by the service.getRequiredAttributes(PerunSession sess, Service service, Facility facility, User user) Get user-facility attributes which are required by the service.getRequiredAttributes(PerunSession sess, Service service, Facility facility, List<User> users) Get user-facility attributes which are required by the service for each user in list of users.getRequiredAttributes(PerunSession sess, Service service, Group group) getRequiredAttributes(PerunSession sess, Service service, Host host) getRequiredAttributes(PerunSession sess, Service service, Member member) Get member attributes which are required by the service.getRequiredAttributes(PerunSession sess, Service service, Member member, Group group) Get member-group attributes which are required by the service.getRequiredAttributes(PerunSession sess, Service service, Member member, Resource resource) Get member-resource attributes which are required by the service.getRequiredAttributes(PerunSession sess, Service service, Resource resource) Get resource attributes which are required by the service.getRequiredAttributes(PerunSession sess, Service service, Resource resource, Group group) getRequiredAttributes(PerunSession sess, Service service, Resource resource, List<Member> members) Get member-resource attributes which are required by service for each member in list of members.getRequiredAttributes(PerunSession sess, Service service, User user) Get user attributes which are required by the service.getRequiredAttributes(PerunSession sess, Service service, Vo vo) Get vo attributes which are required by the service.getRequiredAttributes(PerunSession sess, Service service, List<Member> members, Group group) Get member-group attributes which are required by the service, for the given members and the given group.getRequiredAttributes(PerunSession sess, Service service, List<User> users) Get user attributes which are required by the service for each user in list of users.getRequiredAttributes(PerunSession sess, List<Service> services, Group group) Get group attributes which are required by the given services.getRequiredAttributes(PerunSession sess, List<Service> services, Resource resource, Group group) Get group-resource attributes which are required by the services.getRequiredAttributesDefinition(PerunSession sess, Service service) Get all attributes which are required by service.getRequiredAttributesForGroups(PerunSession sess, Service service, List<Group> groups) Get group attributes which are required by the given service for given groups.getResourceRequiredAttributesDefinition(PerunSession sess, Resource resource) Get attributes definions required by all services assigned on the resource.getUninitializedAttributesModule(PerunSession sess, AttributeDefinition attributeDefinition) Get uninitiated attributeModule for the attributegetUserAttrValueForUpdate(PerunSession sess, int attrId, int userId) Get particular attribute for the user for update - locking the attribute for user.getUserFacilityAttributesForAnyUser(PerunSession sess, Facility facility) Get all non-empty attributes associated with any user on the facility.getUserIdsByLogin(PerunSession sess, String login) Gets IDs of users who use the given login in any namespace.getUserVirtualAttributeModule(PerunSession sess, AttributeDefinition attribute) Get user virtual attribute module by the attribute.getVirtualAttributes(PerunSession sess, Facility facility) Get all virtual attributes associated with the facility.getVirtualAttributes(PerunSession sess, Facility facility, User user) Get all virtual attributes associated with the user on the facility.getVirtualAttributes(PerunSession sess, Group group) Get all virtual attributes associated with the group.getVirtualAttributes(PerunSession sess, Host host) Get all virtual attributes associated with the host.getVirtualAttributes(PerunSession sess, Member member) Get all virtual attributes associated with the member.getVirtualAttributes(PerunSession sess, Member member, Group group) Get all virtual attributes associated with the member in the group.getVirtualAttributes(PerunSession sess, Member member, Resource resource) Get all virtual attributes associated with the member on the resource.getVirtualAttributes(PerunSession sess, Resource resource) Get all virtual attributes associated with the resource.getVirtualAttributes(PerunSession sess, User user) Get all virtual attributes associated with the user.getVirtualAttributes(PerunSession sess, UserExtSource ues) Get all virtual attributes associated with the UserExtSource.getVirtualAttributes(PerunSession sess, Vo vo) Get all virtual attributes associated with the vo.voidinitAndRegisterAttributeModules(PerunSession sess, ServiceLoader<AttributesModuleImplApi> modules, Set<AttributeDefinition> allAttributesDef) Init attribute modules map in Impl layer.voidAdd attribute module to attribute module map in Impl layer (if it is not there yet).booleaninsertAttribute(PerunSession sess, Attribute attribute, String tableName, List<String> columnNames, List<Object> columnValues) Insert attribute value in DB.booleanisAttributeActionCritical(PerunSession sess, AttributeDefinition attr, AttributeAction action) Checks if the action is critical on given attribute.booleanisAttributeActionGloballyCritical(PerunSession sess, int attrId, AttributeAction action) Checks if the action is critical on given attribute for all objects.booleanisAttributeRequiredByFacility(PerunSession sess, Facility facility, AttributeDefinition attributeDefinition) Check if this attribute is currently required on this facility.booleanisAttributeRequiredByGroup(PerunSession sess, Group group, AttributeDefinition attributeDefinition) Check if this attribute is currently required on this group.booleanisAttributeRequiredByResource(PerunSession sess, Resource resource, AttributeDefinition attributeDefinition) Check if this attribute is currently required on this resource.booleanisAttributeRequiredByVo(PerunSession sess, Vo vo, AttributeDefinition attributeDefinition) Check if this attribute is currently required on this vo.isAttributeValueBlocked(PerunSession session, Attribute attribute) Checks whether the value of the passed attribute (checks separate key-value pairs and list items as well) is blocked (in namespace if the attribute is namespace based).booleanisCoreAttribute(PerunSession sess, AttributeDefinition attribute) Determine if attribute is core attribute.booleanisCoreManagedAttribute(PerunSession sess, AttributeDefinition attribute) Determine if attribute is core-managed attribute.booleanisDefAttribute(PerunSession sess, AttributeDefinition attribute) Determine if attribute is defined (def) attribute.booleanisFromNamespace(AttributeDefinition attribute, String namespace) Determine if attribute is from specified namespace.booleanisLoginAlreadyUsed(PerunSession sess, String login, String namespace) Check if the login is already in use for some namespace or globallybooleanisOptAttribute(PerunSession sess, AttributeDefinition attribute) Determine if attribute is optional (opt) attribute.booleanisVirtAttribute(PerunSession sess, AttributeDefinition attribute) Determine if attribute is virtual attribute.voidRegister attribute module in Auditer for message listening (if it is not there yet).booleanremoveAllAttributes(PerunSession sess, Facility facility) Unset all attributes for the facility.booleanremoveAllAttributes(PerunSession sess, Facility facility, User user) Unset all (user-facility) non-virtual attributes for the user on the facility.booleanremoveAllAttributes(PerunSession sess, Group group) Unset all attributes for the group.booleanremoveAllAttributes(PerunSession sess, Host host) Unset all user attributes for the host.booleanremoveAllAttributes(PerunSession sess, Member member) Unset all member attributes for the member.booleanremoveAllAttributes(PerunSession sess, Member member, Group group) Unset all attributes for the member in the group.booleanremoveAllAttributes(PerunSession sess, Member member, Resource resource) Unset all (member-resource) attributes for the member on the resource.booleanremoveAllAttributes(PerunSession sess, Resource resource) Unset all attributes for the resource.booleanremoveAllAttributes(PerunSession sess, Resource resource, Group group) Unset all group_resource attributesbooleanremoveAllAttributes(PerunSession sess, User user) Unset all user attributes for the user.booleanremoveAllAttributes(PerunSession sess, UserExtSource ues) Unset all UserExtSource attributes for the user external source.booleanremoveAllAttributes(PerunSession sess, Vo vo) Unset all attributes for the vo.voidremoveAllGroupResourceAttributes(PerunSession sess, Resource resource) Remove all non-virtual group-resource attribute on selected resourcevoidremoveAllMemberResourceAttributes(PerunSession sess, Resource resource) Remove all non-virtual member-resource attributes assigned to resourcebooleanremoveAllUserFacilityAttributes(PerunSession sess, User user) Unset all (user-facility) non-virtual attributes for the user and all facilitiesbooleanremoveAllUserFacilityAttributesForAnyUser(PerunSession sess, Facility facility) Unset all (user-facility) non-virtual attributes for any user on the facility.voidremoveAndUnregisterAttrModule(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.booleanremoveAttribute(PerunSession sess, Facility facility, AttributeDefinition attribute) Unset particular attribute for the facility.booleanremoveAttribute(PerunSession sess, Facility facility, User user, AttributeDefinition attribute) Unset particular user-facility attributebooleanremoveAttribute(PerunSession sess, Group group, AttributeDefinition attribute) Unset particular attribute for the group.booleanremoveAttribute(PerunSession sess, Host host, AttributeDefinition attribute) Unset particular host attributebooleanremoveAttribute(PerunSession sess, Member member, AttributeDefinition attribute) Unset particular member attributebooleanremoveAttribute(PerunSession sess, Member member, Group group, AttributeDefinition attribute) Unset particular attribute for the member in the group.booleanremoveAttribute(PerunSession sess, Member member, Resource resource, AttributeDefinition attribute) Unset particular member-resorce attribute for the member on the resource.booleanremoveAttribute(PerunSession sess, Resource resource, AttributeDefinition attribute) Unset particular attribute for the resource.booleanremoveAttribute(PerunSession sess, Resource resource, Group group, AttributeDefinition attribute) Unset particular group_resource attributebooleanremoveAttribute(PerunSession sess, UserExtSource ues, AttributeDefinition attribute) Unset particular user external source attributebooleanremoveAttribute(PerunSession sess, User user, AttributeDefinition attribute) Unset particular user attributebooleanremoveAttribute(PerunSession sess, Vo vo, AttributeDefinition attribute) Unset particular attribute for the vo.booleanremoveAttribute(PerunSession sess, String key, AttributeDefinition attribute) Unset particular entityless attribute with subject equals key.voidRemove attribute module from attribute module map in Impl layer.booleanremoveVirtualAttribute(PerunSession sess, Facility facility, User user, AttributeDefinition attribute) Unset particular user-facility virtual attribute value.booleanremoveVirtualAttribute(PerunSession sess, Resource resource, AttributeDefinition attribute) Unset particular resource virtual attribute value.booleanremoveVirtualAttribute(PerunSession sess, Resource resource, Group group, AttributeDefinition attribute) Unset particular group-resource virtual attribute value.booleansetAttribute(PerunSession sess, PerunBean bean1, PerunBean bean2, Attribute attribute) Store the particular attribute associated with the bean1 and bean2.booleansetAttribute(PerunSession sess, Object object, Attribute attribute) Store the particular attribute associated with the given perun bean.voidsetAttributeActionCriticality(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.voidsetAttributePolicyCollections(PerunSession sess, List<AttributePolicyCollection> policyCollections) Deletes old attribute policy collections and sets all new attribute policy collections.booleansetAttributeWithNullValue(PerunSession sess, int userId, Attribute attribute) Set user attribute with null value (for user and attribute).booleansetAttributeWithNullValue(PerunSession sess, String key, Attribute attribute) Set entityless attribute with null value (for key and attribute).voidvoidbooleansetVirtualAttribute(PerunSession sess, Facility facility, Attribute attribute) Store the particular virtual attribute associated with the facility.booleansetVirtualAttribute(PerunSession sess, Facility facility, User user, Attribute attribute) Store the particular virtual attribute associated with the facility and user combination.booleansetVirtualAttribute(PerunSession sess, Group group, Attribute attribute) Store the particular virtual attribute associated with the group.booleansetVirtualAttribute(PerunSession sess, Member member, Attribute attribute) Store the particular virtual attribute associated with the member.booleansetVirtualAttribute(PerunSession sess, Member member, Group group, Attribute attribute) Store the particular virtual attribute associated with the member and group combination.booleansetVirtualAttribute(PerunSession sess, Resource resource, Attribute attribute) Store the particular virtual attribute associated with the resource.booleansetVirtualAttribute(PerunSession sess, Resource resource, Group group, Attribute attribute) Store the particular virtual attribute associated with the resource and group combination.booleansetVirtualAttribute(PerunSession sess, UserExtSource ues, Attribute attribute) Store the particular virtual attribute associated with the user external source.booleansetVirtualAttribute(PerunSession sess, User user, Attribute attribute) Store the particular virtual attribute associated with the user.voidUnregister attribute module in Auditer from message listening (if it is not there yet).booleanupdateAttribute(PerunSession sess, Attribute attribute, String tableName, List<String> columnNames, List<Object> columnValues) Update attribute value in DB.updateAttributeDefinition(PerunSession perunSession, AttributeDefinition attributeDefinition) Updates AttributeDefinition.
-
Field Details
-
LIST_DELIMITER
public static final char LIST_DELIMITER- See Also:
-
KEY_VALUE_DELIMITER
public static final char KEY_VALUE_DELIMITER- See Also:
-
MAX_SIZE_FOR_IN_CLAUSE
public static final int MAX_SIZE_FOR_IN_CLAUSE- See Also:
-
BEANS_TO_NAMESPACES_MAP
-
ATTRIBUTE_TYPES
List of allowed values for attribute type.- See Also:
-
ATTRIBUTE_DEFINITION_MAPPING_SELECT_QUERY
- See Also:
-
ATTRIBUTE_DEFINITION_MAPPER
-
-
Constructor Details
-
AttributesManagerImpl
Constructor.- Parameters:
perunPool- connection pool instance
-
-
Method Details
-
escapeListAttributeValue
Escapes LIST_DELIMITER from the value.- Returns:
- escaped value
-
escapeMapAttributeValue
Escapes LIST_DELIMITER and KEY_VALUE_DELIMITER from the value.- Returns:
- escaped value
-
attributeExists
Description copied from interface:AttributesManagerImplApiCheck if attribute exists in underlaying data source.- Specified by:
attributeExistsin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionattribute- attribute to check- Returns:
- true if attribute exists in underlaying data source, false othewise
-
blockAttributeValue
Description copied from interface:AttributesManagerImplApiBlocks the attribute value for future use (optionally in the attribute namespace)- Specified by:
blockAttributeValuein interfaceAttributesManagerImplApi- Parameters:
session-attribute-
-
changedAttributeHook
Description copied from interface:AttributesManagerImplApiIf you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHookin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionfacility-attribute-
-
changedAttributeHook
Description copied from interface:AttributesManagerImplApiIf you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHookin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionkey-attribute-
-
changedAttributeHook
Description copied from interface:AttributesManagerImplApiIf you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHookin interfaceAttributesManagerImplApi- Parameters:
sess-vo-attribute-
-
changedAttributeHook
Description copied from interface:AttributesManagerImplApiIf you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHookin interfaceAttributesManagerImplApi- Parameters:
sess-host-attribute-
-
changedAttributeHook
public void changedAttributeHook(PerunSession sess, Group group, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApiIf you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHookin interfaceAttributesManagerImplApi- Parameters:
sess-group-attribute-- Throws:
WrongReferenceAttributeValueException
-
changedAttributeHook
public void changedAttributeHook(PerunSession sess, User user, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApiIf you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHookin interfaceAttributesManagerImplApi- Parameters:
sess-user-attribute-- Throws:
WrongReferenceAttributeValueException
-
changedAttributeHook
public void changedAttributeHook(PerunSession sess, Member member, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApiIf you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHookin interfaceAttributesManagerImplApi- Parameters:
sess-member-attribute-- Throws:
WrongReferenceAttributeValueException
-
changedAttributeHook
public void changedAttributeHook(PerunSession sess, Resource resource, Group group, Attribute attribute) Description copied from interface:AttributesManagerImplApiIf you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHookin interfaceAttributesManagerImplApi- Parameters:
sess-resource-group-attribute-
-
changedAttributeHook
public void changedAttributeHook(PerunSession sess, Resource resource, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApiIf you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHookin interfaceAttributesManagerImplApi- Parameters:
sess-resource-attribute-- Throws:
WrongReferenceAttributeValueException
-
changedAttributeHook
public void changedAttributeHook(PerunSession sess, Member member, Resource resource, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApiIf you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHookin interfaceAttributesManagerImplApi- Parameters:
sess-member-resource-attribute-- Throws:
WrongReferenceAttributeValueException
-
changedAttributeHook
public void changedAttributeHook(PerunSession sess, Member member, Group group, Attribute attribute) Description copied from interface:AttributesManagerImplApiIf you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHookin interfaceAttributesManagerImplApi- Parameters:
sess-member-group-attribute-
-
changedAttributeHook
public void changedAttributeHook(PerunSession sess, Facility facility, User user, Attribute attribute) Description copied from interface:AttributesManagerImplApiIf you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHookin interfaceAttributesManagerImplApi- Parameters:
sess-facility-user-attribute-
-
changedAttributeHook
Description copied from interface:AttributesManagerImplApiIf you need to do some further work with other modules, this method do that- Specified by:
changedAttributeHookin interfaceAttributesManagerImplApi- Parameters:
sess-ues-attribute-
-
checkAttributeExists
public void checkAttributeExists(PerunSession sess, AttributeDefinition attribute) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiCheck if attribute exists in underlaying data source.- Specified by:
checkAttributeExistsin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionattribute- attribute to check- Throws:
AttributeNotExistsException- if attribute doesn';t exists
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSession sess, Facility facility, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApiCheck if value of this facility attribute has valid semantics.- Specified by:
checkAttributeSemanticsin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionfacility- facility for which you want to check validity of attributeattribute- attribute to check- Throws:
WrongReferenceAttributeValueException- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSession sess, Vo vo, Attribute attribute) throws WrongReferenceAttributeValueException, WrongAttributeAssignmentException Description copied from interface:AttributesManagerImplApiCheck if value of this vo attribute has valid semantics.- Specified by:
checkAttributeSemanticsin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionvo- vo for which you want to check validity of attributeattribute- attribute to check- Throws:
WrongReferenceAttributeValueException- if the attribute value has wrong/illegal semanticsWrongAttributeAssignmentException
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSession sess, Group group, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApiCheck if value of this group attribute has valid semantics.- Specified by:
checkAttributeSemanticsin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessiongroup- group for which you want to check validity of attributeattribute- attribute to check- Throws:
WrongReferenceAttributeValueException- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSession sess, Resource resource, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApiCheck if value of this resource attribute has valid semantics.- Specified by:
checkAttributeSemanticsin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresource- resource for which you want to check validity of attributeattribute- attribute to check- Throws:
WrongReferenceAttributeValueException- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSession sess, Member member, Resource resource, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApiCheck if value of this member-resource attribute has valid semantics.- Specified by:
checkAttributeSemanticsin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- member for which (and for specified resource) you want to check validity of attributeresource- resource for which (and for specified member) you want to check validity of attributeattribute- attribute to check- Throws:
WrongReferenceAttributeValueException- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSession sess, Member member, Group group, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApiCheck if value of this member-group attribute has valid semantics.- Specified by:
checkAttributeSemanticsin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- member for which (and for specified group) you want to check validity of attributegroup- group for which (and for specified member) you want to check validity of attributeattribute- attribute to check- Throws:
WrongReferenceAttributeValueException- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSession sess, Facility facility, User user, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApiCheck if value of this user-facility attribute has valid semantics.- Specified by:
checkAttributeSemanticsin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionfacility- facility for which (and for specified user) you want to check validity of attributeuser- user for which (and for specified facility) you want to check validity of attributeattribute- attribute to check- Throws:
WrongReferenceAttributeValueException- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSession sess, User user, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApiCheck if value of this user attribute has valid semantics.- Specified by:
checkAttributeSemanticsin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionuser- user for which (and for specified facility) you want to check validity of attributeattribute- attribute to check- Throws:
WrongReferenceAttributeValueException- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSession sess, Member member, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApiCheck if value of this member attribute has valid semantics.- Specified by:
checkAttributeSemanticsin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- member for which you want to check validity of attributeattribute- attribute to check- Throws:
WrongReferenceAttributeValueException- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
Description copied from interface:AttributesManagerImplApiCheck if value of this host attribute has valid semantics.- Specified by:
checkAttributeSemanticsin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionhost- host for which you want to check validity of attributeattribute- attribute to check
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSession sess, Resource resource, Group group, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApiCheck if value of this group-resource attribute has valid semantics.- Specified by:
checkAttributeSemanticsin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresource- resource for which (and for specified group) you want to check validity of attributegroup- group for which (and for specified member) you want to check validity of attributeattribute- attribute to check- Throws:
WrongReferenceAttributeValueException- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
public void checkAttributeSemantics(PerunSession sess, String key, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApiCheck if value of this entityless attribute has valid semantics.- Specified by:
checkAttributeSemanticsin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionkey- key for which you want to check validity of attributeattribute- attribute to check- Throws:
WrongReferenceAttributeValueException- if the attribute value has wrong/illegal semantics
-
checkAttributeSemantics
Description copied from interface:AttributesManagerImplApiCheck if value of this user external source attribute has valid semantics.- Specified by:
checkAttributeSemanticsin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionues- user external source for which you want to check validity of attributeattribute- attribute to check
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, Resource resource, List<Attribute> attributes) throws WrongAttributeValueException - Throws:
WrongAttributeValueException
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, Facility facility, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApiCheck if value of this facility attribute has valid syntax.- Specified by:
checkAttributeSyntaxin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionfacility- facility for which you want to check validity of attributeattribute- attribute to check- Throws:
WrongAttributeValueException- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, Vo vo, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApiCheck if value of this vo attribute has valid syntax.- Specified by:
checkAttributeSyntaxin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionvo- vo for which you want to check validity of attributeattribute- attribute to check- Throws:
WrongAttributeValueException- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, Group group, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApiCheck if value of this group attribute has valid syntax.- Specified by:
checkAttributeSyntaxin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessiongroup- group for which you want to check validity of attributeattribute- attribute to check- Throws:
WrongAttributeValueException- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, Resource resource, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApiCheck if value of this resource attribute has valid syntax.- Specified by:
checkAttributeSyntaxin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresource- resource for which you want to check validity of attributeattribute- attribute to check- Throws:
WrongAttributeValueException- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, Member member, Resource resource, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApiCheck if value of this member-resource attribute has valid syntax.- Specified by:
checkAttributeSyntaxin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- member for which (and for specified resource) you want to check validity of attributeresource- resource for which (and for specified member) you want to check validity of attributeattribute- attribute to check- Throws:
WrongAttributeValueException- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, Member member, Group group, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApiCheck if value of this member-group attribute has valid syntax.- Specified by:
checkAttributeSyntaxin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- member for which (and for specified group) you want to check validity of attributegroup- group for which (and for specified member) you want to check validity of attributeattribute- attribute to check- Throws:
WrongAttributeValueException- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, Facility facility, User user, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApiCheck if value of this user-facility attribute has valid syntax.- Specified by:
checkAttributeSyntaxin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionfacility- facility for which (and for specified user) you want to check validity of attributeuser- user for which (and for specified facility) you want to check validity of attributeattribute- attribute to check- Throws:
WrongAttributeValueException- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, User user, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApiCheck if value of this user attribute has valid syntax.- Specified by:
checkAttributeSyntaxin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionuser- user for which (and for specified facility) you want to check validity of attributeattribute- attribute to check- Throws:
WrongAttributeValueException- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, Member member, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApiCheck if value of this member attribute has valid syntax.- Specified by:
checkAttributeSyntaxin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- member for which you want to check validity of attributeattribute- attribute to check- Throws:
WrongAttributeValueException- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, Host host, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApiCheck if value of this host attribute has valid syntax.- Specified by:
checkAttributeSyntaxin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionhost- host for which you want to check validity of attributeattribute- attribute to check- Throws:
WrongAttributeValueException- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, Resource resource, Group group, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApiCheck if value of this group-resource attribute has valid syntax.- Specified by:
checkAttributeSyntaxin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresource- resource for which (and for specified group) you want to check validity of attributegroup- group for which (and for specified resource) you want to check validity of attributeattribute- attribute to check- Throws:
WrongAttributeValueException- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, String key, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApiCheck if value of this entityless attribute has valid syntax.- Specified by:
checkAttributeSyntaxin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionkey- key for which you want to check validity of attributeattribute- attribute to check- Throws:
WrongAttributeValueException- if the attribute value has wrong/illegal syntax
-
checkAttributeSyntax
public void checkAttributeSyntax(PerunSession sess, UserExtSource ues, Attribute attribute) throws WrongAttributeValueException Description copied from interface:AttributesManagerImplApiCheck if value of this user external source attribute has valid syntax.- Specified by:
checkAttributeSyntaxin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionues- user external source for which you want to check validity of attributeattribute- attribute to check- Throws:
WrongAttributeValueException- if the attribute value has wrong/illegal syntax
-
checkAttributesExists
public void checkAttributesExists(PerunSession sess, List<? extends AttributeDefinition> attributes, String expectedNamespace) throws AttributeNotExistsException, WrongAttributeAssignmentException -
checkAttributesExists
public void checkAttributesExists(PerunSession sess, List<? extends AttributeDefinition> attributes) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiBatch version of checkAttributeExists- Specified by:
checkAttributesExistsin interfaceAttributesManagerImplApi- Throws:
AttributeNotExistsException
-
checkAttributesSemantics
public void checkAttributesSemantics(PerunSession sess, Resource resource, List<Attribute> attributes) throws WrongReferenceAttributeValueException -
checkNamespace
public void checkNamespace(PerunSession sess, AttributeDefinition attribute, String namespace) throws WrongAttributeAssignmentException Description copied from interface:AttributesManagerImplApiDetermine if attribute is from specified namespace.- Specified by:
checkNamespacein interfaceAttributesManagerImplApi- Parameters:
sess-attribute-namespace-- Throws:
WrongAttributeAssignmentException- if the attribute isn't from specified namespace
-
checkNamespace
public void checkNamespace(PerunSession sess, List<? extends AttributeDefinition> attributes, String namespace) throws WrongAttributeAssignmentException Description copied from interface:AttributesManagerImplApiDetermine if attributes are from specified namespace.- Specified by:
checkNamespacein interfaceAttributesManagerImplApi- Parameters:
sess-attributes-namespace-- Throws:
WrongAttributeAssignmentException- if any of the attribute isn't from specified namespace
-
convertAttributeValuesToNonunique
Description copied from interface:AttributesManagerImplApiDeletes all values of the attribute from table _attr_u_values which has unique constraint. And returns how many rows were deleted.- Specified by:
convertAttributeValuesToNonuniquein interfaceAttributesManagerImplApi
-
convertAttributeValuesToUnique
Description copied from interface:AttributesManagerImplApiCopies all values of the attribute to table _attr_u_values which has unique constraint.- Specified by:
convertAttributeValuesToUniquein interfaceAttributesManagerImplApi
-
createAttribute
public AttributeDefinition createAttribute(PerunSession sess, AttributeDefinition attribute) throws AttributeDefinitionExistsException Description copied from interface:AttributesManagerImplApiCreates an attribute, the attribute is stored into the appropriate DB table according to the namespace.- Specified by:
createAttributein interfaceAttributesManagerImplApi- Parameters:
sess-attribute- attribute to create- Returns:
- attribute with set id
- Throws:
AttributeDefinitionExistsException- if attribute already exists
-
decorateMembersWithDefOptMemberAttributes
public List<RichMember> decorateMembersWithDefOptMemberAttributes(PerunSession sess, List<RichMember> members, List<String> memberAttrNames) Description copied from interface:AttributesManagerImplApiAppends each member with the member attributes (only def and opt) named in the memberAttrNames list if the value of the attribute for the given member is found in the database.- Specified by:
decorateMembersWithDefOptMemberAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmembers- to decorate with the given member attributesmemberAttrNames- list of the member attribute names- Returns:
- the original list of RichMembers with added member attributes
-
decorateMembersWithDefOptUserAttributes
public List<RichMember> decorateMembersWithDefOptUserAttributes(PerunSession sess, List<RichMember> members, List<String> userAttrNames) Description copied from interface:AttributesManagerImplApiAppends each member with the user attributes (only def and opt) named in the userAttrNames list if the value of the attribute for the given member(user) is found in the database.- Specified by:
decorateMembersWithDefOptUserAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmembers- to decorate with the given user attributesuserAttrNames- list of the user attribute names- Returns:
- the original list of RichMembers with added user attributes
-
deleteAttribute
Description copied from interface:AttributesManagerImplApiDeletes the attribute. Definition and all values.- Specified by:
deleteAttributein interfaceAttributesManagerImplApi- Parameters:
sess-attribute- attribute to delete
-
escapeQueryParameters
Escapes QUERY PARAMETER VALUES in URL value. Does not modify domain or parameters names. e.g. 'domain/?vo=vo name' => 'domain/?vo=vo+name'- Specified by:
escapeQueryParametersin interfaceAttributesManagerImplApi- Returns:
- url with escaped special characters in query parameter's values
-
deletedEntityHook
Description copied from interface:AttributesManagerImplApiExecutes extra logic for attribute module connected to a user entity being deleted- Specified by:
deletedEntityHookin interfaceAttributesManagerImplApi- Parameters:
sess-user-attribute-
-
fillAttribute
Description copied from interface:AttributesManagerImplApiThis method try to fill a value of the resource attribute. Value may be copied from some facility attribute.- Specified by:
fillAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresource- resource, attribute of which you want to fillattribute- attribute to fill. If attributes already have set value, this value won't be owerwriten. This means the attribute value must be empty otherwise this method won't fill it.- Returns:
- attribute which MAY have filled value
-
fillAttribute
public Attribute fillAttribute(PerunSession sess, Member member, Resource resource, Attribute attribute) Description copied from interface:AttributesManagerImplApiThis method try to fill value of the member-resource attribute. This value is automatically generated, but not all atrributes can be filled this way.- Specified by:
fillAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- attribute of this member (and resource) and you want to fillresource- attribute of this resource (and member) and you want to fillattribute- attribute to fill. If attributes already have set value, this value won't be owerwriten. This means the attribute value must be empty otherwise this method won't fill it.- Returns:
- attribute which MAY have filled value
-
fillAttribute
Description copied from interface:AttributesManagerImplApiThis method tries to fill value of the member-group attribute. This value is automatically generated, but not all attributes can be filled this way.- Specified by:
fillAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- attribute of this member (and group) you want to fillgroup- attribute of this group you want to fillattribute- attribute to fill. If attributes already have set value, this value won't be overwritten. This means the attribute value must be empty otherwise this method won't fill it.- Returns:
- attribute which MAY have filled value
-
fillAttribute
public Attribute fillAttribute(PerunSession sess, Facility facility, User user, Attribute attribute) Description copied from interface:AttributesManagerImplApiThis method try to fill value of the user-facility attribute. This value is automatically generated, but not all atrributes can be filled this way.- Specified by:
fillAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionfacility- attribute of this facility (and user) and you want to filluser- attribute of this user (and facility) and you want to fillattribute- attribute to fill. If attributes already have set value, this value won't be owerwriten. This means the attribute value must be empty otherwise this method won't fill it.- Returns:
- attribute which MAY have filled value
-
fillAttribute
Description copied from interface:AttributesManagerImplApiThis method try to fill value of the user attribute. This value is automatically generated, but not all atrributes can be filled this way.- Specified by:
fillAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionuser- attribute of this user (and facility) and you want to fillattribute- attribute to fill. If attributes already have set value, this value won't be owerwriten. This means the attribute value must be empty otherwise this method won't fill it.- Returns:
- attribute which MAY have filled value
-
fillAttribute
Description copied from interface:AttributesManagerImplApiThis method try to fill value of the member attribute. This value is automatically generated, but not all atrributes can be filled this way.- Specified by:
fillAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- attribute of this member (and facility) and you want to fillattribute- attribute to fill. If attributes already have set value, this value won't be owerwriten. This means the attribute value must be empty otherwise this method won't fill it.- Returns:
- attribute which MAY have filled value
-
fillAttribute
- Specified by:
fillAttributein interfaceAttributesManagerImplApi
-
fillAttribute
public Attribute fillAttribute(PerunSession sess, Resource resource, Group group, Attribute attribute) - Specified by:
fillAttributein interfaceAttributesManagerImplApi
-
fillAttribute
- Specified by:
fillAttributein interfaceAttributesManagerImplApi
-
fillAttribute
Description copied from interface:AttributesManagerImplApiThis method try to fill value of the user external source attribute. This value is automatically generated, but not all atrributes can be filled this way.- Specified by:
fillAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionues- attribute of this user external source you want to fillattribute- attribute to fill. If attributes already have set value, this value won't be owerwriten. This means the attribute value must be empty otherwise this method won't fill it.- Returns:
- attribute which may have filled value
-
getAllAttributesStartWithNameWithoutNullValue
public List<Attribute> getAllAttributesStartWithNameWithoutNullValue(PerunSession sess, Group group, String startPartOfName) Description copied from interface:AttributesManagerImplApiGet all non-empty attributes associated with the group starts with name startPartOfName. Get only nonvirtual attributes with NotNull value.PRIVILEGE: Get only those attributes the principal has access to.
- Specified by:
getAllAttributesStartWithNameWithoutNullValuein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessiongroup- to get the attributes fromstartPartOfName- attribute name start with this part- Returns:
- list of attributes which name start with startPartOfName
-
getAllAttributesStartWithNameWithoutNullValue
public List<Attribute> getAllAttributesStartWithNameWithoutNullValue(PerunSession sess, Resource resource, String startPartOfName) Description copied from interface:AttributesManagerImplApiGet all non-empty attributes associated with the resource starts with name startPartOfName. Get only nonvirtual attributes with notNull value.PRIVILEGE: Get only those attributes the principal has access to.
- Specified by:
getAllAttributesStartWithNameWithoutNullValuein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresource- to get the attributes fromstartPartOfName- attribute name start with this part- Returns:
- list of attributes which name start with startPartOfName
-
getAllGroupResourceValues
public List<Object> getAllGroupResourceValues(PerunSession sess, AttributeDefinition attributeDefinition) Description copied from interface:AttributesManagerImplApiGet all values for specified group-resource attribute. Atibute can't be core or virt.- Specified by:
getAllGroupResourceValuesin interfaceAttributesManagerImplApi- Parameters:
sess-attributeDefinition- attribute definition, namespace group-resource- Returns:
-
getAllGroupValues
Description copied from interface:AttributesManagerImplApiGet all values for specified group attribute. Atibute can't be core or virt.- Specified by:
getAllGroupValuesin interfaceAttributesManagerImplApi- Parameters:
sess-attributeDefinition- attribute definition, namespace group- Returns:
-
getAllNamespaces
Description copied from interface:AttributesManagerImplApiReturns list of all possible namespaces.- Specified by:
getAllNamespacesin interfaceAttributesManagerImplApi- Parameters:
sess- session- Returns:
- list of namespaces
-
getAllResourceValues
public List<Object> getAllResourceValues(PerunSession sess, AttributeDefinition attributeDefinition) Description copied from interface:AttributesManagerImplApiGet all values for specified resource attribute. Atibute can't be core or virt.- Specified by:
getAllResourceValuesin interfaceAttributesManagerImplApi- Parameters:
sess-attributeDefinition- attribute definition, namespace resource- Returns:
-
getAllSimilarAttributeNames
public List<String> getAllSimilarAttributeNames(PerunSession sess, String startingPartOfAttributeName) Description copied from interface:AttributesManagerImplApiThis method get all similar attr_names which start with partOfAttributeName- Specified by:
getAllSimilarAttributeNamesin interfaceAttributesManagerImplApi- 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.
-
getAllUserFacilityRichAttributes
public List<RichAttribute<User,Facility>> getAllUserFacilityRichAttributes(PerunSession sess, User user) Description copied from interface:AttributesManagerImplApiGet all non-empty attributes associated with the user on the all facilities. This method doesn't use cache.- Specified by:
getAllUserFacilityRichAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionuser-- Returns:
- list of attributes
-
getAllUserValues
Description copied from interface:AttributesManagerImplApiGet all values for specified user attribute. Atibute can't be core or virt.- Specified by:
getAllUserValuesin interfaceAttributesManagerImplApi- Parameters:
sess-attributeDefinition- attribute definition, namespace user- Returns:
-
getAnonymizedValue
public Attribute getAnonymizedValue(PerunSession sess, User user, Attribute attribute) throws AnonymizationNotSupportedException Description copied from interface:AttributesManagerImplApiGets anonymized value of the attribute.- Specified by:
getAnonymizedValuein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionuser- userattribute- attribute to get anonymized value from- Returns:
- attribute with anonymized value
- Throws:
AnonymizationNotSupportedException- if the module doesn't exist or it doesn't implement this method
-
getAppFormItemsForAppFormAndAttribute
public List<String> getAppFormItemsForAppFormAndAttribute(PerunSession sess, int appFormId, AttributeDefinition attr) Description copied from interface:AttributesManagerImplApiReturns list of app form items' shortnames for which the given attribute is a source or a destination attribute in the given application form- Specified by:
getAppFormItemsForAppFormAndAttributein interfaceAttributesManagerImplApi- Parameters:
sess- sessionappFormId- id of application formattr- attribute definition- Returns:
- list of shortnames
-
getAppFormsWhereAttributeRelated
public List<ApplicationForm> getAppFormsWhereAttributeRelated(PerunSession sess, AttributeDefinition attr) Description copied from interface:AttributesManagerImplApiReturns all application forms where the given attribute definition is a source or a destination attribute for any application from item- Specified by:
getAppFormsWhereAttributeRelatedin interfaceAttributesManagerImplApi- Parameters:
sess- sessionattr- attribute definition- Returns:
- list of application forms where the given attribute definition has relation to any application form item
-
getAttribute
public Attribute getAttribute(PerunSession sess, Facility facility, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGet particular attribute for the facility.- Specified by:
getAttributein interfaceAttributesManagerImplApi- Parameters:
facility- to get attribute fromattributeName- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException- if the attribute doesn't exists in the underlaying data source
-
getAttribute
public Attribute getAttribute(PerunSession sess, Vo vo, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGet particular attribute for the vo.- Specified by:
getAttributein interfaceAttributesManagerImplApi- Parameters:
vo- to get attribute fromattributeName- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException- if the attribute doesn't exists in the underlaying data source
-
getAttribute
public Attribute getAttribute(PerunSession sess, Group group, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGet particular attribute for the group.- Specified by:
getAttributein interfaceAttributesManagerImplApi- Parameters:
group- to get attribute fromattributeName- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException- if the attribute doesn't exists in the underlaying data source
-
getAttribute
public Attribute getAttribute(PerunSession sess, Resource resource, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGet particular attribute for the resource.- Specified by:
getAttributein interfaceAttributesManagerImplApi- Parameters:
resource- to get attribute fromattributeName- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException- if the attribute doesn't exists in the underlaying data source
-
getAttribute
public Attribute getAttribute(PerunSession sess, Member member, Resource resource, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGet particular attribute for the member on this resource.- Specified by:
getAttributein interfaceAttributesManagerImplApi- Parameters:
member- to get attribute fromresource- to get attribute fromattributeName- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException- if the attribute doesn't exists in the underlaying data source
-
getAttribute
public Attribute getAttribute(PerunSession sess, Member member, Group group, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGet particular attribute for the member in this group.- Specified by:
getAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- to get attribute fromgroup- to get attribute fromattributeName- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException- if the attribute doesn't exists in the underlying data source
-
getAttribute
public Attribute getAttribute(PerunSession sess, Member member, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGet particular attribute for the member.- Specified by:
getAttributein interfaceAttributesManagerImplApi- Parameters:
member- to get attribute fromattributeName- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException- if the attribute doesn't exists in the underlaying data source
-
getAttribute
public Attribute getAttribute(PerunSession sess, Facility facility, User user, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGet particular attribute for the user on this facility.- Specified by:
getAttributein interfaceAttributesManagerImplApi- Parameters:
attributeName- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException- if the attribute doesn't exists in the underlaying data source
-
getAttribute
public Attribute getAttribute(PerunSession sess, User user, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGet particular attribute for the user.- Specified by:
getAttributein interfaceAttributesManagerImplApi- Parameters:
sess-user-attributeName- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException- if the attribute doesn't exists in the underlaying data source
-
getAttribute
public Attribute getAttribute(PerunSession sess, Host host, String attributeName) throws AttributeNotExistsException - Specified by:
getAttributein interfaceAttributesManagerImplApi- Throws:
AttributeNotExistsException
-
getAttribute
public Attribute getAttribute(PerunSession sess, Resource resource, Group group, String attributeName) throws AttributeNotExistsException - Specified by:
getAttributein interfaceAttributesManagerImplApi- Throws:
AttributeNotExistsException
-
getAttribute
public Attribute getAttribute(PerunSession sess, String key, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGet particular entityless attribute- Specified by:
getAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionkey- key to get attribute forattributeName-- Returns:
- attribute
- Throws:
AttributeNotExistsException- if the attribute doesn't exists in the underlaying data source
-
getAttribute
public Attribute getAttribute(PerunSession sess, UserExtSource ues, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGet particular attribute for the User External Source.- Specified by:
getAttributein interfaceAttributesManagerImplApi- Parameters:
sess-ues-attributeName- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Facility facility, int id) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGet particular attribute for the facility.- Specified by:
getAttributeByIdin interfaceAttributesManagerImplApi- Parameters:
facility- to get attribute fromid- attribute id- Returns:
- attribute
- Throws:
AttributeNotExistsException- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Vo vo, int id) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGet particular attribute for the vo.- Specified by:
getAttributeByIdin interfaceAttributesManagerImplApi- Parameters:
vo- to get attribute fromid- attribute id- Returns:
- attribute
- Throws:
AttributeNotExistsException- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Resource resource, int id) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGet particular attribute for the resource.- Specified by:
getAttributeByIdin interfaceAttributesManagerImplApi- Parameters:
resource- to get attribute fromid- attribute id- Returns:
- attribute
- Throws:
AttributeNotExistsException- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Member member, Resource resource, int id) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGet particular attribute for the member on this resource.- Specified by:
getAttributeByIdin interfaceAttributesManagerImplApi- Parameters:
member- to get attribute fromresource- to get attribute fromid- attribute id- Returns:
- attribute
- Throws:
AttributeNotExistsException- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Member member, Group group, int id) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGet particular attribute for the member in this group.- Specified by:
getAttributeByIdin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- to get attribute fromgroup- to get attribute fromid- attribute id- Returns:
- attribute
- Throws:
AttributeNotExistsException- if the attribute doesn't exists in the underlying data source
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Member member, int id) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGet particular attribute for the member.- Specified by:
getAttributeByIdin interfaceAttributesManagerImplApi- Parameters:
sess-member-id- attribute id- Returns:
- attribute
- Throws:
AttributeNotExistsException- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Facility facility, User user, int id) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGet particular attribute for the user on this facility.- Specified by:
getAttributeByIdin interfaceAttributesManagerImplApi- Parameters:
sess-facility-user-id- attribute id- Returns:
- attribute
- Throws:
AttributeNotExistsException- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, User user, int id) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGet particular attribute for the user.- Specified by:
getAttributeByIdin interfaceAttributesManagerImplApi- Parameters:
sess-user-id- attribute id- Returns:
- attribute
- Throws:
AttributeNotExistsException- if the attribute doesn't exists in the underlaying data source
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Host host, int id) throws AttributeNotExistsException - Specified by:
getAttributeByIdin interfaceAttributesManagerImplApi- Throws:
AttributeNotExistsException
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Resource resource, Group group, int id) throws AttributeNotExistsException - Specified by:
getAttributeByIdin interfaceAttributesManagerImplApi- Throws:
AttributeNotExistsException
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, Group group, int id) throws AttributeNotExistsException - Specified by:
getAttributeByIdin interfaceAttributesManagerImplApi- Throws:
AttributeNotExistsException
-
getAttributeById
public Attribute getAttributeById(PerunSession sess, UserExtSource ues, int id) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGet particular attribute for the user external source.- Specified by:
getAttributeByIdin interfaceAttributesManagerImplApi- Parameters:
sess-ues-id- attribute id- Returns:
- attribute
- Throws:
AttributeNotExistsException- if the attribute doesn't exists in the underlaying data source
-
getAttributeDefinition
public AttributeDefinition getAttributeDefinition(PerunSession sess, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGet attributes definition (attribute without defined value).- Specified by:
getAttributeDefinitionin interfaceAttributesManagerImplApi- Parameters:
attributeName- attribute name defined in the particular manager- Returns:
- attribute
- Throws:
AttributeNotExistsException- if the attribute doesn't exists in the underlaying data source
-
getAttributeDefinitionById
public AttributeDefinition getAttributeDefinitionById(PerunSession sess, int id) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGet attibute definition (attribute without defined value).- Specified by:
getAttributeDefinitionByIdin interfaceAttributesManagerImplApi- Parameters:
id- attribute id- Returns:
- attribute
- Throws:
AttributeNotExistsException- if the attribute doesn't exists in the underlaying data source
-
getAttributePolicyCollections
public List<AttributePolicyCollection> getAttributePolicyCollections(PerunSession sess, int attributeId) Description copied from interface:AttributesManagerImplApiGets attribute policy collections for an attribute definition with given id.- Specified by:
getAttributePolicyCollectionsin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionattributeId- id of the attribute definition- Returns:
- all policy collections of the attribute definition
-
getAttributes
Description copied from interface:AttributesManagerImplApiGet all non-empty attributes associated with the facility.- Specified by:
getAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionfacility- facility to get the attributes from- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApiGet all attributes associated with the facility which have name in list attrNames (empty too). Virtual attribute too.- Specified by:
getAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionfacility- to get the attributes fromattrNames- list of attributes' names- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApiGet all non-empty attributes associated with the vo.- Specified by:
getAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionvo- vo to get the attributes from- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApiGet all non-empty attributes associated with the group.- Specified by:
getAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessiongroup- group to get the attributes from- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApiGet all non-empty attributes associated with the resource.- Specified by:
getAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresource- resource to get the attributes from- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApiGet all non-empty attributes associated with the member on the resource.- Specified by:
getAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- to get the attributes fromresource- to get the attributes from- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApiGet all non-empty, non-virtual attributes associated with the member in the group.- Specified by:
getAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- to get the attributes fromgroup- group to get the attributes from- Returns:
- list of attributes
-
getAttributes
public List<Attribute> getAttributes(PerunSession sess, Member member, Group group, List<String> attrNames) Description copied from interface:AttributesManagerImplApiGet all attributes (empty and virtual too) associated with the member in the group which have name in list attrNames.- Specified by:
getAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- to get the attributes fromgroup- group to get the attributes fromattrNames- list of attributes' names- Returns:
- list of attributes
-
getAttributes
public List<Attribute> getAttributes(PerunSession sess, Member member, Resource resource, List<String> attrNames) Description copied from interface:AttributesManagerImplApiGet all attributes (empty and virtual too) associated with the member on the resource which have name in list attrNames.- Specified by:
getAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- to get the attributes fromresource- resource to get the attributes fromattrNames- list of attributes' names- Returns:
- list of attributes
-
getAttributes
public List<Attribute> getAttributes(PerunSession sess, Resource resource, Group group, List<String> attrNames) Description copied from interface:AttributesManagerImplApiGet all attributes (empty and virtual too) associated with the group on the resource which have name in list attrNames.- Specified by:
getAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresource- to get the attributes forgroup- to get the attributes forattrNames- list of attributes names- Returns:
- list of selected attributes for group and resource objects
-
getAttributes
public List<Attribute> getAttributes(PerunSession sess, User user, Facility facility, List<String> attrNames) Description copied from interface:AttributesManagerImplApiGet all attributes (empty and virtual too) associated with the user on the facility which have name in list attrNames.- Specified by:
getAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionuser- to get the attributes fromfacility- facility to get the attributes fromattrNames- list of attributes' names- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApiGet all non-empty attributes associated with the member.- Specified by:
getAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- member to get the attributes from- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApiGet all attributes associated with the vo which have name in list attrNames (empty and virtual too).- Specified by:
getAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionvo- to get the attributes fromattrNames- list of attributes' names- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApiGet all attributes associated with the member which have name in list attrNames (empty and virtual too).- Specified by:
getAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- to get the attributes fromattrNames- list of attributes' names- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApiGet all attributes associated with the group which have name in list attrNames (empty too).- Specified by:
getAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessiongroup- to get the attributes fromattrNames- list of attributes' names- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApiGet all attributes associated with the resource which have name in list attrNames (empty too).- Specified by:
getAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresource- to get the attributes fromattrNames- list of attributes' names- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApiGet all attributes associated with the UserExtSource which have name in list attrNames (empty and virtual too).- Specified by:
getAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionues- to get the attributes fromattrNames- list of attributes' names- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApiGet all non-empty attributes associated with the user on the facility.- Specified by:
getAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionfacility-user-- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApiGet all entiteless attributes with subject equaled String key- Specified by:
getAttributesin interfaceAttributesManagerImplApi- Parameters:
sess-key-- Returns:
-
getAttributes
Description copied from interface:AttributesManagerImplApiGet all non-empty attributes associated with the user.- Specified by:
getAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionuser-- Returns:
- list of attributes
-
getAttributes
Description copied from interface:AttributesManagerImplApiGet all attributes associated with the user which have name in list attrNames (empty and virtual too).- Specified by:
getAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionuser- to get the attributes fromattrNames- list of attributes' names- Returns:
- list of attributes
-
getAttributes
- Specified by:
getAttributesin interfaceAttributesManagerImplApi
-
getAttributes
Description copied from interface:AttributesManagerImplApiGet all attributes associated with the host which have name in list attrNames (empty and virtual too). Empty list attrNames will return no attributes.- Specified by:
getAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionhost- host to get attributes forattrNames- list of attributes' names- Returns:
- list of attributes
-
getAttributes
- Specified by:
getAttributesin interfaceAttributesManagerImplApi
-
getAttributes
Description copied from interface:AttributesManagerImplApiGet all non-empty attributes associated with the UserExtSource.- Specified by:
getAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionues- to get the attributes from- Returns:
- list of attributes
-
getAttributesByAttributeDefinition
public List<Attribute> getAttributesByAttributeDefinition(PerunSession sess, AttributeDefinition attributeDefinition) Description copied from interface:AttributesManagerImplApiReturns all attributes with not-null value which fits the attributeDefinition. Can't process core or virtual attributes.- Specified by:
getAttributesByAttributeDefinitionin interfaceAttributesManagerImplApi- Parameters:
sess-attributeDefinition-- Returns:
- list of attributes
-
getAttributesDefinition
Description copied from interface:AttributesManagerImplApiGet attributes definition (attribute without defined value).- Specified by:
getAttributesDefinitionin interfaceAttributesManagerImplApi- Returns:
- List of attributes
-
getAttributesDefinitionByNamespace
public List<AttributeDefinition> getAttributesDefinitionByNamespace(PerunSession sess, String namespace) Description copied from interface:AttributesManagerImplApiGet attributes definition (attribute without defined value) with specified namespace.- Specified by:
getAttributesDefinitionByNamespacein interfaceAttributesManagerImplApi- Parameters:
namespace- get only attributes with this namespace- Returns:
- List of attributes
-
getAttributesModule
Get the attribute module for the attribute- Specified by:
getAttributesModulein interfaceAttributesManagerImplApi- Parameters:
attribute- get the attribute module for this attribute- See Also:
-
getCriticalAttributeActions
Description copied from interface:AttributesManagerImplApiReturns critical actions on given attribute.- Specified by:
getCriticalAttributeActionsin interfaceAttributesManagerImplApi- Parameters:
sess- sessionattrId- attribute definition id- Returns:
- list of critical actions
-
getEntitylessAttrValueForUpdate
public String getEntitylessAttrValueForUpdate(PerunSession sess, int attrId, String key) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiReturn value of entityless attribute by attr_id and key (subject). Value is in the format from DB. IMPORTANT: return only values in String (special format for Map or List)!If value is null, return null. If attribute with subject=key not exists, create new one with null value and return null.
- Specified by:
getEntitylessAttrValueForUpdatein interfaceAttributesManagerImplApi- Parameters:
sess-attrId-key-- Returns:
- attr_value in string
- Throws:
AttributeNotExistsException- throw exception if attribute with value not exists in DB
-
getEntitylessAttributes
Description copied from interface:AttributesManagerImplApiGet all entityless attributes with attributeName- Specified by:
getEntitylessAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionattrName-- Returns:
- attribute
-
getEntitylessKeys
Description copied from interface:AttributesManagerImplApiReturns list of Keys which fits the attributeDefinition.- Specified by:
getEntitylessKeysin interfaceAttributesManagerImplApi- Parameters:
sess-attributeDefinition-- Returns:
-
getEntitylessStringAttributeMapping
public Map<String,String> getEntitylessStringAttributeMapping(PerunSession sess, String attributeName) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGets map from keys to string values for an entityless attribute.- Specified by:
getEntitylessStringAttributeMappingin interfaceAttributesManagerImplApi- Parameters:
sess- not usedattributeName- full attribute name- Returns:
- unordered hashmap
- Throws:
AttributeNotExistsException
-
getPerunBeanIdsForUniqueAttributeValue
public Set<Pair<Integer,Integer>> getPerunBeanIdsForUniqueAttributeValue(PerunSession sess, Attribute attribute) Description copied from interface:AttributesManagerImplApiFinds ids of PerunBeans that have the attribute's value for the attribute.See
AttributesManagerBl.getPerunBeanIdsForUniqueAttributeValue(PerunSession, Attribute)for details.- Specified by:
getPerunBeanIdsForUniqueAttributeValuein interfaceAttributesManagerImplApi
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Resource resource, Facility facility) Description copied from interface:AttributesManagerImplApiGet facility attributes which are required by services. Services are known from the resource.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresource- resource from which the services are takenfacility- you get attributes for this facility- Returns:
- list of facility attributes which are required by services which are assigned to resource
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Resource resource, List<Integer> serviceIds) Description copied from interface:AttributesManagerImplApiGet resource attributes which are required by services.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresource-serviceIds-- Returns:
- list of resource attributes which are required by services which are selceted
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Resource resource) Description copied from interface:AttributesManagerImplApiGet resource attributes which are required by services. Services are known from the resourceToGetServicesFrom.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresourceToGetServicesFrom- resource from which the services are takenresource- resource for which you want to get the attributes- Returns:
- list of resource attributes which are required by services which are assigned to resource.
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member) Description copied from interface:AttributesManagerImplApiGet member attributes which are required by services. Services are known from the resourceToGetServicesFrom.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresourceToGetServicesFrom- resource from which the services are takenmember- you get attributes for this member- Returns:
- list of member attributes which are required by services which are assigned to resource.
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Resource resource) Description copied from interface:AttributesManagerImplApiGet member-resource attributes which are required by services. Services are known from the resourceToGetServicesFrom.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresourceToGetServicesFrom- resource from which the services are takenmember- you get attributes for this member and the resourceresource- you get attributes for this resource and the member- Returns:
- list of member-resource attributes which are required by services which are assigned to another resource.
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Resource resource, Facility facility, User user) Description copied from interface:AttributesManagerImplApiGet user-facility attributes which are required by services. Services are known from the resource.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresource- resource from which the services are takenfacility- facility from which the services are takenuser- you get attributes for this user- Returns:
- list of member-resource attributes which are required by services which are assigned to another resource.
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Resource resource, Group group) - Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi
-
getRequiredAttributes
Description copied from interface:AttributesManagerImplApiGet user attributes which are required by services. Services are known from the resource.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresource-user- you get attributes for this user- Returns:
- list of user attributes which are required by services which are assigned to resource.
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Host host) - Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Group group) - Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi
-
getRequiredAttributes
Description copied from interface:AttributesManagerImplApiGet facility attributes which are required by all services which are connected to this facility.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionfacility- you get attributes for this facility- Returns:
- list of facility attributes which are required by all services which are connected to this facility.
-
getRequiredAttributes
Description copied from interface:AttributesManagerImplApiGet facility attributes which are required by the service.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionservice- attribute required by this service you'll getfacility- you get attributes for this facility- Returns:
- list of facility attributes which are required by the service
-
getRequiredAttributes
Description copied from interface:AttributesManagerImplApiGet vo attributes which are required by the service.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionservice- attribute required by this service you'll getvo- you get attributes for this vo- Returns:
- list of vo attributes which are required by the service
-
getRequiredAttributes
Description copied from interface:AttributesManagerImplApiGet resource attributes which are required by the service.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionservice- attribute required by this service you'll getresource- resource for which you want to get the attributes- Returns:
- list of resource attributes which are required by the service
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Member member, Resource resource) Description copied from interface:AttributesManagerImplApiGet member-resource attributes which are required by the service.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionservice- attribute required by this service you'll getmember- you get attributes for this member and the resourceresource- you get attributes for this resource and the member- Returns:
- list of attributes which are required by the service.
-
getRequiredAttributes
public HashMap<Member,List<Attribute>> getRequiredAttributes(PerunSession sess, Service service, Resource resource, List<Member> members) Description copied from interface:AttributesManagerImplApiGet member-resource attributes which are required by service for each member in list of members.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionservice- attribute required by this serviceresource- you get attributes for this resource and the membersmembers- you get attributes for this list of members and the resource- Returns:
- map of member and his list of attributes
-
getRequiredAttributes
public HashMap<Member,List<Attribute>> getRequiredAttributes(PerunSession sess, Resource resource, Service service, List<Member> members) Description copied from interface:AttributesManagerImplApiGet member attributes which are required by service for each member in list of members.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresource- resource only to get allowed membersservice- attribute required by this servicemembers- you get attributes for this list of members- Returns:
- map of member and his list of attributes
-
getRequiredAttributes
public HashMap<User,List<Attribute>> getRequiredAttributes(PerunSession sess, Service service, Facility facility, List<User> users) Description copied from interface:AttributesManagerImplApiGet user-facility attributes which are required by the service for each user in list of users.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionservice- attribute required by this servicefacility- you get attributes for this facility and userusers- you get attributes for this user and facility- Returns:
- map of userID and his list of attributes
-
getRequiredAttributes
public HashMap<User,List<Attribute>> getRequiredAttributes(PerunSession sess, Service service, List<User> users) Description copied from interface:AttributesManagerImplApiGet user attributes which are required by the service for each user in list of users.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionservice- attribute required by this serviceusers- you get attributes for this user and facility- Returns:
- map of userID and his list of attributes
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Member member, Group group) Description copied from interface:AttributesManagerImplApiGet member-group attributes which are required by the service.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionservice- attribute required by this service you'll getmember- you get attributes for this member and the groupgroup- you get attributes for this group in which member is associated- Returns:
- list of attributes which are required by the service.
-
getRequiredAttributes
public Map<Member,List<Attribute>> getRequiredAttributes(PerunSession sess, Service service, List<Member> members, Group group) Description copied from interface:AttributesManagerImplApiGet member-group attributes which are required by the service, for the given members and the given group.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionservice- attribute required by this service you'll getmembers- you get attributes for this member and the groupgroup- you get attributes for these groups in which member is associated- Returns:
- list of attributes which are required by the service.
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Group group) Description copied from interface:AttributesManagerImplApiGet member-group attributes which are required by services. Services are known from the resourceToGetServicesFrom.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresourceToGetServicesFrom- resource from which the services are takenmember- you get attributes for this member and the groupgroup- you get attributes for this group and the member- Returns:
- list of member-group attributes which are required by services which are assigned to another resource.
-
getRequiredAttributes
Description copied from interface:AttributesManagerImplApiGet member attributes which are required by the service.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionservice- attribute required by this service you'll getmember-- Returns:
- list of attributes which are required by the service.
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Facility facility, User user) Description copied from interface:AttributesManagerImplApiGet user-facility attributes which are required by the service.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionservice- attribute required by this service you'll getfacility-user-- Returns:
- list of attributes which are required by the service.
-
getRequiredAttributes
Description copied from interface:AttributesManagerImplApiGet user attributes which are required by the service.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionservice- attribute required by this service you'll getuser-- Returns:
- list of attributes which are required by the service.
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Resource resource, Group group) - Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, List<Service> services, Resource resource, Group group) Description copied from interface:AttributesManagerImplApiGet group-resource attributes which are required by the services.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- sessionservices- servicesresource- resourcegroup- group- Returns:
- list of attributes which are required by the service.
-
getRequiredAttributes
- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi
-
getRequiredAttributes
- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi
-
getRequiredAttributes
public List<Attribute> getRequiredAttributes(PerunSession sess, List<Service> services, Group group) Description copied from interface:AttributesManagerImplApiGet group attributes which are required by the given services.- Specified by:
getRequiredAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- sessionservices- servicesgroup- group- Returns:
- list of group attributes which are required by the given services
-
getRequiredAttributesDefinition
public List<AttributeDefinition> getRequiredAttributesDefinition(PerunSession sess, Service service) Description copied from interface:AttributesManagerImplApiGet all attributes which are required by service. Required attribues are requisite for Service to run.- Specified by:
getRequiredAttributesDefinitionin interfaceAttributesManagerImplApi- Parameters:
sess- sessservice- service from which the attributes will be listed- Returns:
- All attributes which are required by service.
-
getRequiredAttributesForGroups
public Map<Group,List<Attribute>> getRequiredAttributesForGroups(PerunSession sess, Service service, List<Group> groups) Description copied from interface:AttributesManagerImplApiGet group attributes which are required by the given service for given groups.- Specified by:
getRequiredAttributesForGroupsin interfaceAttributesManagerImplApi- Parameters:
sess- sessionservice- service for which are taken the required attributesgroups- groups- Returns:
- attributes mapped by their groups
-
getResourceRequiredAttributesDefinition
public List<AttributeDefinition> getResourceRequiredAttributesDefinition(PerunSession sess, Resource resource) Description copied from interface:AttributesManagerImplApiGet attributes definions required by all services assigned on the resource.- Specified by:
getResourceRequiredAttributesDefinitionin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresource-- Returns:
- attributes definions required by all services assigned on the resource.
-
getUninitializedAttributesModule
public AttributesModuleImplApi getUninitializedAttributesModule(PerunSession sess, AttributeDefinition attributeDefinition) Description copied from interface:AttributesManagerImplApiGet uninitiated attributeModule for the attribute- Specified by:
getUninitializedAttributesModulein interfaceAttributesManagerImplApi- Parameters:
attributeDefinition- get the attribute module for this attribute- See Also:
-
getUserAttrValueForUpdate
public String getUserAttrValueForUpdate(PerunSession sess, int attrId, int userId) throws AttributeNotExistsException Description copied from interface:AttributesManagerImplApiGet particular attribute for the user for update - locking the attribute for user.- Specified by:
getUserAttrValueForUpdatein interfaceAttributesManagerImplApi- Parameters:
sess-attrId-userId-- Returns:
- attribute value
- Throws:
AttributeNotExistsException- if the attribute doesn't exists in the underlying data source
-
getUserFacilityAttributesForAnyUser
Description copied from interface:AttributesManagerImplApiGet all non-empty attributes associated with any user on the facility.- Specified by:
getUserFacilityAttributesForAnyUserin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionfacility-- Returns:
- list of attributes
-
getUserIdsByLogin
Description copied from interface:AttributesManagerImplApiGets IDs of users who use the given login in any namespace.- Specified by:
getUserIdsByLoginin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionlogin- login- Returns:
- list of user IDs
-
getUserVirtualAttributeModule
public UserVirtualAttributesModuleImplApi getUserVirtualAttributeModule(PerunSession sess, AttributeDefinition attribute) Description copied from interface:AttributesManagerImplApiGet user virtual attribute module by the attribute.- Specified by:
getUserVirtualAttributeModulein interfaceAttributesManagerImplApi- Parameters:
sess-attribute- attribute for which you get the module- Returns:
- instance of user attribute module
-
getVirtualAttributes
Description copied from interface:AttributesManagerImplApiGet all virtual attributes associated with the facility.- Specified by:
getVirtualAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionfacility- to get the attributes from- Returns:
- list of attributes
-
getVirtualAttributes
Description copied from interface:AttributesManagerImplApiGet all virtual attributes associated with the member.- Specified by:
getVirtualAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- to get the attributes from- Returns:
- list of attributes
-
getVirtualAttributes
Description copied from interface:AttributesManagerImplApiGet all virtual attributes associated with the vo.- Specified by:
getVirtualAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionvo- to get the attributes from- Returns:
- list of attributes
-
getVirtualAttributes
Description copied from interface:AttributesManagerImplApiGet all virtual attributes associated with the group.- Specified by:
getVirtualAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessiongroup- to get the attributes from- Returns:
- list of attributes
-
getVirtualAttributes
Description copied from interface:AttributesManagerImplApiGet all virtual attributes associated with the host.- Specified by:
getVirtualAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionhost- to get the attributes from- Returns:
- list of attributes
-
getVirtualAttributes
Description copied from interface:AttributesManagerImplApiGet all virtual attributes associated with the resource.- Specified by:
getVirtualAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresource- to get the attributes from- Returns:
- list of attributes
-
getVirtualAttributes
Description copied from interface:AttributesManagerImplApiGet all virtual attributes associated with the member on the resource.- Specified by:
getVirtualAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- to get the attributes fromresource- to get the attributes from- Returns:
- list of attributes
-
getVirtualAttributes
Description copied from interface:AttributesManagerImplApiGet all virtual attributes associated with the user on the facility.- Specified by:
getVirtualAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionfacility- to get the attributes fromuser- to get the attributes from- Returns:
- list of attributes
-
getVirtualAttributes
Description copied from interface:AttributesManagerImplApiGet all virtual attributes associated with the member in the group.- Specified by:
getVirtualAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- to get the attributes fromgroup- to get the attributes from- Returns:
- list of attributes
-
getVirtualAttributes
Description copied from interface:AttributesManagerImplApiGet all virtual attributes associated with the user.- Specified by:
getVirtualAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionuser- to get the attributes from- Returns:
- list of attributes
-
getVirtualAttributes
Description copied from interface:AttributesManagerImplApiGet all virtual attributes associated with the UserExtSource.- Specified by:
getVirtualAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionues- to get the attributes from- Returns:
- list of attributes
-
initAndRegisterAttributeModules
public void initAndRegisterAttributeModules(PerunSession sess, ServiceLoader<AttributesModuleImplApi> modules, Set<AttributeDefinition> allAttributesDef) Description copied from interface:AttributesManagerImplApiInit attribute modules map in Impl layer. And register them in Auditer for message listening.- Specified by:
initAndRegisterAttributeModulesin interfaceAttributesManagerImplApi- Parameters:
modules- List of attribute module class instances- See Also:
-
initAttributeModule
Description copied from interface:AttributesManagerImplApiAdd attribute module to attribute module map in Impl layer (if it is not there yet).- Specified by:
initAttributeModulein interfaceAttributesManagerImplApi- Parameters:
module- module to add- See Also:
-
insertAttribute
public boolean insertAttribute(PerunSession sess, Attribute attribute, String tableName, List<String> columnNames, List<Object> columnValues) Description copied from interface:AttributesManagerImplApiInsert attribute value in DB.- Specified by:
insertAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionattribute- that will be stored in the DBtableName- in the database in which the attribute will be insertedcolumnNames- of the database table in which the attribute will be writtencolumnValues- of the objects, for which the attribute will be written, corresponding to the columnNames- Returns:
- true if new value differs from old value (i.e. values changed) false otherwise (value do not change)
-
isAttributeActionCritical
public boolean isAttributeActionCritical(PerunSession sess, AttributeDefinition attr, AttributeAction action) Description copied from interface:AttributesManagerImplApiChecks if the action is critical on given attribute.- Specified by:
isAttributeActionCriticalin interfaceAttributesManagerImplApi- Parameters:
sess- sessionattr- attribute definitionaction- critical action- Returns:
- true if action is critical, false otherwise
-
isAttributeActionGloballyCritical
public boolean isAttributeActionGloballyCritical(PerunSession sess, int attrId, AttributeAction action) Description copied from interface:AttributesManagerImplApiChecks if the action is critical on given attribute for all objects.- Specified by:
isAttributeActionGloballyCriticalin interfaceAttributesManagerImplApi- Parameters:
sess- sessionattrId- attribute definition idaction- critical action- Returns:
- true if action is globally critical, false otherwise
-
isAttributeValueBlocked
Description copied from interface:AttributesManagerImplApiChecks whether the value of the passed attribute (checks separate key-value pairs and list items as well) is blocked (in namespace if the attribute is namespace based). Throws exception with details if blocked- Specified by:
isAttributeValueBlockedin interfaceAttributesManagerImplApi- Parameters:
session-attribute-- Returns:
- pair, the left being a boolean - true if value blocked, right being a string providing further information, mainly for the complex attribute types (e.g. which key-value pair is blocked, etc.)
-
isAttributeRequiredByFacility
public boolean isAttributeRequiredByFacility(PerunSession sess, Facility facility, AttributeDefinition attributeDefinition) Description copied from interface:AttributesManagerImplApiCheck if this attribute is currently required on this facility. Attribute can be from any namespace.- Specified by:
isAttributeRequiredByFacilityin interfaceAttributesManagerImplApi- Parameters:
sess-facility-attributeDefinition-- Returns:
-
isAttributeRequiredByGroup
public boolean isAttributeRequiredByGroup(PerunSession sess, Group group, AttributeDefinition attributeDefinition) Description copied from interface:AttributesManagerImplApiCheck if this attribute is currently required on this group. Attribute can be from any namespace.- Specified by:
isAttributeRequiredByGroupin interfaceAttributesManagerImplApi- Parameters:
sess-group-attributeDefinition-- Returns:
-
isAttributeRequiredByResource
public boolean isAttributeRequiredByResource(PerunSession sess, Resource resource, AttributeDefinition attributeDefinition) Description copied from interface:AttributesManagerImplApiCheck if this attribute is currently required on this resource. Attribute can be from any namespace.- Specified by:
isAttributeRequiredByResourcein interfaceAttributesManagerImplApi- Parameters:
sess-resource-attributeDefinition-- Returns:
-
isAttributeRequiredByVo
public boolean isAttributeRequiredByVo(PerunSession sess, Vo vo, AttributeDefinition attributeDefinition) Description copied from interface:AttributesManagerImplApiCheck if this attribute is currently required on this vo. Attribute can be from any namespace.- Specified by:
isAttributeRequiredByVoin interfaceAttributesManagerImplApi- Parameters:
sess-vo-attributeDefinition-- Returns:
-
isCoreAttribute
Description copied from interface:AttributesManagerImplApiDetermine if attribute is core attribute.- Specified by:
isCoreAttributein interfaceAttributesManagerImplApi- Parameters:
sess-attribute-- Returns:
- true if attribute is core attribute
-
isCoreManagedAttribute
Description copied from interface:AttributesManagerImplApiDetermine if attribute is core-managed attribute.- Specified by:
isCoreManagedAttributein interfaceAttributesManagerImplApi- Parameters:
sess-attribute-- Returns:
- true if attribute is core-managed
-
isDefAttribute
Description copied from interface:AttributesManagerImplApiDetermine if attribute is defined (def) attribute.- Specified by:
isDefAttributein interfaceAttributesManagerImplApi- Parameters:
sess-attribute-- Returns:
- true if attribute is defined attribute false otherwise
-
isFromNamespace
Description copied from interface:AttributesManagerImplApiDetermine if attribute is from specified namespace.- Specified by:
isFromNamespacein interfaceAttributesManagerImplApi- Parameters:
attribute-namespace-- Returns:
- true if the attribute is from specified namespace false otherwise
-
isLoginAlreadyUsed
Description copied from interface:AttributesManagerImplApiCheck if the login is already in use for some namespace or globally- Specified by:
isLoginAlreadyUsedin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionlogin- login to be checkednamespace- login can be checked for given namespace or globally, if namespace is null- Returns:
- true if login is already in use
-
isOptAttribute
Description copied from interface:AttributesManagerImplApiDetermine if attribute is optional (opt) attribute.- Specified by:
isOptAttributein interfaceAttributesManagerImplApi- Parameters:
sess-attribute-- Returns:
- true if attribute is optional attribute false otherwise
-
isVirtAttribute
Description copied from interface:AttributesManagerImplApiDetermine if attribute is virtual attribute.- Specified by:
isVirtAttributein interfaceAttributesManagerImplApi- Parameters:
sess-attribute-- Returns:
- true if attribute is virtual
-
registerAttributeModule
Description copied from interface:AttributesManagerImplApiRegister attribute module in Auditer for message listening (if it is not there yet).- Specified by:
registerAttributeModulein interfaceAttributesManagerImplApi- Parameters:
module- module to register- See Also:
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApiUnset all attributes for the facility.- Specified by:
removeAllAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionfacility- remove attributes from this facility- Returns:
trueif attributes was deleted orfalseif attributes was not deleted
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApiUnset all attributes for the vo.- Specified by:
removeAllAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionvo- remove attributes from this vo- Returns:
trueif attributes was deleted orfalseif attributes was not deleted
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApiUnset all attributes for the group.- Specified by:
removeAllAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessiongroup- remove attributes from this group- Returns:
trueif attributes was deleted orfalseif attributes was not deleted
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApiUnset all attributes for the resource.- Specified by:
removeAllAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresource- remove attributes from this resource- Returns:
trueif attributes was deleted orfalseif attributes was not deleted
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApiUnset all (member-resource) attributes for the member on the resource.- Specified by:
removeAllAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- remove attributes from this memberresource- remove attributes from this resource- Returns:
trueif attributes was deleted orfalseif attributes was not deleted
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApiUnset all attributes for the member in the group.- Specified by:
removeAllAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- remove attributes from this membergroup- remove attributes for this group- Returns:
trueif attributes was deleted orfalseif attributes was not deleted
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApiUnset all member attributes for the member.- Specified by:
removeAllAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember-- Returns:
trueif attributes was deleted orfalseif attributes was not deleted
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApiUnset all (user-facility) non-virtual attributes for the user on the facility.- Specified by:
removeAllAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionfacility-user-- Returns:
trueif attributes was deleted orfalseif attributes was not deleted
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApiUnset all user attributes for the user.- Specified by:
removeAllAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionuser-- Returns:
trueif attributes was deleted orfalseif attributes was not deleted
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApiUnset all user attributes for the host.- Specified by:
removeAllAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionhost-- Returns:
trueif attributes was deleted orfalseif attributes was not deleted
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApiUnset all group_resource attributes- Specified by:
removeAllAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresource- Resourcegroup- Group- Returns:
trueif attributes was deleted orfalseif attributes was not deleted
-
removeAllAttributes
Description copied from interface:AttributesManagerImplApiUnset all UserExtSource attributes for the user external source.- Specified by:
removeAllAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionues-- Returns:
trueif attributes was deleted orfalseif attributes was not deleted
-
removeAllGroupResourceAttributes
Description copied from interface:AttributesManagerImplApiRemove all non-virtual group-resource attribute on selected resource- Specified by:
removeAllGroupResourceAttributesin interfaceAttributesManagerImplApi- Parameters:
sess-resource-
-
removeAllMemberResourceAttributes
Description copied from interface:AttributesManagerImplApiRemove all non-virtual member-resource attributes assigned to resource- Specified by:
removeAllMemberResourceAttributesin interfaceAttributesManagerImplApi- Parameters:
sess-resource-
-
removeAllUserFacilityAttributes
Description copied from interface:AttributesManagerImplApiUnset all (user-facility) non-virtual attributes for the user and all facilities- Specified by:
removeAllUserFacilityAttributesin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionuser-- Returns:
trueif attributes was deleted orfalseif attributes was not deleted
-
removeAllUserFacilityAttributesForAnyUser
Description copied from interface:AttributesManagerImplApiUnset all (user-facility) non-virtual attributes for any user on the facility.- Specified by:
removeAllUserFacilityAttributesForAnyUserin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionfacility-
-
removeAndUnregisterAttrModule
Description copied from interface:AttributesManagerImplApiRemove attribute module of the given non-core attribute from attribute module map in Impl layer and unregister the module from Auditer, however only if it is namespace-specific to avoid removing common module from other active namespace-specific modules. If no namespace-specific modules remain for the attribute, the common module will not be removed. To remove the common module, pass the common definition as parameter.- Specified by:
removeAndUnregisterAttrModulein interfaceAttributesManagerImplApi- Parameters:
sess- sessattribute- attribute of which module to remove
-
removeAttribute
Description copied from interface:AttributesManagerImplApiUnset particular attribute for the facility.- Specified by:
removeAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionfacility- remove attribute from this facilityattribute- attribute to remove- Returns:
trueif attribute was changed (deleted) orfalseif attribute was not present in a first place
-
removeAttribute
Description copied from interface:AttributesManagerImplApiUnset particular entityless attribute with subject equals key.- Specified by:
removeAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionkey- subject of entityless attributeattribute- attribute to remove- Returns:
trueif attribute was changed (deleted) orfalseif attribute was not present in a first place
-
removeAttribute
Description copied from interface:AttributesManagerImplApiUnset particular attribute for the vo.- Specified by:
removeAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionvo- remove attribute from this voattribute- attribute to remove- Returns:
trueif attribute was changed (deleted) orfalseif attribute was not present in a first place
-
removeAttribute
Description copied from interface:AttributesManagerImplApiUnset particular attribute for the group.- Specified by:
removeAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessiongroup- remove attribute from this groupattribute- attribute to remove- Returns:
trueif attribute was changed (deleted) orfalseif attribute was not present in a first place
-
removeAttribute
Description copied from interface:AttributesManagerImplApiUnset particular attribute for the resource.- Specified by:
removeAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresource- remove attribute from this resourceattribute- attribute to remove- Returns:
trueif attribute was changed (deleted) orfalseif attribute was not present in a first place
-
removeAttribute
public boolean removeAttribute(PerunSession sess, Member member, Resource resource, AttributeDefinition attribute) Description copied from interface:AttributesManagerImplApiUnset particular member-resorce attribute for the member on the resource.- Specified by:
removeAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- remove attribute from this memberresource- remove attributes for this resourceattribute- attribute to remove- Returns:
trueif attribute was changed (deleted) orfalseif attribute was not present in a first place
-
removeAttribute
public boolean removeAttribute(PerunSession sess, Member member, Group group, AttributeDefinition attribute) Description copied from interface:AttributesManagerImplApiUnset particular attribute for the member in the group. Core attributes can't be removed this way.- Specified by:
removeAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- remove attribute from this membergroup- remove attributes for this groupattribute- attribute to remove- Returns:
trueif attribute was changed (deleted) orfalseif attribute was not present in a first place
-
removeAttribute
Description copied from interface:AttributesManagerImplApiUnset particular member attribute- Specified by:
removeAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember-attribute- attribute to remove- Returns:
trueif attribute was changed (deleted) orfalseif attribute was not present in a first place
-
removeAttribute
public boolean removeAttribute(PerunSession sess, Facility facility, User user, AttributeDefinition attribute) Description copied from interface:AttributesManagerImplApiUnset particular user-facility attribute- Specified by:
removeAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionfacility-user-attribute- attribute to remove- Returns:
trueif attribute was changed (deleted) orfalseif attribute was not present in a first place
-
removeAttribute
Description copied from interface:AttributesManagerImplApiUnset particular user attribute- Specified by:
removeAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionuser-attribute- attribute to remove- Returns:
trueif attribute was changed (deleted) orfalseif attribute was not present in a first place
-
removeAttribute
Description copied from interface:AttributesManagerImplApiUnset particular host attribute- Specified by:
removeAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionhost-attribute- attribute to remove- Returns:
trueif attribute was changed (deleted) orfalseif attribute was not present in a first place
-
removeAttribute
public boolean removeAttribute(PerunSession sess, Resource resource, Group group, AttributeDefinition attribute) Description copied from interface:AttributesManagerImplApiUnset particular group_resource attribute- Specified by:
removeAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresource- resourcegroup- groupattribute- attribute to remove- Returns:
trueif attribute was changed (deleted) orfalseif attribute was not present in a first place
-
removeAttribute
Description copied from interface:AttributesManagerImplApiUnset particular user external source attribute- Specified by:
removeAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionues-attribute- attribute to remove- Returns:
trueif attribute was changed (deleted) orfalseif attribute was not present in a first place
-
removeAttributeModule
Description copied from interface:AttributesManagerImplApiRemove attribute module from attribute module map in Impl layer.- Specified by:
removeAttributeModulein interfaceAttributesManagerImplApi- Parameters:
module- module to remove- See Also:
-
removeVirtualAttribute
public boolean removeVirtualAttribute(PerunSession sess, Facility facility, User user, AttributeDefinition attribute) Description copied from interface:AttributesManagerImplApiUnset particular user-facility virtual attribute value.- Specified by:
removeVirtualAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionfacility-user-attribute- attribute to remove- Returns:
trueif attribute was changed (deleted) orfalseif attribute was not present in a first place
-
removeVirtualAttribute
public boolean removeVirtualAttribute(PerunSession sess, Resource resource, AttributeDefinition attribute) throws WrongAttributeValueException, WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApiUnset particular resource virtual attribute value.- Specified by:
removeVirtualAttributein interfaceAttributesManagerImplApi- Parameters:
sess-resource-attribute-- Returns:
trueif attribute was changed (deleted) orfalseif attribute was not present in a first place- Throws:
WrongAttributeValueExceptionWrongReferenceAttributeValueException
-
removeVirtualAttribute
public boolean removeVirtualAttribute(PerunSession sess, Resource resource, Group group, AttributeDefinition attribute) Description copied from interface:AttributesManagerImplApiUnset particular group-resource virtual attribute value.- Specified by:
removeVirtualAttributein interfaceAttributesManagerImplApi- Parameters:
sess-resource-group-attribute-- Returns:
trueif attribute was changed (deleted) orfalseif attribute was not present in a first place
-
setAttribute
public boolean setAttribute(PerunSession sess, Object object, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException Description copied from interface:AttributesManagerImplApiStore the particular attribute associated with the given perun bean. If an attribute is core attribute then the attribute isn't stored (It's skkiped whithout any notification).- Specified by:
setAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionobject- object of setting the attribute, must be one of perunBean or stringattribute- attribute to set- Returns:
- true if new value differs from old value (i.e. values changed) false otherwise (value do not change)
- Throws:
WrongAttributeAssignmentException- if the namespace of the attribute does not match the perunBeanWrongAttributeValueException
-
setAttribute
public boolean setAttribute(PerunSession sess, PerunBean bean1, PerunBean bean2, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException Description copied from interface:AttributesManagerImplApiStore the particular attribute associated with the bean1 and bean2. If an attribute is core attribute then the attribute isn't stored (It's skkiped whithout any notification).- Specified by:
setAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionbean1- first perun beanbean2- second perun beanattribute- attribute to set- Returns:
- true if new value differs from old value (i.e. values changed) false otherwise (value do not change)
- Throws:
WrongAttributeAssignmentExceptionWrongAttributeValueException
-
setAttributeActionCriticality
public void setAttributeActionCriticality(PerunSession sess, AttributeDefinition attr, AttributeAction action, boolean critical, boolean global) throws RelationExistsException, RelationNotExistsException Description copied from interface:AttributesManagerImplApiMarks the action on attribute as critical, which may require additional authentication of user performing that action on attribute.- Specified by:
setAttributeActionCriticalityin interfaceAttributesManagerImplApi- Parameters:
sess- sessionattr- attribute definitionaction- critical actioncritical- true if action should be set critical, false to non-criticalglobal- true if action should be globally critical, false if action should be critical only for critical objects- Throws:
RelationExistsException- if trying to mark already critical actionRelationNotExistsException- if trying to unmark not critical action
-
setAttributePolicyCollections
public void setAttributePolicyCollections(PerunSession sess, List<AttributePolicyCollection> policyCollections) Description copied from interface:AttributesManagerImplApiDeletes old attribute policy collections and sets all new attribute policy collections.- Specified by:
setAttributePolicyCollectionsin interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionpolicyCollections- list of policy collections to set
-
setAttributeWithNullValue
Description copied from interface:AttributesManagerImplApiSet entityless attribute with null value (for key and attribute). Shouldn't be called from upper layer !!!- Specified by:
setAttributeWithNullValuein interfaceAttributesManagerImplApi- Parameters:
sess-key- key for storing entityless attributeattribute- attribute to set- Returns:
- true if insert is ok
-
setAttributeWithNullValue
Description copied from interface:AttributesManagerImplApiSet user attribute with null value (for user and attribute). Shouldn't be called from upper layer !!!- Specified by:
setAttributeWithNullValuein interfaceAttributesManagerImplApi- Parameters:
sess-userId- ID of User to store attribute forattribute- attribute to set- Returns:
- true if insert is ok
-
setPerun
-
setSelf
-
setVirtualAttribute
public boolean setVirtualAttribute(PerunSession sess, Facility facility, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApiStore the particular virtual attribute associated with the facility.- Specified by:
setVirtualAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionfacility-attribute- attribute to set- Returns:
- true if attribute was really changed
- Throws:
WrongReferenceAttributeValueException
-
setVirtualAttribute
public boolean setVirtualAttribute(PerunSession sess, Resource resource, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApiStore the particular virtual attribute associated with the resource.- Specified by:
setVirtualAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresource-attribute- attribute to set- Returns:
- true if attribute was really changed
- Throws:
WrongReferenceAttributeValueException
-
setVirtualAttribute
Description copied from interface:AttributesManagerImplApiStore the particular virtual attribute associated with the group.- Specified by:
setVirtualAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessiongroup-attribute- attribute to set- Returns:
- true if attribute was really changed
-
setVirtualAttribute
public boolean setVirtualAttribute(PerunSession sess, Facility facility, User user, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApiStore the particular virtual attribute associated with the facility and user combination.- Specified by:
setVirtualAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionfacility-user-attribute- attribute to set- Returns:
- true if attribute was really changed
- Throws:
WrongReferenceAttributeValueException
-
setVirtualAttribute
public boolean setVirtualAttribute(PerunSession sess, Resource resource, Group group, Attribute attribute) throws WrongReferenceAttributeValueException Description copied from interface:AttributesManagerImplApiStore the particular virtual attribute associated with the resource and group combination.- Specified by:
setVirtualAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionresource-group-attribute- attribute to set- Returns:
- true if attribute was really changed
- Throws:
WrongReferenceAttributeValueException
-
setVirtualAttribute
public boolean setVirtualAttribute(PerunSession sess, Member member, Group group, Attribute attribute) Description copied from interface:AttributesManagerImplApiStore the particular virtual attribute associated with the member and group combination.- Specified by:
setVirtualAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember- member to set ongroup- group to set onattribute- attribute to set- Returns:
- true if attribute was really changed
-
setVirtualAttribute
Description copied from interface:AttributesManagerImplApiStore the particular virtual attribute associated with the member.- Specified by:
setVirtualAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionmember-attribute- attribute to set- Returns:
- true if attribute was really changed
-
setVirtualAttribute
Description copied from interface:AttributesManagerImplApiStore the particular virtual attribute associated with the user.- Specified by:
setVirtualAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionuser-attribute- attribute to set- Returns:
- true if attribute was really changed
-
setVirtualAttribute
Description copied from interface:AttributesManagerImplApiStore the particular virtual attribute associated with the user external source.- Specified by:
setVirtualAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionues-attribute- attribute to set- Returns:
- true if attribute was really changed
-
unregisterAttributeModule
Description copied from interface:AttributesManagerImplApiUnregister attribute module in Auditer from message listening (if it is not there yet).- Specified by:
unregisterAttributeModulein interfaceAttributesManagerImplApi- Parameters:
module- module to unregister- See Also:
-
updateAttribute
public boolean updateAttribute(PerunSession sess, Attribute attribute, String tableName, List<String> columnNames, List<Object> columnValues) Description copied from interface:AttributesManagerImplApiUpdate attribute value in DB.- Specified by:
updateAttributein interfaceAttributesManagerImplApi- Parameters:
sess- perun sessionattribute- that will be stored in the DBtableName- in the database for updatingcolumnNames- of the database table in which the attribute will be writtencolumnValues- of the objects, for which the attribute will be written, corresponding to the columnNames- Returns:
- true if new value differs from old value (i.e. values changed) false otherwise (value do not change)
-
updateAttributeDefinition
public AttributeDefinition updateAttributeDefinition(PerunSession perunSession, AttributeDefinition attributeDefinition) Description copied from interface:AttributesManagerImplApiUpdates AttributeDefinition.- Specified by:
updateAttributeDefinitionin interfaceAttributesManagerImplApi- Parameters:
perunSession-attributeDefinition-- Returns:
- returns updated attributeDefinition
-