com.zeroturnaround.liverebel.util.exec.impl
Class MapBasedUpdateScriptStore

java.lang.Object
  extended by com.zeroturnaround.liverebel.util.exec.impl.MapBasedUpdateScriptStore
All Implemented Interfaces:
UpdateScriptStore

public class MapBasedUpdateScriptStore
extends Object
implements UpdateScriptStore

Script store that is populated manually. Should be used with some description of where scripts can sit in FS or just given as plaintext.

Author:
shelajev

Constructor Summary
MapBasedUpdateScriptStore()
           
MapBasedUpdateScriptStore(Map<String,List<Script>> globalEvents, Map<String,List<Script>> serverEvents)
           
 
Method Summary
 void addScript(String type, Script script)
           
 void addScript(String type, Script script, boolean global)
           
 void addScript(String type, Script script, Script undo, boolean global)
           
 String getDescription()
           
 File getEntriesArchive()
           
 Map<String,String> getJson2ZipEntries()
           
 Collection<Script> getScripts(ScriptEventType type, boolean global)
           
 Collection<Script> getUndoScripts(ScriptEventType type, boolean global)
           
 void initEntriesArchive(File tmpFile, List<org.zeroturnaround.zip.ZipEntrySource> entrySources, Map<String,String> json2zipEntries)
           
 void setDescription(String description)
           
 void setEntriesArchive(File entriesArchive)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapBasedUpdateScriptStore

public MapBasedUpdateScriptStore()

MapBasedUpdateScriptStore

public MapBasedUpdateScriptStore(Map<String,List<Script>> globalEvents,
                                 Map<String,List<Script>> serverEvents)
Method Detail

initEntriesArchive

public void initEntriesArchive(File tmpFile,
                               List<org.zeroturnaround.zip.ZipEntrySource> entrySources,
                               Map<String,String> json2zipEntries)

setEntriesArchive

public void setEntriesArchive(File entriesArchive)

getEntriesArchive

public File getEntriesArchive()

getJson2ZipEntries

public Map<String,String> getJson2ZipEntries()

addScript

public void addScript(String type,
                      Script script)

addScript

public void addScript(String type,
                      Script script,
                      boolean global)

addScript

public void addScript(String type,
                      Script script,
                      Script undo,
                      boolean global)

getScripts

public Collection<Script> getScripts(ScriptEventType type,
                                     boolean global)
Specified by:
getScripts in interface UpdateScriptStore

getUndoScripts

public Collection<Script> getUndoScripts(ScriptEventType type,
                                         boolean global)
Specified by:
getUndoScripts in interface UpdateScriptStore

setDescription

public void setDescription(String description)

getDescription

public String getDescription()
Specified by:
getDescription in interface UpdateScriptStore

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.