Examples of UtilityException


Examples of org.apache.pluto.util.UtilityException

            copyFileToDirectory(config.getPortalApplication(), domainDir);

            writeConfiguration(config);
        }
        catch(IOException io) {
            throw new UtilityException(
                "Unable to install portal to Tomcat",
                io,
                config.getInstallationDirectory()
            );
        }
View Full Code Here

Examples of org.apache.pluto.util.UtilityException

            File delete = new File(domainDir, config.getPortalApplication().getName());
            delete.delete();
        }
        catch(IOException io) {
            throw new UtilityException("Unable to remove files. ", io, config.getInstallationDirectory());
        }

   }
View Full Code Here

Examples of org.apache.pluto.util.UtilityException

//            out.write(getPortalApplicationConfig(config));
//            out.flush();
//            out.close();
        }
        catch (IOException io) {
            throw new UtilityException(io);
        }
    }
View Full Code Here

Examples of org.apache.pluto.util.UtilityException

            copyFileToDirectory(config.getPortalApplication(), domainDir);

            writeConfiguration(config);
        }
        catch(IOException io) {
            throw new UtilityException(
                "Unable to install portal to Tomcat",
                io,
                config.getInstallationDirectory()
            );
        }
View Full Code Here

Examples of org.apache.pluto.util.UtilityException

            File delete = new File(domainDir, config.getPortalApplication().getName());
            delete.delete();
        }
        catch(IOException io) {
            throw new UtilityException("Unable to remove files. ", io, config.getInstallationDirectory());
        }

   }
View Full Code Here

Examples of org.apache.pluto.util.UtilityException

        File dest = config.getDestination();
       
        try {       
           
            if ( source == null || !source.exists() ) {
                throw new UtilityException( "Source archive doesn't exist." );
            }
           
            if ( source.isDirectory() ) {
                throw new UtilityException( "Source archive is a directory." );
            }

            if ( performInPlaceAssembly( config ) ) {
                    if ( LOG.isDebugEnabled() ) {
                        LOG.debug( "Performing in-place assembly of " + config.getSource().getAbsolutePath() );
                    }
                    dest = File.createTempFile( source.getName(), ".tmp" );
                    config.setDestination( dest );
                    assembleInternal( config );
                    // renameTo() is impl-specific
                    boolean success = dest.renameTo( source );
                    if (! success ) {
                        // do it the old-fashioned way
                        FileUtils.copyFile( dest, source );
                    }
            } else {
                if ( LOG.isDebugEnabled() ) {
                    LOG.debug( "Performing assembly of " + config.getSource().getAbsolutePath() + " to " +
                            config.getDestination().getAbsolutePath() );
                }
                File destFile = dest;
               
                // if the destination is a directory, ensure that parent
                // directories have been created and set the destination
                // file to the file in the direcotory.
                if ( dest.isDirectory() ) {                               
                    dest.mkdirs();
                    destFile = new File( dest, source.getName() );
                }
               
                config.setDestination( destFile );
                assembleInternal( config );
            }
           
        } catch ( IOException e ) {
            LOG.error( "Assembly failed: "+ e.getMessage() );
            throw new UtilityException( e.getMessage(), e );
        }       
    }
View Full Code Here

Examples of org.apache.pluto.util.UtilityException

//            out.write(getPortalApplicationConfig(config));
//            out.flush();
//            out.close();
        }
        catch (IOException io) {
            throw new UtilityException(io);
        }
    }
View Full Code Here

Examples of org.apache.pluto.util.UtilityException

        File dest = config.getDestination();
       
        try {       
           
            if ( source == null || !source.exists() ) {
                throw new UtilityException( "Source archive doesn't exist." );
            }
           
            if ( source.isDirectory() ) {
                throw new UtilityException( "Source archive is a directory." );
            }

            if ( performInPlaceAssembly( config ) ) {
                    if ( LOG.isDebugEnabled() ) {
                        LOG.debug( "Performing in-place assembly of " + config.getSource().getAbsolutePath() );
                    }
                    dest = File.createTempFile( source.getName(), ".tmp" );
                    config.setDestination( dest );
                    assembleInternal( config );
                    // renameTo() is impl-specific
                    boolean success = dest.renameTo( source );
                    if (! success ) {
                        // do it the old-fashioned way
                        FileUtils.copyFile( dest, source );
                    }
            } else {
                if ( LOG.isDebugEnabled() ) {
                    LOG.debug( "Performing assembly of " + config.getSource().getAbsolutePath() + " to " +
                            config.getDestination().getAbsolutePath() );
                }
                File destFile = dest;
               
                // if the destination is a directory, ensure that parent
                // directories have been created and set the destination
                // file to the file in the direcotory.
                if ( dest.isDirectory() ) {                               
                    dest.mkdirs();
                    destFile = new File( dest, source.getName() );
                }
               
                config.setDestination( destFile );
                assembleInternal( config );
            }
           
        } catch ( IOException e ) {
            LOG.error( "Assembly failed: "+ e.getMessage() );
            throw new UtilityException( e.getMessage(), e );
        }       
    }
View Full Code Here

Examples of org.apache.pluto.util.UtilityException

//            out.write(getPortalApplicationConfig(config));
//            out.flush();
//            out.close();
        }
        catch (IOException io) {
            throw new UtilityException(io);
        }
    }
View Full Code Here

Examples of org.apache.pluto.util.UtilityException

            copyFileToDirectory(config.getPortalApplication(), domainDir);

            writeConfiguration(config);
        }
        catch(IOException io) {
            throw new UtilityException(
                "Unable to install portal to Tomcat",
                io,
                config.getInstallationDirectory()
            );
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.