Class EditorUtils
- java.lang.Object
-
- edu.uiuc.ncsa.security.util.cli.editing.EditorUtils
-
public class EditorUtils extends Object
Created by Jeff Gaynor
on 3/17/21 at 6:47 AM
-
-
Field Summary
Fields Modifier and Type Field Description static StringEDITOR_ARG_CONNECTOR_ATTRstatic StringEDITOR_ARG_FLAG_ATTRstatic StringEDITOR_ARG_TAGstatic StringEDITOR_ARG_VALUE_ATTRstatic StringEDITOR_CLEAR_SCREEN_ATTRstatic StringEDITOR_EXEC_ATTRstatic StringEDITOR_NAME_ATTRstatic intEDITOR_RC_ERRORstatic intEDITOR_RC_OKstatic StringEDITOR_TAGstatic StringEDITORS_TAG
-
Constructor Summary
Constructors Constructor Description EditorUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static inteditFile(EditorEntry editorEntry, File targetFile)Edits a file.static EditorsgetEditors(CFNode cfNode)static EditorsgetEditors(org.apache.commons.configuration.tree.ConfigurationNode cn)protected static voidsay(String x)static voidupdateEditors(Editors editors, InputLine inputLine)Facility for updating the editors.
-
-
-
Field Detail
-
EDITORS_TAG
public static final String EDITORS_TAG
- See Also:
- Constant Field Values
-
EDITOR_TAG
public static final String EDITOR_TAG
- See Also:
- Constant Field Values
-
EDITOR_ARG_TAG
public static final String EDITOR_ARG_TAG
- See Also:
- Constant Field Values
-
EDITOR_NAME_ATTR
public static final String EDITOR_NAME_ATTR
- See Also:
- Constant Field Values
-
EDITOR_EXEC_ATTR
public static final String EDITOR_EXEC_ATTR
- See Also:
- Constant Field Values
-
EDITOR_CLEAR_SCREEN_ATTR
public static final String EDITOR_CLEAR_SCREEN_ATTR
- See Also:
- Constant Field Values
-
EDITOR_ARG_FLAG_ATTR
public static final String EDITOR_ARG_FLAG_ATTR
- See Also:
- Constant Field Values
-
EDITOR_ARG_CONNECTOR_ATTR
public static final String EDITOR_ARG_CONNECTOR_ATTR
- See Also:
- Constant Field Values
-
EDITOR_ARG_VALUE_ATTR
public static final String EDITOR_ARG_VALUE_ATTR
- See Also:
- Constant Field Values
-
EDITOR_RC_OK
public static final int EDITOR_RC_OK
- See Also:
- Constant Field Values
-
EDITOR_RC_ERROR
public static final int EDITOR_RC_ERROR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getEditors
public static Editors getEditors(org.apache.commons.configuration.tree.ConfigurationNode cn)
-
say
protected static void say(String x)
-
updateEditors
public static void updateEditors(Editors editors, InputLine inputLine)
Facility for updating the editors. (Under construction -- issue is that each CLI has very specialized needs, so a general facility just might not work).- Parameters:
editors-inputLine-
-
editFile
public static int editFile(EditorEntry editorEntry, File targetFile)
Edits a file. Return code isEDITOR_RC_OKif everything worked andEDITOR_RC_ERRORif not.- Parameters:
editorEntry-targetFile-- Returns:
-
-