javax.jcr.version.VersionException Java Examples

The following examples show how to use javax.jcr.version.VersionException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PropertyImpl.java    From jackalope with Apache License 2.0 5 votes vote down vote up
public PropertyImpl(@Nonnull SessionImpl session, @Nonnull String path, @Nonnull String[] values) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException {
    this(session, path);
    List<Value> stringValues = new ArrayList<>(values.length);
    for (String value : values)
        stringValues.add(new ValueImpl(value));
    setValue(stringValues.toArray(new Value[stringValues.size()]));
}
 
Example #2
Source File: NodeImpl.java    From jackalope with Apache License 2.0 5 votes vote down vote up
@Override
public Property setProperty(String name, Value value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException {
    if (value == null) {
        if (hasProperty(name))
            getProperty(name).remove();
        return null;
    }
    PropertyImpl property = getOrCreateProperty(name);
    property.setValue(value);
    session.changeItem(this);
    return property;
}
 
Example #3
Source File: NodeImpl.java    From jackalope with Apache License 2.0 5 votes vote down vote up
@Override
public Property setProperty(String name, Value[] values) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException {
    PropertyImpl property = getOrCreateProperty(name);
    property.setValue(values);
    session.changeItem(this);
    return property;
}
 
Example #4
Source File: PropertyImpl.java    From jackalope with Apache License 2.0 5 votes vote down vote up
@Override
public void setValue(@Nonnull String[] values) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException {
    List<Value> valueList = new ArrayList<>(values.length);
    for (String value : values)
        valueList.add(new ValueImpl(value));
    setValue(valueList.toArray(new Value[valueList.size()]));
}
 
Example #5
Source File: NodeImpl.java    From jackalope with Apache License 2.0 4 votes vote down vote up
@Override
public Property setProperty(String name, String[] values, int type) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException {
    return setProperty(name, values); // TODO: Implement type conversions
}
 
Example #6
Source File: WorkspaceImpl.java    From jackalope with Apache License 2.0 4 votes vote down vote up
@Override
public void clone(String srcWorkspace, String srcAbsPath, String destAbsPath, boolean removeExisting) throws NoSuchWorkspaceException, ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, RepositoryException {
}
 
Example #7
Source File: NodeImpl.java    From jackalope with Apache License 2.0 4 votes vote down vote up
@Override
public void restore(Version version, String relPath, boolean removeExisting) throws PathNotFoundException, ItemExistsException, VersionException, ConstraintViolationException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException {
    throw new UnsupportedRepositoryOperationException();
}
 
Example #8
Source File: SessionWrapper.java    From sling-whiteboard with Apache License 2.0 4 votes vote down vote up
@Override
public void save() throws AccessDeniedException, ItemExistsException, ReferentialIntegrityException, ConstraintViolationException, InvalidItemStateException, VersionException, LockException, NoSuchNodeTypeException, RepositoryException {
    this.wrappedSession.save();
}
 
Example #9
Source File: SessionWrapper.java    From sling-whiteboard with Apache License 2.0 4 votes vote down vote up
@Override
public ContentHandler getImportContentHandler(String parentAbsPath, int uuidBehavior) throws PathNotFoundException, ConstraintViolationException, VersionException, LockException, RepositoryException {
    return this.wrappedSession.getImportContentHandler(parentAbsPath, uuidBehavior);
}
 
Example #10
Source File: NodeImpl.java    From jackalope with Apache License 2.0 4 votes vote down vote up
@Override
public Property setProperty(String name, Binary value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException {
    return setProperty(name, new ValueImpl(value));
}
 
Example #11
Source File: ItemWrapper.java    From sling-whiteboard with Apache License 2.0 4 votes vote down vote up
@Override
public void save() throws AccessDeniedException, ItemExistsException, ConstraintViolationException, InvalidItemStateException, ReferentialIntegrityException, VersionException, LockException, NoSuchNodeTypeException, RepositoryException {
    this.sessionWrapper.save();
}
 
Example #12
Source File: NodeImpl.java    From jackalope with Apache License 2.0 4 votes vote down vote up
@Override
public Property setProperty(String name, String value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException {
    return setProperty(name, new ValueImpl(value));
}
 
Example #13
Source File: NodeImpl.java    From jackalope with Apache License 2.0 4 votes vote down vote up
@Override
public Property setProperty(String name, String value, int type) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException {
    // TODO: Implement type conversions
    throw new UnsupportedOperationException();
}
 
Example #14
Source File: QueryImpl.java    From jackalope with Apache License 2.0 4 votes vote down vote up
@Override
public Node storeAsNode(String absPath) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, UnsupportedRepositoryOperationException, RepositoryException {
    return null;
}
 
Example #15
Source File: NodeImpl.java    From jackalope with Apache License 2.0 4 votes vote down vote up
@Override
public Property setProperty(String name, double value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException {
    return setProperty(name, new ValueImpl(value));
}
 
Example #16
Source File: NodeImpl.java    From jackalope with Apache License 2.0 4 votes vote down vote up
@Override
public Property setProperty(String name, long value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException {
    return setProperty(name, new ValueImpl(value));
}
 
Example #17
Source File: NodeImpl.java    From jackalope with Apache License 2.0 4 votes vote down vote up
@Override
public Property setProperty(String name, BigDecimal value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException {
    return setProperty(name, new ValueImpl(value));
}
 
Example #18
Source File: AccessControlManagerWrapper.java    From sling-whiteboard with Apache License 2.0 4 votes vote down vote up
@Override
public void setPolicy(String absPath, AccessControlPolicy policy) throws PathNotFoundException, AccessControlException, AccessDeniedException, LockException, VersionException, RepositoryException {
    delegate.setPolicy(absPath, policy);
}
 
Example #19
Source File: ItemWrapper.java    From sling-whiteboard with Apache License 2.0 4 votes vote down vote up
@Override
public void remove() throws VersionException, LockException, ConstraintViolationException, AccessDeniedException, RepositoryException {
    this.sessionWrapper.removeItem(this.getPath());
}
 
Example #20
Source File: SessionWrapper.java    From sling-whiteboard with Apache License 2.0 4 votes vote down vote up
@Override
public void move(String srcAbsPath, String destAbsPath) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, RepositoryException {
    this.wrappedSession.move(srcAbsPath, destAbsPath);
}
 
Example #21
Source File: NodeImpl.java    From jackalope with Apache License 2.0 4 votes vote down vote up
@Override
public void addMixin(String mixinName) throws NoSuchNodeTypeException, VersionException, ConstraintViolationException, LockException, RepositoryException {
    //Not Implemented
}
 
Example #22
Source File: PropertyWrapper.java    From sling-whiteboard with Apache License 2.0 4 votes vote down vote up
@Override
public void setValue(boolean value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException {
    delegate.setValue(value);
}
 
Example #23
Source File: PropertyWrapper.java    From sling-whiteboard with Apache License 2.0 4 votes vote down vote up
@Override
public void setValue(Calendar value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException {
    delegate.setValue(value);
}
 
Example #24
Source File: PropertyWrapper.java    From sling-whiteboard with Apache License 2.0 4 votes vote down vote up
@Override
public void setValue(BigDecimal value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException {
    delegate.setValue(value);
}
 
Example #25
Source File: PropertyImpl.java    From jackalope with Apache License 2.0 4 votes vote down vote up
@Override
public void setValue(long value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException {
    setValue(new ValueImpl(value));
}
 
Example #26
Source File: WorkspaceImpl.java    From jackalope with Apache License 2.0 4 votes vote down vote up
@Override
public void copy(String srcWorkspace, String srcAbsPath, String destAbsPath) throws NoSuchWorkspaceException, ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, RepositoryException {
}
 
Example #27
Source File: PropertyWrapper.java    From sling-whiteboard with Apache License 2.0 4 votes vote down vote up
@Override
public void setValue(Binary value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException {
    delegate.setValue(value);
}
 
Example #28
Source File: PropertyWrapper.java    From sling-whiteboard with Apache License 2.0 4 votes vote down vote up
@Override
public void setValue(InputStream value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException {
    delegate.setValue(value);
}
 
Example #29
Source File: PropertyImpl.java    From jackalope with Apache License 2.0 4 votes vote down vote up
@Override
public void setValue(@Nonnull Value[] values) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException {
    this.values = values;
    session.changeItem(this);
}
 
Example #30
Source File: PropertyWrapper.java    From sling-whiteboard with Apache License 2.0 4 votes vote down vote up
@Override
public void setValue(String value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException {
    delegate.setValue(value);
}