Package eu.planets_project.ifr.core.storage.api

Examples of eu.planets_project.ifr.core.storage.api.WorkflowDefinition


     * @throws  ItemNotFoundException
     * @throws  RepositoryException
     */
    public WorkflowDefinition retrieveWorkflowDefinition(String id) throws ItemNotFoundException, RepositoryException {
      log.fine("JCRManager.retrieveWorkflowDefinition()");
      WorkflowDefinition _retVal = null;
      try {
        this.getSession();
        String _queryString = "//WorkflowDefinition[@id=\"" + id + "\"]";
        log.fine("Query string:" + _queryString);
        NodeIterator _nodes = this.executeQuery(_queryString);
        if (_nodes.getSize() == 0) {
          log.fine("No WorkflowDefinition with id " + id + " found");
          throw new ItemNotFoundException("WorkflowDefinition id = " + id + " was not found");
        }
        else {
            Node _node = _nodes.nextNode();
            Property _propId = _node.getProperty("id");
            Property _propOwner = _node.getProperty("owner");
            Property _propVersion = _node.getProperty("version");
            Property _propDescription = _node.getProperty("description");
            Property _propDate = _node.getProperty("date");
            _retVal = new WorkflowDefinition(_propId.getString(), _propOwner.getString(), null);
            _retVal.setDate(_propDate.getDate().getTime());
            _retVal.setDescription(_propDescription.getString());
            _retVal.setVersion(_propVersion.getString());
        }
      } finally {
        log.fine("logging out session");
        session.logout();
      }
View Full Code Here


    /**
     * @see eu.planets_project.ifr.core.storage.api.WorkflowManager#getWorkflow(java.lang.String)
     */
  public WorkflowDefinition getWorkflow(String id) throws ItemNotFoundException {
    WorkflowDefinition _retVal = null;
    try {
      _retVal = this.jcrManager.retrieveWorkflowDefinition(id);
    } catch (LoginException _exp) {
      throw new RuntimeException(_exp);
    } catch (RepositoryException _exp) {
View Full Code Here

TOP

Related Classes of eu.planets_project.ifr.core.storage.api.WorkflowDefinition

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.