public abstract class StoreCommands extends CommonCommands
Created by Jeff Gaynor
on 5/20/13 at 3:22 PM
Modifier and Type | Field and Description |
---|---|
protected List<Identifiable> |
allEntries |
BATCH_FILE_LINE_CONTINUES, BATCH_FILE_MODE_FLAG, BATCH_MODE_FLAG, batchFile, CL_INPUT_FILE_FLAG, CL_OUTPUT_FILE_FLAG, defaultIndent, INDENT, logger, placeHolder
Modifier | Constructor and Description |
---|---|
|
StoreCommands(MyLoggingFacade logger,
Store store) |
protected |
StoreCommands(MyLoggingFacade logger,
String defaultIndent,
Store store)
Constructor that sets the indent level for this command processor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
clearEntries()
Clears the list of entries so next call will get it afresh
|
protected void |
create() |
void |
create(InputLine inputLine)
Creates a new item.
|
Identifiable |
createNew() |
abstract void |
deserialize(InputLine inputLine) |
abstract void |
edit(InputLine inputLine) |
abstract void |
extraUpdates(Identifiable identifiable)
This is a hook for extensions so they don't have to completely
rewrite complex
update(edu.uiuc.ncsa.security.core.Identifiable) methods. |
protected Identifiable |
findItem(InputLine inputLine)
Resolves the first argument of a command line into either a unique identifier
|
protected abstract String |
format(Identifiable identifiable)
In listing operations, take the
Identifiable argument and make a string version that a
user can understand |
abstract String |
getName() |
String |
getPrompt()
The prompt displayed to the user.
|
protected Sortable |
getSortable() |
Store |
getStore() |
protected boolean |
hasEntries()
Tell if the user has run the listAll command.
|
protected List<Identifiable> |
listAll(boolean useLongFormat,
String otherFlags) |
protected List<Identifiable> |
loadAllEntries() |
protected abstract void |
longFormat(Identifiable identifiable)
Give a long (multi-line) formatted object.
|
void |
ls(InputLine inputLine) |
void |
rm(InputLine inputLine) |
abstract void |
search(InputLine inputLine) |
abstract void |
serialize(InputLine inputLine) |
void |
setSortable(Sortable sortable) |
void |
setStore(Store store) |
protected void |
showCreateHelp() |
protected void |
showDeserializeHelp() |
protected void |
showLSHelp() |
protected void |
showRMHelp() |
protected void |
showSerializeHelp() |
protected void |
showSizeHelp() |
protected void |
showUpdateHelp() |
void |
size(InputLine inputLine) |
abstract boolean |
update(Identifiable identifiable)
This is the workhorse method for the object that lets you edit the values.
|
void |
update(InputLine inputLine) |
clear_env, clearEnvHelp, debug, echo, echoHelp, error, getBufferedReader, getDriver, getInput, getPlaceHolder, getValue, gracefulExit, info, isBatch, isBatchFile, isBatchMode, isDebugOn, isEmpty, isOk, isPrintOuput, isVerbose, logit, print_env, printEnvHelp, printReadEnvHelp, printSaveEnvHelp, printSetEnvHelp, read_env, readFile, readJSON, readline, save_env, say, say2, sayi, sayi2, sayv, set_env, set_output_on, set_verbose_on, setBatchFile, setBatchMode, setBufferedReader, setDebugOn, setDriver, setOuputOnHelp, setPlaceHolder, setPrintOuput, setVerbose, setVerboseHelp, showHelp, version, versionHelp, warn
protected List<Identifiable> allEntries
protected StoreCommands(MyLoggingFacade logger, String defaultIndent, Store store)
defaultIndent
- store
- public StoreCommands(MyLoggingFacade logger, Store store)
public void setSortable(Sortable sortable)
protected Sortable getSortable()
public abstract String getName()
public String getPrompt()
Commands
public Store getStore()
public void setStore(Store store)
protected void showUpdateHelp()
protected void showSerializeHelp()
protected void showDeserializeHelp()
public abstract void serialize(InputLine inputLine)
public abstract void deserialize(InputLine inputLine)
public abstract void search(InputLine inputLine)
public abstract void edit(InputLine inputLine)
public void update(InputLine inputLine)
public Identifiable createNew()
public abstract boolean update(Identifiable identifiable)
identifiable
- public abstract void extraUpdates(Identifiable identifiable)
update(edu.uiuc.ncsa.security.core.Identifiable)
methods.
It will be invoked before
update displays the completed item and saves it, allowing any properties not in the base class
to be queried and saved.identifiable
- protected abstract String format(Identifiable identifiable)
Identifiable
argument and make a string version that a
user can understandidentifiable
- protected abstract void longFormat(Identifiable identifiable)
identifiable
- protected boolean hasEntries()
protected List<Identifiable> loadAllEntries()
protected void clearEntries()
protected List<Identifiable> listAll(boolean useLongFormat, String otherFlags)
protected void showCreateHelp()
public void create(InputLine inputLine)
inputLine
- protected void create()
protected void showRMHelp()
protected Identifiable findItem(InputLine inputLine)
inputLine
- public void rm(InputLine inputLine)
protected void showLSHelp()
public void ls(InputLine inputLine)
protected void showSizeHelp()
public void size(InputLine inputLine)
Copyright © 2019. All Rights Reserved.