com.spss.psapi.session

Interface Repository



  • public interface Repository
    This defines the basic functionality for a content repository. Unlike the file persistence tasks defined by TaskFactory, these are executed synchronously through the repository object rather than indirectly via the Session.
    Since:
    PSAPI 16.0
    Version:
    1.0
    Author:
    Julian Clinton
    See Also:
    TaskFactory
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.lang.String createFolder(java.lang.String parentFolder, java.lang.String newFolder)
      Creates a new folder with the specified name.
      java.net.URI createRetrieveURI(java.lang.String path, java.lang.String version, java.lang.String label)
      A utility function to create a repository URI that is valid for retrieving an object from the specified location.
      java.net.URI createStoreURI(java.lang.String path, java.lang.String label)
      A utility function to create a repository URI that is valid for storing an object at the specified location and with an optional label to be applied to the object when it is stored.
      void deleteFolder(java.lang.String folder)
      Deletes the specified folder and any content within it.
      java.lang.Object getRepositoryHandle()
      Returns the underlying repository handle.
      void renameFolder(java.lang.String folder, java.lang.String newName)
      Renames the specified folder.
      DocumentOutput retrieveDocument(java.lang.String path, java.lang.String version, java.lang.String label, boolean autoManage)
      Retrieves a document output from the specified path.
      ModelOutput retrieveModel(java.lang.String path, java.lang.String version, java.lang.String label, boolean autoManage)
      Retrieves a model output from the specified path.
      Processor retrieveProcessor(java.lang.String path, java.lang.String version, java.lang.String label, ProcessorDiagram diagram)
      Retrieves a node from the specified path and inserts it into the supplied diagram.
      ProcessorStream retrieveStream(java.lang.String path, java.lang.String version, java.lang.String label, boolean autoManage)
      Retrieves a stream from the specified path.
      java.lang.String storeDocument(DocumentOutput documentOutput, java.lang.String path, java.lang.String label)
      Stores a document output to the specified location.
      java.lang.String storeModel(ModelOutput modelOutput, java.lang.String path, java.lang.String label)
      Stores a model output to the specified location.
      java.lang.String storeProcessor(Processor node, java.lang.String path, java.lang.String label)
      Stores a node to the specified location.
      java.lang.String storeStream(ProcessorStream stream, java.lang.String path, java.lang.String label)
      Stores a stream to the specified location.
    • Method Detail

      • retrieveStream

        ProcessorStream retrieveStream(java.lang.String path,
                                     java.lang.String version,
                                     java.lang.String label,
                                     boolean autoManage)
                                       throws java.net.URISyntaxException,
                                              SessionException
        Retrieves a stream from the specified path. Either a version or label may be specified if a specific version is required. If both are null then the LATEST version is returned. Code that needs to open streams privately without having them made visible to the user should set the autoManage flag to false.
        Parameters:
        path - the full path to the object
        version - the version marker or null
        label - the label or null
        autoManage - whether the stream should be added to the stream manager
        Returns:
        a stream
        Throws:
        java.net.URISyntaxException - if the method cannot construct a valid URI
        SessionException - if the stream cannot be retrieved for some reason
      • storeStream

        java.lang.String storeStream(ProcessorStream stream,
                                   java.lang.String path,
                                   java.lang.String label)
                                     throws java.net.URISyntaxException,
                                            SessionException
        Stores a stream to the specified location. If the label is provided then it is applied to the new version.
        Parameters:
        stream - the stream to be stored
        path - the path
        label - the label or null
        Returns:
        the version marker of the new version
        Throws:
        java.net.URISyntaxException - if the method cannot construct a valid URI
        SessionException - if the stream cannot be stored for some reason
      • retrieveProcessor

        Processor retrieveProcessor(java.lang.String path,
                                  java.lang.String version,
                                  java.lang.String label,
                                  ProcessorDiagram diagram)
                                    throws java.net.URISyntaxException,
                                           SessionException
        Retrieves a node from the specified path and inserts it into the supplied diagram. Either a version or label may be specified if a specific version is required. If both are null then the LATEST version is returned.
        Parameters:
        path - the full path to the object
        version - the version marker or null
        label - the label or null
        diagram - the diagram that the node should be added to
        Returns:
        a node
        Throws:
        java.net.URISyntaxException - if the method cannot construct a valid URI
        SessionException - if the node cannot be retrieved for some reason
      • storeProcessor

        java.lang.String storeProcessor(Processor node,
                                      java.lang.String path,
                                      java.lang.String label)
                                        throws java.net.URISyntaxException,
                                               SessionException
        Stores a node to the specified location. If the label is provided then it is applied to the new version.
        Parameters:
        node - the node to be stored
        path - the path
        label - the label or null
        Returns:
        the version marker of the new version
        Throws:
        java.net.URISyntaxException - if the method cannot construct a valid URI
        SessionException - if the node cannot be stored for some reason
      • retrieveModel

        ModelOutput retrieveModel(java.lang.String path,
                                java.lang.String version,
                                java.lang.String label,
                                boolean autoManage)
                                  throws java.net.URISyntaxException,
                                         SessionException
        Retrieves a model output from the specified path. Either a version or label may be specified if a specific version is required. If both are null then the LATEST version is returned. Code that needs to open models privately without having them made visible to the user should set the autoManage flag to false.
        Parameters:
        path - the full path to the object
        version - the version marker or null
        label - the label or null
        autoManage - whether the model should be added to the model manager
        Returns:
        a model output
        Throws:
        java.net.URISyntaxException - if the method cannot construct a valid URI
        SessionException - if the model output cannot be retrieved for some reason
      • storeModel

        java.lang.String storeModel(ModelOutput modelOutput,
                                  java.lang.String path,
                                  java.lang.String label)
                                    throws java.net.URISyntaxException,
                                           SessionException
        Stores a model output to the specified location. If the label is provided then it is applied to the new version.
        Parameters:
        modelOutput - the model output to be stored
        path - the path
        label - the label or null
        Returns:
        the version marker of the new version
        Throws:
        java.net.URISyntaxException - if the method cannot construct a valid URI
        SessionException - if the model output cannot be stored for some reason
      • retrieveDocument

        DocumentOutput retrieveDocument(java.lang.String path,
                                      java.lang.String version,
                                      java.lang.String label,
                                      boolean autoManage)
                                        throws java.net.URISyntaxException,
                                               SessionException
        Retrieves a document output from the specified path. Either a version or label may be specified if a specific version is required. If both are null then the LATEST version is returned. Code that needs to open documents privately without having them made visible to the user should set the autoManage flag to false.
        Parameters:
        path - the full path to the object
        version - the version marker or null
        label - the label or null
        autoManage - whether the document should be added to the output manager
        Returns:
        a document output
        Throws:
        java.net.URISyntaxException - if the method cannot construct a valid URI
        SessionException - if the document output cannot be retrieved for some reason
      • storeDocument

        java.lang.String storeDocument(DocumentOutput documentOutput,
                                     java.lang.String path,
                                     java.lang.String label)
                                       throws java.net.URISyntaxException,
                                              SessionException
        Stores a document output to the specified location. If the label is provided then it is applied to the new version.
        Parameters:
        documentOutput - the document output to be stored
        path - the path
        label - the label or null
        Returns:
        the version marker of the new version
        Throws:
        java.net.URISyntaxException - if the method cannot construct a valid URI
        SessionException - if the document output cannot be stored for some reason
      • createFolder

        java.lang.String createFolder(java.lang.String parentFolder,
                                    java.lang.String newFolder)
                                      throws SessionException
        Creates a new folder with the specified name.
        Parameters:
        parentFolder - the path to the parent folder
        newFolder - the new folder name
        Returns:
        the full path to the new folder
        Throws:
        SessionException - if the folder cannot be created
      • renameFolder

        void renameFolder(java.lang.String folder,
                        java.lang.String newName)
                          throws SessionException
        Renames the specified folder.
        Parameters:
        folder - the path of the folder to be renamed
        newName - the new folder name
        Throws:
        SessionException - if the folder cannot be renamed
      • deleteFolder

        void deleteFolder(java.lang.String folder)
                          throws SessionException
        Deletes the specified folder and any content within it.
        Parameters:
        folder - the folder to be deleted
        Throws:
        SessionException - if the folder cannot be deleted
      • getRepositoryHandle

        java.lang.Object getRepositoryHandle()
        Returns the underlying repository handle. The handle will be an instance of the Java class com.spss.repository.client.application.Repository.
        Returns:
        the underlying repository handle
      • createStoreURI

        java.net.URI createStoreURI(java.lang.String path,
                                  java.lang.String label)
                                    throws java.net.URISyntaxException
        A utility function to create a repository URI that is valid for storing an object at the specified location and with an optional label to be applied to the object when it is stored.
        Parameters:
        path - the full path to the store location
        label - the label to be applied to the object or null
        Returns:
        a URI
        Throws:
        java.net.URISyntaxException - if the method cannot construct a valid URI
      • createRetrieveURI

        java.net.URI createRetrieveURI(java.lang.String path,
                                     java.lang.String version,
                                     java.lang.String label)
                                       throws java.net.URISyntaxException
        A utility function to create a repository URI that is valid for retrieving an object from the specified location. Either a version or label may be specified if s specific version is required. If both are null then the LATEST version will be returned.
        Parameters:
        path - the full path to the object to be retrieved
        version - the version marker or null
        label - the label or null
        Returns:
        a URI
        Throws:
        java.net.URISyntaxException - if the method cannot construct a valid URI

Copyright © 2014 Integral Solutions Ltd. All Rights Reserved.