org.nuxeo.ecm.shell
Class CommandContext
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<String,Object>
org.nuxeo.ecm.shell.CommandContext
- All Implemented Interfaces:
- Serializable, Cloneable, Map<String,Object>
public class CommandContext
- extends HashMap<String,Object>
- Author:
- Bogdan Stefanescu
- See Also:
- Serialized Form
Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
CommandContext
public CommandContext(CommandLineService service)
getCandidateHosts
public Collection<String> getCandidateHosts()
setCandidateHosts
public void setCandidateHosts(Collection<String> candidateHosts)
getHost
public String getHost()
setHost
public void setHost(String host)
getPort
public int getPort()
setPort
public void setPort(int port)
getUsername
public String getUsername()
setUsername
public void setUsername(String username)
getPassword
public String getPassword()
setPassword
public void setPassword(String password)
isInteractive
public boolean isInteractive()
setInteractive
public void setInteractive(boolean value)
isCurrentDocumentSet
public boolean isCurrentDocumentSet()
isCurrentRepositorySet
public boolean isCurrentRepositorySet()
getCurrentDocument
public DocumentRef getCurrentDocument()
throws Exception
- Throws:
Exception
setCurrentDocument
public void setCurrentDocument(DocumentRef docRef)
setCurrentDocument
public void setCurrentDocument(DocumentModel doc)
getCommandLine
public CommandLine getCommandLine()
setCommandLine
public void setCommandLine(CommandLine cmdLine)
setRepositoryInstance
public void setRepositoryInstance(RepositoryInstance repository)
fetchDocument
public DocumentModel fetchDocument()
throws Exception
- Throws:
Exception
fetchDocument
public DocumentModel fetchDocument(Path path)
throws Exception
- Throws:
Exception
getService
public CommandLineService getService()
isLocal
public boolean isLocal()
- Whether the shell is running in the context of a local repository.
getCoreSession
public RepositoryInstance getCoreSession()
throws Exception
- Shortcut for
getRepositoryInstance()
.
- Throws:
Exception
getRepositoryInstance
public RepositoryInstance getRepositoryInstance()
throws Exception
- Throws:
Exception
initalizeConnection
protected void initalizeConnection()
throws Exception
- Throws:
Exception
askForCredentials
protected void askForCredentials()
throws IOException
- Throws:
IOException
openLocalRepository
public RepositoryInstance openLocalRepository(String repoName)
getDocumentByPath
public DocumentModel getDocumentByPath(DocumentRef base,
Path path)
throws Exception
- Throws:
Exception
Copyright © 2010 Nuxeo SAS. All Rights Reserved.