Package org.apache.slide.structure

Examples of org.apache.slide.structure.ObjectNotFoundException


            if (res.next()) {
                // Retrieving and loading the object
                className = res.getString(OBJECTS_CLASS);
            } else {
                // Object was not found ...
                throw new ObjectNotFoundException(uri);
            }

            closeStatement(statement);

            // Then, retrieve the children
View Full Code Here


            ResultSet res = statement.executeQuery();

            // Parsing result set

            if (!res.next()) {
                throw new ObjectNotFoundException(uri);
            }

            closeStatement(statement);

            // Updating children
View Full Code Here

    }

    public void storeObject(Connection connection, Uri uri, ObjectNode object)
        throws ObjectNotFoundException, ServiceAccessException {
        if (!storeObject(connection, uri, object, false))
            throw new ObjectNotFoundException(uri.toString());
    }
View Full Code Here

                statement.setString(1, uri.toString());
                res = statement.executeQuery();
                if (res.next()) {
                    className = res.getString(1);
                } else {
                    throw new ObjectNotFoundException(uri);
                }
            } finally {
                close(statement, res);
            }
View Full Code Here

        if ( !results.hasMore() ) {
                    if (ctx != null) {
                        closeContext(ctx);
                    }
          throw new ObjectNotFoundException( uri );
        }
      } catch ( NamingException e ) {
        getLogger().log(
          name + ": Error retrieving " + uri.toString(),
          e, LOG_CHANNEL, Logger.ERROR );
View Full Code Here

      debug("storeObejct {0}", uri);
      ObjectNode node = (ObjectNode)get(uri.toString());
      if (node != null) {
         put(uri.toString(), object);
      } else {
         throw new ObjectNotFoundException(uri);
      }
   }
View Full Code Here

      debug("removeObject {0}", uri);
      ObjectNode node = (ObjectNode)get(uri.toString());
      if (node != null) {
         remove(uri.toString());
      } else {
         throw new ObjectNotFoundException(uri);
      }
   }
View Full Code Here

                objectNode.setUri(currentUriStr);
                currentUriStr = uriPath.subUriPath(0, i + 1).toString();
                currentUri = new Uri(uri.getToken(), uri.getNamespace(), currentUriStr);
                String currentUuri = objectNode.getBindingUuri(segments[i]);
                if (currentUuri == null) {
                    throw new ObjectNotFoundException(currentUriStr);
                }
                currentResourceId = ResourceId.create(currentUri, currentUuri);
            }
            resourceId = currentResourceId;
           
View Full Code Here

                    subjectUri.getStore().createRevisionDescriptors(subjectUri, revisionDescriptors);
                    subjectUri.getStore().createRevisionDescriptor(subjectUri, revisionDescriptor);
                   
                } catch (ClassNotFoundException ex) {
                    // Can't find role implementing class
                    throw new ObjectNotFoundException(subjectUri);
                } catch (NoSuchMethodException ex) {
                    // Can't find appropriate constructor
                    throw new ObjectNotFoundException(subjectUri);
                } catch (InstantiationException ex) {
                    // Can't instatiate object
                    throw new ObjectNotFoundException(subjectUri);
                } catch (InvocationTargetException ex) {
                    // Can't invoke constructor
                    throw new ObjectNotFoundException(subjectUri);
                } catch (IllegalAccessException ex) {
                    // Constructor is not public
                    throw new ObjectNotFoundException(subjectUri);
                } catch (ObjectAlreadyExistsException ex) {
                    // Should never happen
                    ex.printStackTrace();
                    throw new ObjectNotFoundException(subjectUri);
                }
                return subjectUri.getStore().retrieveObject(subjectUri);
            }
        }
    }
View Full Code Here

        String parentUri = String.valueOf(new UriPath(strUri).parent());
        try {
            NodeRevisionDescriptor parentNrd =
                retrieve(token, retrieve(token, parentUri));
            if (isLockNull(parentNrd)) {
                throw new ObjectNotFoundException(parentUri);
            }
        }
        catch (RevisionDescriptorNotFoundException e) {
            throw new ObjectNotFoundException(parentUri);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.slide.structure.ObjectNotFoundException

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.