Package org.apache.slide.content

Examples of org.apache.slide.content.RevisionDescriptorNotFoundException


                  int isVersionedInt = res.getInt(REVISIONS_ISVERSIONED);
                  if (isVersionedInt == 1) {
                      isVersioned = true;
                  }
              } else {
                  throw new RevisionDescriptorNotFoundException(uri.toString());
              }
           
              closeStatement(statement);
           
              statement = connection.prepareStatement
View Full Code Here


       
          NodeRevisionDescriptor revisionDescriptor = null;
          PreparedStatement statement = null;

      if(revisionNumber == null)
          throw new RevisionDescriptorNotFoundException(uri.toString());
       
          try {
           
              ResultSet res = null;
           
              String branchName = null;
              Vector labels = new Vector();
              Hashtable properties = new Hashtable();
           
              // Retrieving branch name (and also check that revision
              // does indeed exist)
           
              statement = connection.prepareStatement
                  ("select * from revision where uri= ? and xnumber = ?");
              statement.setString(1, uri.toString());
              statement.setString(2, revisionNumber.toString());
              res = statement.executeQuery();
           
              if (res.next()) {
                  branchName = res.getString(REVISION_BRANCHNAME);
              } else {
                  throw new RevisionDescriptorNotFoundException(uri.toString());
              }
           
              closeStatement(statement);
           
              // Retrieve labels
View Full Code Here

    */
    //----------------------------------------
    public NodeRevisionDescriptors retrieveRevisionDescriptors(Uri uri)
        throws ServiceAccessException, RevisionDescriptorNotFoundException {
        if (revisionDescriptors == null) {
            throw new RevisionDescriptorNotFoundException(uri.toString());
        }
        return revisionDescriptors.cloneObject();
    }
View Full Code Here

    */
    //----------------------------------------
    public void storeRevisionDescriptors(Uri uri, NodeRevisionDescriptors aRevisionDescriptors)
        throws ServiceAccessException, RevisionDescriptorNotFoundException {
        if (!revisionDescriptors.getUri().equals(uri.toString())) {
            throw new RevisionDescriptorNotFoundException(uri.toString());
        }
        revisionDescriptors = aRevisionDescriptors.cloneObject();
        save(uri);
    }
View Full Code Here

        Object result = null;
       
        if (descriptor!=null && revisionNumber!=null) result = descriptor.get(revisionNumber.toString());
           
        if (result == null) {
            throw new RevisionDescriptorNotFoundException(uri.toString());
        }
        return ((NodeRevisionDescriptor) result).cloneObject();
    }
View Full Code Here

    //----------------------------------------
    public void storeRevisionDescriptor(Uri uri, NodeRevisionDescriptor aRevisionDescriptor)
        throws ServiceAccessException, RevisionDescriptorNotFoundException {
        String key = aRevisionDescriptor.getRevisionNumber().toString();
        if (descriptor==null || !descriptor.containsKey(key)) {
            throw new RevisionDescriptorNotFoundException(uri.toString());
        }
        descriptor.put(key, aRevisionDescriptor.cloneObject());
        save(uri);
    }
View Full Code Here

                  int isVersionedInt = res.getInt(REVISIONS_ISVERSIONED);
                  if (isVersionedInt == 1) {
                      isVersioned = true;
                  }
              } else {
                  throw new RevisionDescriptorNotFoundException(uri.toString());
              }
           
              closeStatement(statement);
           
              statement = connection.prepareStatement
View Full Code Here

       
          NodeRevisionDescriptor revisionDescriptor = null;
          PreparedStatement statement = null;

      if(revisionNumber == null)
          throw new RevisionDescriptorNotFoundException(uri.toString());
       
          try {
           
              ResultSet res = null;
           
              String branchName = null;
              Vector labels = new Vector();
              Hashtable properties = new Hashtable();
           
              // Retrieving branch name (and also check that revision
              // does indeed exist)
           
              statement = connection.prepareStatement
                  ("select * from revision where uri= ? and xnumber = ?");
              statement.setString(1, uri.toString());
              statement.setString(2, revisionNumber.toString());
              res = statement.executeQuery();
           
              if (res.next()) {
                  branchName = res.getString(REVISION_BRANCHNAME);
              } else {
                  throw new RevisionDescriptorNotFoundException(uri.toString());
              }
           
              closeStatement(statement);
           
              // Retrieve labels
View Full Code Here

        if ( !results.hasMore() ) {
                    if (ctx != null) {
                        closeContext(ctx);
                    }
          throw new RevisionDescriptorNotFoundException( uri.toString() );
        }
        while ( results.hasMore() ) {
          SearchResult result = null;
          try {
            result = (SearchResult)results.next();
View Full Code Here

      NodeRevisionDescriptor descriptor =
         (NodeRevisionDescriptor)get(new VersionedUriKey(uri, revisionNumber));
      if (descriptor != null) {
         return descriptor;
      } else {
         throw new RevisionDescriptorNotFoundException(uri.toString());
      }
   }
View Full Code Here

TOP

Related Classes of org.apache.slide.content.RevisionDescriptorNotFoundException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.