use of cz.metacentrum.perun.core.api.AttributeDefinition in project perun by CESNET.
the class urn_perun_resource_attribute_def_def_projectsBasePath method getAttributeDefinition.
public AttributeDefinition getAttributeDefinition() {
AttributeDefinition attr = new AttributeDefinition();
attr.setNamespace(AttributesManager.NS_RESOURCE_ATTR_DEF);
attr.setFriendlyName("projectsBasePath");
attr.setDisplayName("Projects base path");
attr.setType(String.class.getName());
attr.setDescription("Path to base directory of projects.");
return attr;
}
use of cz.metacentrum.perun.core.api.AttributeDefinition in project perun by CESNET.
the class urn_perun_resource_attribute_def_def_redmineProjectID method getAttributeDefinition.
@Override
public AttributeDefinition getAttributeDefinition() {
AttributeDefinition attr = new AttributeDefinition();
attr.setNamespace(AttributesManager.NS_RESOURCE_ATTR_DEF);
attr.setFriendlyName("redmineProjectID");
attr.setDisplayName("Redmine project ID");
attr.setType(String.class.getName());
attr.setDescription("ID for redmine project.");
return attr;
}
use of cz.metacentrum.perun.core.api.AttributeDefinition in project perun by CESNET.
the class urn_perun_user_facility_attribute_def_def_basicDefaultGID method fillAttribute.
@Override
public Attribute fillAttribute(PerunSessionImpl sess, Facility facility, User user, AttributeDefinition attributeDefinition) throws InternalErrorException, WrongAttributeAssignmentException {
Attribute attribute = new Attribute(attributeDefinition);
List<Resource> allowedResources = sess.getPerunBl().getUsersManagerBl().getAllowedResources(sess, facility, user);
try {
for (Resource resource : allowedResources) {
List<AttributeDefinition> resourceRequiredAttributesDefinitions = sess.getPerunBl().getAttributesManagerBl().getResourceRequiredAttributesDefinition(sess, resource);
//if this attribute is not required by the services on the resource, skip the resource
if (!resourceRequiredAttributesDefinitions.contains(attributeDefinition)) {
continue;
}
Attribute unixGidAttribute = sess.getPerunBl().getAttributesManagerBl().getAttribute(sess, resource, AttributesManager.NS_RESOURCE_ATTR_VIRT + ":unixGID");
if (unixGidAttribute.getValue() != null) {
attribute.setValue(unixGidAttribute.getValue());
return attribute;
}
}
} catch (AttributeNotExistsException ex) {
throw new ConsistencyErrorException(ex);
}
return attribute;
}
use of cz.metacentrum.perun.core.api.AttributeDefinition in project perun by CESNET.
the class urn_perun_user_facility_attribute_def_def_basicDefaultGID method getAttributeDefinition.
public AttributeDefinition getAttributeDefinition() {
AttributeDefinition attr = new AttributeDefinition();
attr.setNamespace(AttributesManager.NS_USER_FACILITY_ATTR_DEF);
attr.setFriendlyName("basicDefaultGID");
attr.setType(Integer.class.getName());
attr.setDescription("Pregenerated primary unix gid which is used if user doesn't have other preferencies.");
return attr;
}
use of cz.metacentrum.perun.core.api.AttributeDefinition in project perun by CESNET.
the class urn_perun_user_attribute_def_virt_preferredPhone method getAttributeDefinition.
public AttributeDefinition getAttributeDefinition() {
AttributeDefinition attr = new AttributeDefinition();
attr.setNamespace(AttributesManager.NS_USER_ATTR_VIRT);
attr.setFriendlyName("preferredPhone");
attr.setDisplayName("Preferred phone");
attr.setType(String.class.getName());
attr.setDescription("Preferred phone resolved from phone, mobilePhone and privatePhone (both DC2 and KOS).");
return attr;
}
Aggregations