All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.day.crx.packaging.validation.ContentPackageValidator Maven / Gradle / Ivy

/*************************************************************************
*
* ADOBE CONFIDENTIAL
* ___________________
*
*  Copyright 2017 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 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.day.crx.packaging.validation;

import java.io.File;
import java.io.IOException;
import java.util.List;

import javax.jcr.RepositoryException;
import javax.jcr.Session;

import com.day.crx.packaging.validation.impl.AclWarning;
import com.day.crx.packaging.validation.impl.OverlayRebaseWarning;
import com.day.crx.packaging.validation.impl.UnsatisfiedImport;
import org.apache.jackrabbit.vault.packaging.JcrPackage;

/**
 * ContentPackageValidator
 * Validates a content package before installing it in /crx/packmgr. Reports all unsatisfied OSGi 
 * package imports, overlay rebase warnings which will occur if the content package is installed.
 */
public interface ContentPackageValidator {
    
    /**
     * Validates a content package for unsatisfied OSGi package imports, given its JcrPackage object.
     * @param jcrPackage - JcrPackage object of the content package
     * @return List of unsatisfied OSGi package imports
     * @throws IOException
     * @throws RepositoryException
     */
    List validateOsgiImports(JcrPackage jcrPackage) throws RepositoryException, IOException;
    
    /**
     * Validates a content package for unsatisfied OSGi package imports, given its File object.
     * @param contentPackageFile File object of the content package
     * @return List of unsatisfied OSGi package imports
     * @throws IOException
     */
    List validateOsgiImports(File contentPackageFile) throws IOException;
    
    /**
     * Validates a content package for overlay rebase warnings, given its JcrPackage object.
     * @param pack JcrPackage object of the content package
     * @param session Session to get access to JCR
     * @return List of overlay rebase warnings
     * @throws IOException 
     * @throws RepositoryException 
     */
    List validateOverlays(JcrPackage pack, Session session) throws RepositoryException, IOException;
    
    /**
     * Validates a content package for overlay rebase warnings, given its File object.
     * @param contentPackageFile File object of the content package
     * @param session Session to get access to JCR
     * @return List of overlay rebase warnings
     * @throws IOException
     * @throws RepositoryException 
     */
    List validateOverlays(File contentPackageFile, Session session) throws IOException, RepositoryException;

    /**
     * Validates a content package for ACL warnings, given its JcrPackage object.
     * @param jcrPackage JcrPackage object of the content package
     * @param session Session to get access to JCR
     * @return List of ACL warnings
     * @throws IOException
     * @throws RepositoryException
     */
    List validateAcls(JcrPackage jcrPackage, Session session) throws IOException, RepositoryException;

    /**
     * Validates a content package for ACL warnings, given its File object.
     * @param contentPackageFile File object of the content package
     * @param session Session to get access to JCR
     * @return List of ACL warnings
     * @throws IOException
     * @throws RepositoryException
     */
    List validateAcls(File contentPackageFile, Session session) throws IOException, RepositoryException;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy