Package de.mhus.lib.cao

Examples of de.mhus.lib.cao.CaoException


      if (newNode != null) {
        parent.getConnection().fireElementCreated(newNode.getIdentifier());
        parent.getConnection().fireElementLink(parent.getId(), newNode.getIdentifier());
      }
    } catch (Exception e) {
      throw new CaoException(e);
    }
  }
View Full Code Here


        String refId = property.getString();
        Node refNode = node.getSession().getNodeByIdentifier(refId);
        return new JackElement(getApplication(), refNode, attributes);
      }
    } catch (Exception e) {
      return new CaoException(this,name,e);
    }
    return null;
  }
View Full Code Here

  public void reload() throws CaoException {
    try {
      node.refresh(true);
      meta = new JackMeta(getConnection().getDriver(), node);
    } catch (Exception e) {
      throw new CaoException(e);
    }
  }
View Full Code Here

            }
          }
        }
        return false;
    } catch (Exception e) {
      throw new CaoException(e);
    }
  }
View Full Code Here

      LockManager manager = node.getSession().getWorkspace().getLockManager();
      if (!manager.holdsLock(node.getPath()))return false;
      manager.unlock(node.getPath());
      return true;
    } catch (RepositoryException e) {
      throw new CaoException(e);
    }
  }
View Full Code Here

  @Override
  public boolean isLocked(boolean owner) throws CaoException {
    try {
      return node.isLocked();
    } catch (RepositoryException e) {
      throw new CaoException(e);
    }
  }
View Full Code Here

          len = getLengthForJcr(p);
        }
        definition.add(new CaoMetaDefinition(this,p.getName(),type,p.getName(),len));
      }
    } catch (Exception e) {
      throw new CaoException(e);
    }
  }
View Full Code Here

      if (attributes != null && attributes.length > 0 && attributes[0] != null) {
        this.node = ((JackConnection)getConnection()).getSession().getNodeByIdentifier(attributes[0]);
      } else
        this.node = ((JackConnection)getConnection()).getSession().getRootNode();
    } catch (RepositoryException e) {
      throw new CaoException(e);
    }
    meta = new JackMeta(getConnection().getDriver(), node);
   
   
  }
View Full Code Here

    @Override
    public void reset() throws CaoException {
      try {
        childrens = JcrUtils.getChildNodes(node).iterator();
      } catch (RepositoryException e) {
        throw new CaoException(e);
      }
    }
View Full Code Here

      // START TRANSACTION
      try {
        orgSession.getSessionManager().beginTransaction();
      } catch (DfException e) {
        monitor.log().debug(e);
        throw new CaoException(e);       
      }
    }

    try {
      session = orgSession.getSessionManager().getSession(orgSession.getDocbaseName());     

     
     
      if (useTransaction) {
        monitor.log().debug("Commit transaction");
        session.getSessionManager().release(session);
        orgSession.getSessionManager().commitTransaction();
      }
    } catch (Throwable t) {
      monitor.log().error(t);
      if (session!=null) session.getSessionManager().release(session);
      if (useTransaction) {
        monitor.log().debug("Abort transaction");
        try {
          orgSession.getSessionManager().abortTransaction();
        } catch (DfException e) {
          monitor.log().debug(e);
          throw new CaoException(e);
        }
      }
    }
   
   
View Full Code Here

TOP

Related Classes of de.mhus.lib.cao.CaoException

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.