Package edu.uiuc.ncsa.sas.admin
Class SASCommands
- java.lang.Object
-
- edu.uiuc.ncsa.security.util.cli.CommonCommands
-
- edu.uiuc.ncsa.security.storage.cli.StoreCommands
-
- edu.uiuc.ncsa.sas.admin.SASCommands
-
- All Implemented Interfaces:
Logable,Commands,Serializable
public class SASCommands extends StoreCommands
Created by Jeff Gaynor
on 8/15/22 at 2:48 PM- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.uiuc.ncsa.security.storage.cli.StoreCommands
StoreCommands.ChangeIDRecord, StoreCommands.RSRecord
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONFIG_FILE_FLAGstatic StringCONFIG_NAME_FLAGstatic StringCONFIG_TAG_NAME-
Fields inherited from class edu.uiuc.ncsa.security.storage.cli.StoreCommands
ALL_LIST_COMMAND, allEntries, DEFAULT_MAGIC_NUMBER, display_width, FILE_FLAG, FORCE_COPY_FLAG, KEY_SHORTHAND_PREFIX, LINE_LIST_COMMAND, LIST_EOL_MARKER, LOAD_ONLY_COMMAND, NEXT_N_COMMAND, RANDOM_ID_FLAG, RESULT_SET_KEY, resultSets, RM_FORCE_FLAG, RS_APPEND_ACTION, RS_CLEAR_ACTION, RS_DROP_ACTION, RS_FIELDS_ACTION, RS_FILE_KEY, RS_LIST_ACTION, RS_RANGE_KEY, RS_RANGE_SHORT_KEY, RS_READ_ACTION, RS_REMOVE_ACTION, RS_SAVE_ACTION, RS_SHOW_ACTION, RS_SIZE_ACTION, RS_SUBSET_ACTION, RS_WRITE_ACTION, SEARCH_AFTER_TS_FLAG, SEARCH_BEFORE_TS_FLAG, SEARCH_DATE_FLAG, SEARCH_DEBUG_FLAG, SEARCH_IS_NULL_FLAG, SEARCH_REGEX_FLAG, SEARCH_RESULT_SET_NAME, SEARCH_RETURNED_ATTRIBUTES_FLAG, SEARCH_SHORT_REGEX_FLAG, SEARCH_SIZE_FLAG, SEARCH_VERSIONS_FALSE_VALUE, SEARCH_VERSIONS_FLAG, SEARCH_VERSIONS_ONLY_VALUE, SEARCH_VERSIONS_TRUE_VALUE, SHORT_UPDATE_FLAG, SHOW_HEADER, SHOW_VERSIONS_LIST_COMMAND, SIZE_ALL_FLAG, SIZE_VERSIONS_FLAG, SKIP_UPDATE_PERMISSIONS_FLAG, sortable, STILE, UPDATE_FLAG, UPKEEP_FLAG_CFG, UPKEEP_FLAG_ENABLE, UPKEEP_FLAG_RUN, UPKEEP_FLAG_SHOW, UPKEEP_FLAG_TEST, VERBOSE_COMMAND
-
Fields inherited from class edu.uiuc.ncsa.security.util.cli.CommonCommands
CL_INPUT_FILE_FLAG, CL_OUTPUT_FILE_FLAG, DEFAULT_NULL_VALUE_PLACEHOLDER, defaultIndent, driver, INDENT, logger, placeHolder
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSASCommands(SASEnvironment SASEnvironment)SASCommands(MyLoggingFacade logger, Store store)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringcolumnHeader(int offset)This is the column header printed before the short format list command.voidextraUpdates(Identifiable identifiable, int magicNumber)This is a hook for extensions so they don't have to completely rewrite complexStoreCommands.update(edu.uiuc.ncsa.security.core.Identifiable)methods.protected Stringformat(Identifiable identifiable)In listing operations, take theIdentifiableargument and make a string version that a user can understandprotected Stringformat(Identifiable identifiable, int offset)Similar to {@link #format(Identifiable), this passes the offset from the left margin.SASEnvironmentgetEnvironment()StringgetName()StringgetPrompt()The prompt displayed to the user.static voidmain(String[] args)protected ListprocessList(InputLine inputLine, String key)A placeholder.protected intupdateStorePermissions(Identifier newID, Identifier oldID, boolean copy)Override this as needed to update any permissions for this store.-
Methods inherited from class edu.uiuc.ncsa.security.storage.cli.StoreCommands
actualCreate, addEntry, addEntry, archive, archiveFormat, bootstrap, change_id, clear_id, clear_store, clearEntries, copy, create, create, create, createEntry, deserialize, doChangeID, doCopy, edit, extractIndexKeys, extractRawList, findByIDOrRS, findItem, findItem, findItem, findSingleton, findSingleton, formatCounter, formatLongLine, fromXMLMap, get_id, getAndCheckKeyArg, getArgList, getEditorEntry, getID, getIdentifierfromIndex, getKeyArg, getKeyArg, getKeys, getMapConverter, getResultSets, getSerializationKeys, getSortable, getStore, getStoreArchiver, getTempDir, hasEntries, hasId, hasID, hasKey, initHelp, inputJSON, isBadID, isMonitored, list_keys, listEntries, loadAllEntries, loadQDLScript, longFormat, longFormat, longFormat, ls, multiLineInput, multiLinePropertyInput, oldrm, oldUpdate, preCreation, printIndexHelp, printRS, rangeHelpSnippet, removeEntries, removeEntry, rm, rmCleanup, rs, search, serialize, serialize, set_id, setEnvironment, setID, setIDFromInputLine, setResultSets, setSortable, setStore, showArchiveHelp, showCommandLineSwitchesHelp, showCreateHelp, showDeserializeHelp, showEntry, showEntrySubset, showKeyShorthandHelp, showListKeysHelp, showLSHelp, showLSHelp3, showResultSetHelp, showRMHelp, showSearchHelp, showSearchHelpExamples, showSerializeHelp, showSizeHelp, showUpdateHelp, showUpkeepHelp, size, toXMLMap, update, update, update, updateSingleValue, updateSingleValue, upkeep
-
Methods inherited from class edu.uiuc.ncsa.security.util.cli.CommonCommands
clear_env, clearEnvHelp, debug, echo, echoHelp, error, get_env, getBufferedReader, getDriver, getHelpUtil, getInput, getIOInterface, getPlaceHolder, getPropertyHelp, getValue, gracefulExit, indentWidth, info, isDebugOn, isEmpty, isOk, isPrintOuput, isVerbose, logit, print_env, printEnvHelp, printGetEnvHelp, printReadEnvHelp, printSaveEnvHelp, printSetEnvHelp, read_env, readFile, readJSON, readline, readline, save_env, say, say, say2, sayi, sayii, sayv, set_env, set_output_on, set_verbose_on, setBufferedReader, setDebugOn, setDriver, setHelpUtil, setOutputOnHelp, setPlaceHolder, setPrintOuput, setVerbose, setVerboseHelp, showHelp, version, versionHelp, warn
-
-
-
-
Constructor Detail
-
SASCommands
protected SASCommands(SASEnvironment SASEnvironment) throws Throwable
- Throws:
Throwable
-
SASCommands
public SASCommands(MyLoggingFacade logger, Store store) throws Throwable
- Throws:
Throwable
-
-
Method Detail
-
getEnvironment
public SASEnvironment getEnvironment()
- Overrides:
getEnvironmentin classStoreCommands
-
getPrompt
public String getPrompt()
Description copied from interface:CommandsThe prompt displayed to the user. This allows it to change based on context.- Specified by:
getPromptin interfaceCommands- Overrides:
getPromptin classStoreCommands- Returns:
- java.lang.String
-
getName
public String getName()
-
extraUpdates
public void extraUpdates(Identifiable identifiable, int magicNumber) throws IOException
Description copied from class:StoreCommandsThis is a hook for extensions so they don't have to completely rewrite complexStoreCommands.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.- Specified by:
extraUpdatesin classStoreCommands- Throws:
IOException
-
columnHeader
protected String columnHeader(int offset)
Description copied from class:StoreCommandsThis is the column header printed before the short format list command. It is optional.- Specified by:
columnHeaderin classStoreCommands- Parameters:
offset- -- the number of columns on the left the system is using for numbers.- Returns:
-
format
protected String format(Identifiable identifiable)
Description copied from class:StoreCommandsIn listing operations, take theIdentifiableargument and make a string version that a user can understand- Specified by:
formatin classStoreCommands
-
format
protected String format(Identifiable identifiable, int offset)
Description copied from class:StoreCommandsSimilar to {@link #format(Identifiable), this passes the offset from the left margin. This is, in fact, always called. If the offset does nothing. just pass the call on to that method. This is mostly used by stores whose short format includes line breaks.- Specified by:
formatin classStoreCommands- Returns:
-
processList
protected List processList(InputLine inputLine, String key) throws Exception
Description copied from class:StoreCommandsA placeholder. StoreCommands2 in OA4MP does this with QDL, but that dependency here would create a compilation circularity.This looks for key [...] and returns a list for what's between the []. If there is no such list, a null is returned. (E.g. the key is missing)
Contract is that the input line will have this entry removed and will be reparsed. This is to prevent bad parsing later.
- Overrides:
processListin classStoreCommands- Returns:
- Throws:
Exception
-
updateStorePermissions
protected int updateStorePermissions(Identifier newID, Identifier oldID, boolean copy)
Description copied from class:StoreCommandsOverride this as needed to update any permissions for this store. This is used inStoreCommands.change_id(edu.uiuc.ncsa.security.util.cli.InputLine)andStoreCommands.copy(edu.uiuc.ncsa.security.util.cli.InputLine).- Specified by:
updateStorePermissionsin classStoreCommandscopy- - if true copy the permissions with the new ID. If false, create new ones- Returns:
-
-