Package org.apache.jetspeed.deployment

Examples of org.apache.jetspeed.deployment.DeploymentException


        if (deployPathFile == null || !deployPathFile.exists() ||
            !deployPathFile.isDirectory() || deployPathFile.getParentFile() == null ||
            !deployToDir.equals(deployPathFile.getParentFile().getParent()))
        {
            throw new DeploymentException("Cannot undeploy decorator at " + deployPathFile + ": invalid decorator path");
        }

        String id = deployPathFile.getName();

        try
        {
            // undeploy decorator
            log.info("Undeploying decorator " + id + " at " + deployPathFile.getAbsolutePath());

            // detect language/country localized decorator components
            final List localeSpecificDeployPathsList = getLocaleSpecificDeployPaths(deployPathFile.getParentFile());

            // undeploy individual locale specific decorator components depth first
            for (int i = localeSpecificDeployPathsList.size() - 1; i > -1; i--)
            {
                File localeDeployPathFile = new File((File) localeSpecificDeployPathsList.get(i), id);
                if (localeDeployPathFile.exists())
                {
                    log.info("Undeploying locale specific decorator component at " + localeDeployPathFile.getPath());
                    DirectoryHelper cleanup = new DirectoryHelper(localeDeployPathFile);
                    cleanup.remove();
                    cleanup.close();
                    localeDeployPathFile.getParentFile().delete();
                }
            }

            // now undeploy the decorator root itself
            DirectoryHelper cleanup = new DirectoryHelper(deployPathFile);
            cleanup.remove();
            cleanup.close();

            log.info("Decorator " + id + " undeployed successfuly.");
        }
        catch (Exception e)
        {
            throw new DeploymentException("Error undeploying decorator " + id, e);
        }
    }
View Full Code Here


                return configuration;
            }
        }
        catch (Exception e1)
        {
            throw new DeploymentException("Error reading decorator.properties from " + event.getPath(), e1);
        }
        finally
        {
            if (stream != null)
            {
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.deployment.DeploymentException

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.