public class CoreCategoryManager extends CategoryManagerImpl
Constructor and Description |
---|
CoreCategoryManager()
Constructor required for web services
|
CoreCategoryManager(FdkSession session)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Item |
addMetaDataAttribute(long categoryId,
NamedValue attributedef,
AttributeRequest[] attrrequest)
adds a metadata attribute.
|
protected Item |
addMetaDataCategoryAttribute(long categoryId,
NamedValue attributedef,
AttributeRequest[] attrrequest)
Deprecated.
use addMetaDataAttribute
|
protected void |
checkInvalidAttributes(Map attrMap)
if any attributes remain, then they are invalid
|
Item |
createCategorySubClass(NamedValue[] attributes,
AttributeRequest[] attrrequest)
Creates a Category subclass.
|
void |
deleteCategory(long catId)
Delete a Category instance.
|
void |
freeCategoryClass(long mdscatId)
Frees a category class.
|
protected Item[] |
getConfigurationMetaDataCategories(long folderId,
int categorytype,
AttributeRequest[] requestedAttributes,
String configClassName)
Deprecated.
remove when getRequiredCategories is removed.
|
protected FdkSessionImpl |
getConnectedSession()
Return the web service session.
|
Item[] |
getRequiredCategories(long folderId,
AttributeRequest[] requestedAttributes)
Gets the required categories for a folder.
|
protected Item[] |
getRequiredMetaDataCategories(long folderId,
AttributeRequest[] attrReqs,
String cfgClassName)
Returns the RequiredCategories of the given folder, or null if none.
|
protected boolean |
isWebServiceCall()
Returns
true if the current call was made from a web services
client. |
protected NamedValue[] |
login(FdkCredential c,
NamedValue[] options,
AttributeRequest[] userAttributes)
Internal login method used by web services login managers.
|
Item |
modifyCategorySubClass(long mdscatId,
NamedValue[] attributes,
AttributeRequest[] attrrequest)
Modifies the given Category subclass.
|
Item |
modifyMetaDataAttribute(long attributeId,
NamedValue attributedef,
AttributeRequest[] attrrequest)
modify a category attribute.
|
void |
referenceTypes(TypeReference ref)
Dummy web service method to create a reference to data types used
in the web services to insure that they are defined in the WSDL.
|
void |
removeCategoryAttribute(long categoryId,
String attributename)
Deprecated.
use removeMetaDataAttribute
|
void |
removeCategoryConfiguration(long folderId)
remove the existing CategoryConfiguration for a Folder.
|
void |
removeMetaDataAttribute(long attributeId)
removes a category attribute.
|
protected void |
removeMetaDataCategoryAttribute(long categoryId,
String attributeName)
Deprecated.
use removeMetaDataAttribute
|
protected void |
removeMetaDataConfiguration(long folderId,
String configClassName) |
void |
setCategoryConfiguration(long folderId,
NamedValue[] config)
Sets or updates the CategoryConfiguration for a Folder.
|
protected void |
setMetaDataConfiguration(long folderId,
NamedValue[] config,
String configClassName) |
Item |
updateCategory(long catId,
NamedValue[] attrs,
AttributeRequest[] attributes)
Updates an existing Category.
|
public CoreCategoryManager()
public CoreCategoryManager(FdkSession session)
public Item[] getRequiredCategories(long folderId, AttributeRequest[] requestedAttributes) throws FdkException
CategoryManager
folderId
- folder for to fetch the categoriesrequestedAttributes
- list of attributes needed for each itemFdkException
- if the operation failspublic void setCategoryConfiguration(long folderId, NamedValue[] config) throws FdkException
CategoryManager
The entire configuration will replaced as a set and not added to the existing one. AttributeOverrides are replaced as a set. To change one, you must specify all overrides. To remove all overrides, explicitly set ATTRIBUTE_OVERRIDE to null.
folderId
- the folder for which to set the Category configurationconfig
- the Category configuration options to set;
must include one or more of the following Attributes:
FdkException
- if the operation fails.public void removeCategoryConfiguration(long folderId) throws FdkException
CategoryManager
folderId
- the folder for which to remove the Category configurationFdkException
- if the operation fails.public Item updateCategory(long catId, NamedValue[] attrs, AttributeRequest[] attributes) throws FdkException
CategoryManager
Note, this method will not return
the new category if this update causes the associated
document to create a new version. Use
FileManager.updateDocuments
instead, which will return the new document Item (and its
associated categories, which will reflect the update).
catId
- Category to be updatedattrs
- the attributes to update.
attributes
- requested attributes for each item, or null.FdkException
- if the operation failspublic void deleteCategory(long catId) throws FdkException
CategoryManager
catId
- the category ID to be deleted.FdkException
- if the operation fails.public Item createCategorySubClass(NamedValue[] attributes, AttributeRequest[] attrrequest) throws FdkException
CategoryManager
Given an array of Attributes that describes a class object, create the Category class object and return the classobject id. If Workflow is enabled AND 'CreateUserCategory' is workflow enabled, then an item of type 'REQUEST' is returned. Otherwise, the function returns the created category. UI implementers should check the type of the Item returned and act accordingly (If it's a request, inform user the request needs to be approved before the category can be created.).
attributes
- array of attributes for creating the category class
attrrequest
- requested attributes for each item, or null.FdkException
- if the operation failspublic Item modifyCategorySubClass(long mdscatId, NamedValue[] attributes, AttributeRequest[] attrrequest) throws FdkException
CategoryManager
attributes
- array of attributes for creating the category class
FdkException
- if the operation failspublic void freeCategoryClass(long mdscatId) throws FdkException
mdscatId
- FdkException
public void removeCategoryAttribute(long categoryId, String attributename) throws FdkException
categoryId
- attributename
- name of attribute to be removed.
FdkException
protected void setMetaDataConfiguration(long folderId, NamedValue[] config, String configClassName) throws FdkException
FdkException
protected void removeMetaDataConfiguration(long folderId, String configClassName) throws FdkException
FdkException
protected Item[] getRequiredMetaDataCategories(long folderId, AttributeRequest[] attrReqs, String cfgClassName) throws FdkException
folderId
- Id of folder in questionattrReqs
- Array of AttributeRequests.cfgClassName
- name of Configuration Class (Record/AdHoc)FdkException
- if operation failsprotected Item[] getConfigurationMetaDataCategories(long folderId, int categorytype, AttributeRequest[] requestedAttributes, String configClassName) throws FdkException
folderId
- categorytype
- (only supports REQUIRED now.)requestedAttributes
- configClassName
- FdkException
public Item addMetaDataAttribute(long categoryId, NamedValue attributedef, AttributeRequest[] attrrequest) throws FdkException
categoryId
- attributedef
- attrrequest
- FdkException
protected Item addMetaDataCategoryAttribute(long categoryId, NamedValue attributedef, AttributeRequest[] attrrequest) throws FdkException
categoryId
- attributedef
- attrrequest
- FdkException
public Item modifyMetaDataAttribute(long attributeId, NamedValue attributedef, AttributeRequest[] attrrequest) throws FdkException
attributeId
- attributedef
- attrrequest
- requested attributes of the AttributeFdkException
public void removeMetaDataAttribute(long attributeId) throws FdkException
attributeId
- FdkException
protected void removeMetaDataCategoryAttribute(long categoryId, String attributeName) throws FdkException
categoryId
- - id of Category Class Object with attributeattributeName
- name of attribute to be removed
FdkException
protected void checkInvalidAttributes(Map attrMap) throws FdkException
attrMap
- FdkException
protected final boolean isWebServiceCall()
true
if the current call was made from a web services
client. This check can be made by any subclasses in order to determine
functionality and restrictions based on the originating call. This
feature should be used lightly and only where really necessary as
this is not an idea way of implementing business logic.public void referenceTypes(TypeReference ref)
protected final NamedValue[] login(FdkCredential c, NamedValue[] options, AttributeRequest[] userAttributes) throws FdkException
FdkException
protected final FdkSessionImpl getConnectedSession() throws FdkException
FdkException
Copyright © 2023. All rights reserved.