public final class AttributeHelper extends Object
Modifier and Type | Method and Description |
---|---|
static LinkedHashMap |
getAttributes(FdkSession fsession,
LibraryObject reposObject,
AttributeRequest[] attributes)
Returns the map of specified attributes.
|
static String |
getNameAttribute(FdkSession session,
LibraryObject reposObject)
Returns the NAME attribute for an object based on the handler for
the attribute.
|
static Object |
implicitConversion(FdkSessionImpl session,
Object value,
AttributeRequest[] requestedAttrs)
Converts the return value of an attribute to the proper type based on some
implicit rules:
PropertyBundle -> NamedValue[]
LibraryObject -> Item
LibraryObject[] -> Item[]
AttributeValue -> implicitConversion(session, av.getObject(), ar)
|
static void |
setAttributes(FdkSessionImpl session,
LibraryObject reposObject,
NamedValue[] attributes)
Sets the attributes on a given repository object.
|
public static final LinkedHashMap getAttributes(FdkSession fsession, LibraryObject reposObject, AttributeRequest[] attributes) throws FdkException
fsession
- The user session to use.reposObject
- The repository object to get the attributes from.attributes
- The attributes requested.
Must not be null
.null
will be returned. A LinkedHashMap
is returned so that it is guaranteed that the iterator on the
map will return the attributes in the same order as requested
by the caller.FdkException
public static final String getNameAttribute(FdkSession session, LibraryObject reposObject) throws FdkException, IfsException
session
- The session to use.reposObject
- The object whose NAME attribute to return.FdkException
IfsException
public static final void setAttributes(FdkSessionImpl session, LibraryObject reposObject, NamedValue[] attributes) throws FdkException
session
- The user session to use.reposObject
- The repository object to set the attributes on.attributes
- The list of attributes to set on the given object.
Must not be null
and must not contain
attributes with a null
name.FdkException
- If an error occurs.public static Object implicitConversion(FdkSessionImpl session, Object value, AttributeRequest[] requestedAttrs) throws IfsException, FdkException
IfsException
FdkException
Copyright © 2023. All rights reserved.