Package org.apache.jackrabbit.vault.cli
Class VaultFsApp
- java.lang.Object
-
- org.apache.jackrabbit.vault.util.console.AbstractApplication
-
- org.apache.jackrabbit.vault.cli.VaultFsApp
-
public class VaultFsApp extends AbstractApplication
Implements a console/shell that operates on a jcrfs.
-
-
Field Summary
Fields Modifier and Type Field Description static StringKEY_DEFAULT_CONFIG_XMLstatic StringKEY_DEFAULT_CREDSstatic StringKEY_DEFAULT_FILTER_XMLstatic StringKEY_DEFAULT_MOUNTPOINTstatic StringKEY_DEFAULT_URIstatic StringKEY_DEFAULT_WORKSPACEstatic StringKEY_MOUNTPOINTstatic StringKEY_URIstatic StringKEY_WORKSPACEprotected static org.slf4j.Loggerlog-
Fields inherited from class org.apache.jackrabbit.vault.util.console.AbstractApplication
DEFAULT_CONF_FILENAME, KEY_HOST, KEY_LOGLEVEL, KEY_PATH, KEY_PROMPT, KEY_USER
-
-
Constructor Summary
Constructors Constructor Description VaultFsApp()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.commons.cli2.builder.GroupBuilderaddApplicationOptions(org.apache.commons.cli2.builder.GroupBuilder gbuilder)protected voidassertMounted()protected voidclose()protected voidconnect()VltContextcreateVaultContext(File localFile)protected voiddisconnect()voidexecute(org.apache.commons.cli2.CommandLine commandLine)StringgetApplicationName()Returns the name of this applicationprotected AggregategetArtifactsNode(String path, boolean mustExist)ConsolegetConsole()CredentialsStoregetCredentialsStore()protected ExecutionContextgetDefaultContext()protected FilegetPlatformFile(String path, boolean mustExist)protected List<File>getPlatformFiles(List<String> paths, boolean mustExist)PomPropertiesgetPomProperties()StringgetShellCommand()Returns the name of the shell commandprotected VaultFilegetVaultFile(String path, boolean mustExist)VaultFileSystemgetVaultFileSystem()protected voidinit()protected booleanisConnected()protected booleanisLoggedIn()protected booleanisMounted()protected voidlogin(String creds, String wsp)protected voidlogout()static voidmain(String[] args)protected voidmount(String creds, String wsp, String root, String config, String filter, boolean remount)voidprepare(org.apache.commons.cli2.CommandLine cl)protected voidunmount()-
Methods inherited from class org.apache.jackrabbit.vault.util.console.AbstractApplication
getAppHelpFormatter, getApplicationCLGroup, getCopyrightLine, getEnv, getProperty, getVersion, getVersionString, loadConfig, printHelp, printVersion, run, saveConfig, setLogLevel, setProperty
-
-
-
-
Field Detail
-
KEY_URI
public static final String KEY_URI
- See Also:
- Constant Field Values
-
KEY_WORKSPACE
public static final String KEY_WORKSPACE
- See Also:
- Constant Field Values
-
KEY_MOUNTPOINT
public static final String KEY_MOUNTPOINT
- See Also:
- Constant Field Values
-
KEY_DEFAULT_WORKSPACE
public static final String KEY_DEFAULT_WORKSPACE
- See Also:
- Constant Field Values
-
KEY_DEFAULT_MOUNTPOINT
public static final String KEY_DEFAULT_MOUNTPOINT
- See Also:
- Constant Field Values
-
KEY_DEFAULT_CREDS
public static final String KEY_DEFAULT_CREDS
- See Also:
- Constant Field Values
-
KEY_DEFAULT_URI
public static final String KEY_DEFAULT_URI
- See Also:
- Constant Field Values
-
KEY_DEFAULT_CONFIG_XML
public static final String KEY_DEFAULT_CONFIG_XML
- See Also:
- Constant Field Values
-
KEY_DEFAULT_FILTER_XML
public static final String KEY_DEFAULT_FILTER_XML
- See Also:
- Constant Field Values
-
log
protected static org.slf4j.Logger log
-
-
Method Detail
-
main
public static void main(String[] args)
-
createVaultContext
public VltContext createVaultContext(File localFile)
-
logout
protected void logout()
-
isLoggedIn
protected boolean isLoggedIn()
-
getVaultFileSystem
public VaultFileSystem getVaultFileSystem()
-
mount
protected void mount(String creds, String wsp, String root, String config, String filter, boolean remount)
-
isMounted
protected boolean isMounted()
-
unmount
protected void unmount()
-
assertMounted
protected void assertMounted()
-
connect
protected void connect()
-
isConnected
protected boolean isConnected()
-
disconnect
protected void disconnect()
-
getPomProperties
public PomProperties getPomProperties()
- Overrides:
getPomPropertiesin classAbstractApplication
-
getApplicationName
public String getApplicationName()
Description copied from class:AbstractApplicationReturns the name of this application- Specified by:
getApplicationNamein classAbstractApplication- Returns:
- the name of this application
-
getShellCommand
public String getShellCommand()
Description copied from class:AbstractApplicationReturns the name of the shell command- Specified by:
getShellCommandin classAbstractApplication- Returns:
- the name of the shell command
-
getDefaultContext
protected ExecutionContext getDefaultContext()
- Specified by:
getDefaultContextin classAbstractApplication
-
getConsole
public Console getConsole()
- Specified by:
getConsolein classAbstractApplication
-
init
protected void init()
- Overrides:
initin classAbstractApplication
-
getCredentialsStore
public CredentialsStore getCredentialsStore()
-
close
protected void close()
- Overrides:
closein classAbstractApplication
-
addApplicationOptions
public org.apache.commons.cli2.builder.GroupBuilder addApplicationOptions(org.apache.commons.cli2.builder.GroupBuilder gbuilder)
- Overrides:
addApplicationOptionsin classAbstractApplication
-
execute
public void execute(org.apache.commons.cli2.CommandLine commandLine) throws ExecutionException- Overrides:
executein classAbstractApplication- Throws:
ExecutionException
-
prepare
public void prepare(org.apache.commons.cli2.CommandLine cl) throws ExecutionException- Overrides:
preparein classAbstractApplication- Throws:
ExecutionException
-
-