public final class AssetTypeDefManagerImpl extends Object implements AssetTypeDefManager
Constructor and Description |
---|
AssetTypeDefManagerImpl(ICS ics) |
Modifier and Type | Method and Description |
---|---|
boolean |
addAssociation(String assettype, String name, String description, String childtype, String depType, boolean multiValues, List<String> subtypes)
Add a named association to an asset type
|
void |
create(AssetTypeDef def)
Creates an assetTypeDef in the database
|
boolean |
createAssetMakerAssetType(String assetTypeName, String descriptorFileName, String descriptorXML, boolean addGeneralCategory, boolean enableAssetTypeIndex)
Creates a Content Server Asset Maker asset type using the passed in descriptor
|
boolean |
createFlexFamily(FlexAssetFamilyInfo flexAssetFamilyInfo)
Creating a flex asset family in Content Server
|
void |
delete(List<String> assetTypeNames)
Deletes asset types from the database and all their instances.
|
AssetTypeDef |
findByName(String assetTypeName, String subtype)
Finds an asset type definition by its name
|
List<String> |
getAssetTypes()
Returns all asset type names in the system.
|
List<String> |
getSubTypes(String assetType)
Returns subtype names given the asset type name If the asset type name specified is not existed in System, the method would return an empty List and will not throw exception.
|
AssetTypeDef |
newAssetTypeDef()
Create an empty AssetTypeDef
|
AssetAssociationDef |
newAssociationDef()
Creates a new instance of Association by a given name.
|
AttributeDef |
newAttributeDef()
Creates a new instance of AttributeTypeDefinition
|
public AssetTypeDefManagerImpl(ICS ics)
public AssetTypeDef findByName(String assetTypeName, String subtype) throws AssetAccessException
findByName
in interface AssetTypeDefManager
assetTypeName
- name of the asset type definition.subtype
- Subtype of asset definition, if any.AssetAccessException
- captures layer specific failures and wraps other internal exceptions.public List<String> getAssetTypes() throws AssetAccessException
AssetTypeDefManager
getAssetTypes
in interface AssetTypeDefManager
AssetAccessException
- wraps any internal exceptions generated by the framework.public List<String> getSubTypes(String assetType) throws AssetAccessException
AssetTypeDefManager
getSubTypes
in interface AssetTypeDefManager
assetType
- name of the asset type to get subtypes forAssetAccessException
- wraps any internal exceptions generated by the framework.public void create(AssetTypeDef def) throws AssetAccessException
create
in interface AssetTypeDefManager
def
- assetTypeDef in the databaseAssetAccessException
- captures layer specific failures and wraps other internal exceptions.public void delete(List<String> assetTypeNames) throws AssetAccessException
delete
in interface AssetTypeDefManager
assetTypeNames
- name of the asset types to be deleted.AssetAccessException
- captures layer specific failures and wraps other internal exceptions.public AttributeDef newAttributeDef()
newAttributeDef
in interface AssetTypeDefManager
public AssetTypeDef newAssetTypeDef()
newAssetTypeDef
in interface AssetTypeDefManager
public AssetAssociationDef newAssociationDef()
newAssociationDef
in interface AssetTypeDefManager
public boolean createAssetMakerAssetType(String assetTypeName, String descriptorFileName, String descriptorXML, boolean addGeneralCategory, boolean enableAssetTypeIndex) throws AssetAccessException
AssetTypeDefManager
createAssetMakerAssetType
in interface AssetTypeDefManager
assetTypeName
- the asset type name, the name has to be the same with the one in desriptorXML, or an Exception will be throwndescriptorFileName
- the name of the descriptor xml, we now requires it ends with .xml or .XMLdescriptorXML
- the descriptor xml StringaddGeneralCategory
- indicating whether a General Category will be created by default; true indicates the General Category will be created, false indicates otherwiseenableAssetTypeIndex
- indicating whether the asset type will be enabled for Asset Type specific indexing if availableAssetAccessException
- throw Exception when errors metpublic boolean createFlexFamily(FlexAssetFamilyInfo flexAssetFamilyInfo) throws AssetAccessException
AssetTypeDefManager
createFlexFamily
in interface AssetTypeDefManager
flexAssetFamilyInfo
- the name/description/plural information for the flex asset family membersAssetAccessException
- throw this exception if error metpublic boolean addAssociation(String assettype, String name, String description, String childtype, String depType, boolean multiValues, List<String> subtypes) throws AssetAccessException
AssetTypeDefManager
addAssociation
in interface AssetTypeDefManager
assettype
- the asset type to add the assocationname
- the name of the associationdescription
- the description of the assocationchildtype
- the child asset types allowed for this associationdepType
- the dependency type that will be logged. Legal values are: "E" -- IApprovalDependency.DEPTYPE_EXISTS : "V" -- IApprovalDependency.DEPTYPE_EXACT Default value if the input is wrong is EmultiValues
- yes or nosubtypes
- the subtypes for the association in the format of subtype name to required map For example, FSII Product - true indicates that subtype FSII Product is needed and it is requiredAssetAccessException
- throw this exception if error met