Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.shell
Class CommandContext

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<java.lang.String,java.lang.Object>
          extended by 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 Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
CommandContext(CommandLineService service)
           
 
Method Summary
 DocumentModel fetchDocument()
           
 DocumentModel fetchDocument(Path path)
           
 java.util.Collection<java.lang.String> getCandidateHosts()
           
 CommandLine getCommandLine()
           
 RepositoryInstance getCoreSession()
          Shortcut for getRepositoryInstance().
 DocumentRef getCurrentDocument()
           
 DocumentModel getDocumentByPath(DocumentRef base, Path path)
           
 java.lang.String getHost()
           
 java.lang.String getPassword()
           
 int getPort()
           
 RepositoryInstance getRepositoryInstance()
           
 CommandLineService getService()
           
 java.lang.String getUsername()
           
 boolean isCurrentDocumentSet()
           
 boolean isCurrentRepositorySet()
           
 boolean isInteractive()
           
 boolean isLocal()
          Whether the shell is running in the context of a local repository.
 RepositoryInstance openLocalRepository(java.lang.String repoName)
           
 void setCandidateHosts(java.util.Collection<java.lang.String> candidateHosts)
           
 void setCommandLine(CommandLine cmdLine)
           
 void setCurrentDocument(DocumentModel doc)
           
 void setCurrentDocument(DocumentRef docRef)
           
 void setHost(java.lang.String host)
           
 void setInteractive(boolean value)
           
 void setPassword(java.lang.String password)
           
 void setPort(int port)
           
 void setRepositoryInstance(RepositoryInstance repository)
           
 void setUsername(java.lang.String username)
           
 
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
 

Constructor Detail

CommandContext

public CommandContext(CommandLineService service)
Method Detail

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

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.