org.nuxeo.ecm.shell
Class CommandContext
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<java.lang.String,java.lang.Object>
org.nuxeo.ecm.shell.CommandContext
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.Object>
public class CommandContext
- extends java.util.HashMap<java.lang.String,java.lang.Object>
- Author:
- Bogdan Stefanescu
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class java.util.AbstractMap |
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals, hashCode |
CommandContext
public CommandContext(CommandLineService service)
getCandidateHosts
public java.util.Collection<java.lang.String> getCandidateHosts()
setCandidateHosts
public void setCandidateHosts(java.util.Collection<java.lang.String> candidateHosts)
getHost
public java.lang.String getHost()
setHost
public void setHost(java.lang.String host)
getPort
public int getPort()
setPort
public void setPort(int port)
getUsername
public java.lang.String getUsername()
setUsername
public void setUsername(java.lang.String username)
getPassword
public java.lang.String getPassword()
setPassword
public void setPassword(java.lang.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 java.lang.Exception
- Throws:
java.lang.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 java.lang.Exception
- Throws:
java.lang.Exception
fetchDocument
public DocumentModel fetchDocument(Path path)
throws java.lang.Exception
- Throws:
java.lang.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 java.lang.Exception
- Shortcut for
getRepositoryInstance()
.
- Throws:
java.lang.Exception
getRepositoryInstance
public RepositoryInstance getRepositoryInstance()
throws java.lang.Exception
- Throws:
java.lang.Exception
openLocalRepository
public RepositoryInstance openLocalRepository(java.lang.String repoName)
getDocumentByPath
public DocumentModel getDocumentByPath(DocumentRef base,
Path path)
throws java.lang.Exception
- Throws:
java.lang.Exception
Copyright © 2010 Nuxeo SAS. All Rights Reserved.