org.ow2.jonas.generators.genbase.modifier
Class ArchiveModifier

java.lang.Object
  extended by org.ow2.jonas.generators.genbase.modifier.ArchiveModifier
Direct Known Subclasses:
AbsApplicationModifier, AbsArchiveModifier, ClientModifier, EjbJarModifier, WebAppModifier

public abstract class ArchiveModifier
extends Object

Modify a J2EEArchive

Author:
Guillaume Sauthier

Constructor Summary
ArchiveModifier(J2EEArchive archive)
          Creates a new ArchiveModifier object.
 
Method Summary
 J2EEArchive getArchive()
           
static org.objectweb.util.monolog.api.Logger getLogger()
           
abstract  Archive modify()
          Modify the current archive and return a modified archive.
protected  Archive save(Config config, String outname)
          Save the current archive using given configuration and given out filename.
protected static Archive save(Config config, String outname, J2EEArchive archive)
          Save the curernt archive usin given configuration and given out filename.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArchiveModifier

public ArchiveModifier(J2EEArchive archive)
Creates a new ArchiveModifier object.

Parameters:
archive - rchive to be modified
Method Detail

modify

public abstract Archive modify()
                        throws GenBaseException
Modify the current archive and return a modified archive.

Returns:
a modified archive.
Throws:
GenBaseException - When Archive modification fails

save

protected static Archive save(Config config,
                              String outname,
                              J2EEArchive archive)
                       throws GenBaseException
Save the curernt archive usin given configuration and given out filename.

Parameters:
config - configuration to use
outname - filename
archive - archive to be saved
Returns:
the save Archive
Throws:
GenBaseException - is save fails.

save

protected Archive save(Config config,
                       String outname)
                throws GenBaseException
Save the current archive using given configuration and given out filename.

Parameters:
config - configuration to use
outname - filename
Returns:
the save Archive
Throws:
GenBaseException - is save fails.

getLogger

public static org.objectweb.util.monolog.api.Logger getLogger()
Returns:
the logger.

getArchive

public J2EEArchive getArchive()
Returns:
returns the J2EE Archive which wil be modified.


Copyright © 2010 OW2 Consortium. All Rights Reserved.