Interface FormsRelationService
-
public interface FormsRelationService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
getAllRelatedChildAssets(ResourceResolver resourceResolver, java.lang.String path, java.util.Set<AssetInfo> allRelatedChildAssets)
This API returns Set of all related FM + Non FM assets being referred from the specified asset.void
getAllRelatedChildFMAssets(ResourceResolver resourceResolver, java.lang.String path, java.util.Set<AssetInfo> allRelatedChildAssets)
This API returns Set of related FM assets being referred from the specified asset.void
getAssociatedTags(ResourceResolver resourceResolver, java.util.Set<AssetInfo> allRelatedChildAssets)
This API adds to the provided set, all tags associated with the assets present in that set.java.util.Set<AssetInfo>
getDDEReferences(java.lang.String dataDictionaryID, java.util.List<java.lang.String> ddeReferenceNames)
Returns the Set of assets referring the Data Dictionary (dataDictionaryID) and using data dictionary elements (ddeReferenceNames) defined in this DD.java.util.Set<AssetInfo>
getDependentParentFMAssets(ResourceResolver resourceResolver, java.lang.String path)
This API returns Set of dependent assets(Up Hierarchy-One Level) for the specified asset.void
getFirstLevelRelatedChildAssets(ResourceResolver resourceResolver, java.lang.String path, java.util.Set<AssetInfo> allRelatedChildAssets)
This API returns Set of one level related FM + Non FM assets being referred from the specified asset.void
getFirstLevelRelatedChildFMAssets(ResourceResolver resourceResolver, java.lang.String path, java.util.Set<AssetInfo> allRelatedChildAssets)
This API returns Set of related FM assets being referred from the specified asset.boolean
hasDDEReferences(java.lang.String dataDictionaryID, java.util.List<java.lang.String> ddeReferenceNames)
Returns if there is any asset referring this Data Dictionary (dataDictionaryID) and using this data dictionary elements (ddeReferenceNames) defined in this DD.boolean
hasDependentParentFMAssets(ResourceResolver resourceResolver, java.lang.String path)
void
setDirtyFlag(javax.jcr.Session session, java.lang.String path)
-
-
-
Method Detail
-
getAllRelatedChildAssets
void getAllRelatedChildAssets(ResourceResolver resourceResolver, java.lang.String path, java.util.Set<AssetInfo> allRelatedChildAssets) throws FormsMgrException
This API returns Set of all related FM + Non FM assets being referred from the specified asset. It gets all relations of the related assets until we reach leave node It internally uses getAllRelatedChildFMAssets API to get FM assets- Parameters:
resourceResolver
- jcr ResourceResolver objectpath
- path of the resourceallRelatedChildAssets
-- Throws:
FormsMgrException
-
getFirstLevelRelatedChildAssets
void getFirstLevelRelatedChildAssets(ResourceResolver resourceResolver, java.lang.String path, java.util.Set<AssetInfo> allRelatedChildAssets) throws FormsMgrException
This API returns Set of one level related FM + Non FM assets being referred from the specified asset. It does not get the relations of the related asset It internally uses getAllRelatedChildFMAssets API to get FM assets- Parameters:
resourceResolver
- jcr ResourceResolver objectpath
- path of the resourceallRelatedChildAssets
-- Throws:
FormsMgrException
-
getAllRelatedChildFMAssets
void getAllRelatedChildFMAssets(ResourceResolver resourceResolver, java.lang.String path, java.util.Set<AssetInfo> allRelatedChildAssets) throws FormsMgrException
This API returns Set of related FM assets being referred from the specified asset. For Guide & AF Fragment it returns CQ:Page and dependent XSD/XDP/Images if any For XDP it returns referred XDP/Images if any For Formset it returns the referred XDP It also calculates further references of the referred assets, and returns a comprehensive list PS : This API does NOT return referred AFFragments PS : This API returns only referred (child) FM assets and not the dependent (parent) assets.- Parameters:
resourceResolver
- jcr ResourceResolver objectpath
- path of the resourceallRelatedChildAssets
-- Throws:
FormsMgrException
-
getFirstLevelRelatedChildFMAssets
void getFirstLevelRelatedChildFMAssets(ResourceResolver resourceResolver, java.lang.String path, java.util.Set<AssetInfo> allRelatedChildAssets) throws FormsMgrException
This API returns Set of related FM assets being referred from the specified asset. For Guide & AF Fragment it returns CQ:Page and dependent XSD/XDP/Images if any For XDP it returns referred XDP/Images if any For Formset it returns the referred XDP PS : This API does NOT return referred AFFragments PS : This API returns only referred (child) FM assets and not the dependent (parent) assets.- Parameters:
resourceResolver
- jcr ResourceResolver objectpath
- path of the resourceallRelatedChildAssets
-- Throws:
FormsMgrException
-
getDependentParentFMAssets
java.util.Set<AssetInfo> getDependentParentFMAssets(ResourceResolver resourceResolver, java.lang.String path) throws FormsMgrException
This API returns Set of dependent assets(Up Hierarchy-One Level) for the specified asset. For AD/Formset, it returns empty Set For XDP, it returns dependent AF/AFF/XDP/Formset For AFF/XSD, it finds dependent AF/AFF For AF/Theme, it finds dependent AF For Images/XSS, it returns dependent XDP, For Letter/DataDictionary, it returns dependent AD For Text/List/Condition, it returns dependent AF/AD PS : This API returns only dependent (parent) FM assets and not the referred (child) assets.- Parameters:
resourceResolver
- jcr ResourceResolver objectpath
- path of the resource- Throws:
FormsMgrException
-
hasDependentParentFMAssets
boolean hasDependentParentFMAssets(ResourceResolver resourceResolver, java.lang.String path) throws FormsMgrException
- Throws:
FormsMgrException
-
setDirtyFlag
void setDirtyFlag(javax.jcr.Session session, java.lang.String path) throws FormsMgrException
- Throws:
FormsMgrException
-
getAssociatedTags
void getAssociatedTags(ResourceResolver resourceResolver, java.util.Set<AssetInfo> allRelatedChildAssets)
This API adds to the provided set, all tags associated with the assets present in that set.- Parameters:
resourceResolver
- jcr ResourceResolver objectallRelatedChildAssets
- set of assets for which associated tags need to be found.
-
getDDEReferences
java.util.Set<AssetInfo> getDDEReferences(java.lang.String dataDictionaryID, java.util.List<java.lang.String> ddeReferenceNames) throws FormsMgrException
Returns the Set of assets referring the Data Dictionary (dataDictionaryID) and using data dictionary elements (ddeReferenceNames) defined in this DD.- Parameters:
dataDictionaryID
- Id (path in repository) of the Data dictionary in which DDE is definedddeReferenceNames
- List of Data Dictionary Elements whose usage has to be found- Returns:
- Set of assets using this DDE.
- Throws:
FormsMgrException
-
hasDDEReferences
boolean hasDDEReferences(java.lang.String dataDictionaryID, java.util.List<java.lang.String> ddeReferenceNames) throws FormsMgrException
Returns if there is any asset referring this Data Dictionary (dataDictionaryID) and using this data dictionary elements (ddeReferenceNames) defined in this DD.- Parameters:
dataDictionaryID
- Id (path in repository) of the Data dictionary in which DDE is definedddeReferenceNames
- List of Data Dictionary Elements whose usage has to be found- Returns:
- true if any asset using this DD and DDE is found. False otherwise.
- Throws:
FormsMgrException
-
-