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 String
KEY_DEFAULT_CONFIG_XML
static String
KEY_DEFAULT_CREDS
static String
KEY_DEFAULT_FILTER_XML
static String
KEY_DEFAULT_MOUNTPOINT
static String
KEY_DEFAULT_URI
static String
KEY_DEFAULT_WORKSPACE
static String
KEY_MOUNTPOINT
static String
KEY_URI
static String
KEY_WORKSPACE
protected static org.slf4j.Logger
log
-
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.GroupBuilder
addApplicationOptions(org.apache.commons.cli2.builder.GroupBuilder gbuilder)
protected void
assertMounted()
protected void
close()
protected void
connect()
VltContext
createVaultContext(File localFile)
protected void
disconnect()
void
execute(org.apache.commons.cli2.CommandLine commandLine)
String
getApplicationName()
Returns the name of this applicationprotected Aggregate
getArtifactsNode(String path, boolean mustExist)
Console
getConsole()
CredentialsStore
getCredentialsStore()
protected ExecutionContext
getDefaultContext()
protected File
getPlatformFile(String path, boolean mustExist)
protected List<File>
getPlatformFiles(List<String> paths, boolean mustExist)
PomProperties
getPomProperties()
String
getShellCommand()
Returns the name of the shell commandprotected VaultFile
getVaultFile(String path, boolean mustExist)
VaultFileSystem
getVaultFileSystem()
protected void
init()
protected boolean
isConnected()
protected boolean
isLoggedIn()
protected boolean
isMounted()
protected void
login(String creds, String wsp)
protected void
logout()
static void
main(String[] args)
protected void
mount(String creds, String wsp, String root, String config, String filter, boolean remount)
void
prepare(org.apache.commons.cli2.CommandLine cl)
protected void
unmount()
-
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:
getPomProperties
in classAbstractApplication
-
getApplicationName
public String getApplicationName()
Description copied from class:AbstractApplication
Returns the name of this application- Specified by:
getApplicationName
in classAbstractApplication
- Returns:
- the name of this application
-
getShellCommand
public String getShellCommand()
Description copied from class:AbstractApplication
Returns the name of the shell command- Specified by:
getShellCommand
in classAbstractApplication
- Returns:
- the name of the shell command
-
getDefaultContext
protected ExecutionContext getDefaultContext()
- Specified by:
getDefaultContext
in classAbstractApplication
-
getConsole
public Console getConsole()
- Specified by:
getConsole
in classAbstractApplication
-
init
protected void init()
- Overrides:
init
in classAbstractApplication
-
getCredentialsStore
public CredentialsStore getCredentialsStore()
-
close
protected void close()
- Overrides:
close
in classAbstractApplication
-
addApplicationOptions
public org.apache.commons.cli2.builder.GroupBuilder addApplicationOptions(org.apache.commons.cli2.builder.GroupBuilder gbuilder)
- Overrides:
addApplicationOptions
in classAbstractApplication
-
execute
public void execute(org.apache.commons.cli2.CommandLine commandLine) throws ExecutionException
- Overrides:
execute
in classAbstractApplication
- Throws:
ExecutionException
-
prepare
public void prepare(org.apache.commons.cli2.CommandLine cl) throws ExecutionException
- Overrides:
prepare
in classAbstractApplication
- Throws:
ExecutionException
-
-