Package com.day.jcr.vault.packaging

Examples of com.day.jcr.vault.packaging.PackageId


    }


    @Test
    public void testRemovePackage() throws Exception {
        final PackageId packageId = new PackageId(packageGroup, packageName, packageOneVersion);

        when(jcrPackageManager.open(packageId)).thenReturn(packageOne);
        when(packageOneNode.getSession()).thenReturn(mock(Session.class));

        packageHelper.removePackage(jcrPackageManager, packageGroup, packageName, packageOneVersion);
View Full Code Here


     * {@inheritDoc}
     */
    public void removePackage(final JcrPackageManager jcrPackageManager,
                              final String groupName, final String name,
                              final String version) throws RepositoryException {
        final PackageId packageId = new PackageId(groupName, name, version);
        final JcrPackage jcrPackage = jcrPackageManager.open(packageId);

        if (jcrPackage != null && jcrPackage.getNode() != null) {
            jcrPackage.getNode().remove();
            jcrPackage.getNode().getSession().save();
        } else {
            log.debug("Nothing to remove at: ", packageId.getInstallationPath());
        }
    }
View Full Code Here

TOP

Related Classes of com.day.jcr.vault.packaging.PackageId

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.