
com.adobe.aem.formsndocuments.service.FormsRelationService Maven / Gradle / Ivy
/*************************************************************************
*
* ADOBE CONFIDENTIAL
* __________________
*
* Copyright 2015 Adobe Systems Incorporated
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any. The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and may be covered by U.S. and Foreign Patents,
* patents in process, and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
**************************************************************************/
package com.adobe.aem.formsndocuments.service;
import java.util.List;
import java.util.Set;
import javax.jcr.Session;
import org.apache.sling.api.resource.ResourceResolver;
import com.adobe.aem.formsndocuments.transferobjects.AssetInfo;
import com.adobe.aemforms.fm.exception.FormsMgrException;
public interface FormsRelationService {
/**
* 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
* @param resourceResolver jcr ResourceResolver object
* @param path path of the resource
* @param allRelatedChildAssets
* @throws FormsMgrException
*/
public void getAllRelatedChildAssets(ResourceResolver resourceResolver, String path, Set 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
* @param resourceResolver jcr ResourceResolver object
* @param path path of the resource
* @param allRelatedChildAssets
* @throws FormsMgrException
*/
public void getFirstLevelRelatedChildAssets(ResourceResolver resourceResolver, String path, Set 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.
* @param resourceResolver jcr ResourceResolver object
* @param path path of the resource
* @param allRelatedChildAssets
* @throws FormsMgrException
*/
public void getAllRelatedChildFMAssets(ResourceResolver resourceResolver, String path, Set 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.
* @param resourceResolver jcr ResourceResolver object
* @param path path of the resource
* @param allRelatedChildAssets
* @throws FormsMgrException
*/
public void getFirstLevelRelatedChildFMAssets(ResourceResolver resourceResolver, String path, Set allRelatedChildAssets) 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.
* @param resourceResolver jcr ResourceResolver object
* @param path path of the resource
* @throws FormsMgrException
*/
public Set getDependentParentFMAssets(ResourceResolver resourceResolver, String path) throws FormsMgrException;
public boolean hasDependentParentFMAssets(ResourceResolver resourceResolver, String path) throws FormsMgrException;
public void setDirtyFlag(Session session, String path) throws FormsMgrException;
/**
* This API adds to the provided set, all tags associated with the assets present in that set.
* @param resourceResolver jcr ResourceResolver object
* @param allRelatedChildAssets set of assets for which associated tags need to be found.
*/
public void getAssociatedTags(ResourceResolver resourceResolver, Set allRelatedChildAssets);
/**
* Returns the Set of assets referring the Data Dictionary (dataDictionaryID) and using data dictionary elements (ddeReferenceNames)
* defined in this DD.
*
* @param dataDictionaryID Id (path in repository) of the Data dictionary in which DDE is defined
* @param ddeReferenceNames List of Data Dictionary Elements whose usage has to be found
* @return Set of assets using this DDE.
* @throws FormsMgrException
*/
public Set getDDEReferences (String dataDictionaryID, List 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.
*
* @param dataDictionaryID Id (path in repository) of the Data dictionary in which DDE is defined
* @param ddeReferenceNames List of Data Dictionary Elements whose usage has to be found
* @return true if any asset using this DD and DDE is found. False otherwise.
* @throws FormsMgrException
*/
public boolean hasDDEReferences (String dataDictionaryID, List ddeReferenceNames) throws FormsMgrException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy