org.jboss.example.dna.sequencers
Class SequencingClient

java.lang.Object
  extended by org.jboss.example.dna.sequencers.SequencingClient

public class SequencingClient
extends java.lang.Object

Author:
Randall Hauch

Field Summary
static java.lang.String DEFAULT_JACKRABBIT_CONFIG_PATH
           
static char[] DEFAULT_PASSWORD
           
static java.lang.String DEFAULT_REPOSITORY_NAME
           
static java.lang.String DEFAULT_USERNAME
           
static java.lang.String DEFAULT_WORKING_DIRECTORY
           
static java.lang.String DEFAULT_WORKSPACE_NAME
           
 
Constructor Summary
SequencingClient()
           
 
Method Summary
protected  javax.jcr.Session createSession()
          Utility method to create a new JCR session from the execution context's SessionFactory.
protected  java.lang.String getMimeType(java.net.URL file)
           
 org.jboss.dna.repository.sequencers.SequencingService.Statistics getStatistics()
          Get the sequencing statistics.
static void main(java.lang.String[] args)
           
 void search()
          Perform a search of the repository for all image metadata automatically created by the image sequencer.
protected  void setJackrabbitConfigPath(java.lang.String jackrabbitConfigPath)
           
protected  void setRepositoryInformation(java.lang.String repositoryName, java.lang.String workspaceName, java.lang.String username, char[] password)
           
 void setUserInterface(UserInterface userInterface)
          Set the user interface that this client should use.
protected  void setWorkingDirectory(java.lang.String workingDirectoryPath)
           
 void shutdownDnaServices()
          Shut down the DNA services.
 void shutdownRepository()
          Shutdown the repository.
 void startDnaServices()
          Start the DNA services.
 void startRepository()
          Start up the JCR repository.
 void uploadFile()
          Prompt the user interface for the file to upload into the JCR repository, then upload it using the JCR API.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_JACKRABBIT_CONFIG_PATH

public static final java.lang.String DEFAULT_JACKRABBIT_CONFIG_PATH
See Also:
Constant Field Values

DEFAULT_WORKING_DIRECTORY

public static final java.lang.String DEFAULT_WORKING_DIRECTORY
See Also:
Constant Field Values

DEFAULT_REPOSITORY_NAME

public static final java.lang.String DEFAULT_REPOSITORY_NAME
See Also:
Constant Field Values

DEFAULT_WORKSPACE_NAME

public static final java.lang.String DEFAULT_WORKSPACE_NAME
See Also:
Constant Field Values

DEFAULT_USERNAME

public static final java.lang.String DEFAULT_USERNAME
See Also:
Constant Field Values

DEFAULT_PASSWORD

public static final char[] DEFAULT_PASSWORD
Constructor Detail

SequencingClient

public SequencingClient()
Method Detail

main

public static void main(java.lang.String[] args)

setWorkingDirectory

protected void setWorkingDirectory(java.lang.String workingDirectoryPath)

setJackrabbitConfigPath

protected void setJackrabbitConfigPath(java.lang.String jackrabbitConfigPath)

setRepositoryInformation

protected void setRepositoryInformation(java.lang.String repositoryName,
                                        java.lang.String workspaceName,
                                        java.lang.String username,
                                        char[] password)

setUserInterface

public void setUserInterface(UserInterface userInterface)
Set the user interface that this client should use.

Parameters:
userInterface -

startRepository

public void startRepository()
                     throws java.lang.Exception
Start up the JCR repository. This method only operates using the JCR API and Jackrabbit-specific API.

Throws:
java.lang.Exception

shutdownRepository

public void shutdownRepository()
                        throws java.lang.Exception
Shutdown the repository. This method only uses the JCR API.

Throws:
java.lang.Exception

startDnaServices

public void startDnaServices()
                      throws java.lang.Exception
Start the DNA services.

Throws:
java.lang.Exception

shutdownDnaServices

public void shutdownDnaServices()
                         throws java.lang.Exception
Shut down the DNA services.

Throws:
java.lang.Exception

getStatistics

public org.jboss.dna.repository.sequencers.SequencingService.Statistics getStatistics()
Get the sequencing statistics.

Returns:
the statistics; never null

uploadFile

public void uploadFile()
                throws java.lang.Exception
Prompt the user interface for the file to upload into the JCR repository, then upload it using the JCR API.

Throws:
java.lang.Exception

search

public void search()
            throws java.lang.Exception
Perform a search of the repository for all image metadata automatically created by the image sequencer.

Throws:
java.lang.Exception

createSession

protected javax.jcr.Session createSession()
                                   throws javax.jcr.RepositoryException
Utility method to create a new JCR session from the execution context's SessionFactory.

Returns:
the session
Throws:
javax.jcr.RepositoryException

getMimeType

protected java.lang.String getMimeType(java.net.URL file)


Copyright © 2008. All Rights Reserved.