/** * This will check out the node prior to editing. */ public void checkout() { checkout(this.node); }
/** * This will check out the node prior to editing. */ public void checkout() { checkout(this.node); }
public VersionableItem archiveItem(boolean data) { checkout(); try { this.node.setProperty(CONTENT_PROPERTY_ARCHIVE_FLAG, data); return this; } catch (RepositoryException e) { log.error("Unable to update this VersionableItem binary archive flag"); throw new RulesRepositoryException(e); } }
public VersionableItem archiveItem(boolean data) { checkout(); try { this.node.setProperty(CONTENT_PROPERTY_ARCHIVE_FLAG, data); return this; } catch (RepositoryException e) { log.error("Unable to update this VersionableItem binary archive flag"); throw new RulesRepositoryException(e); } }
/** * Creates a new version of this object's node, updating the description content * for the node. * <br> * See the Dublin Core documentation for more * explanation: http://dublincore.org/documents/dces/ * * @param newDescriptionContent the new description content for the rule * @throws RulesRepositoryException */ public void updateDescription(String newDescriptionContent) throws RulesRepositoryException { try { this.checkout(); //this.node.setProperty(arg0, arg1); this.node.setProperty( DESCRIPTION_PROPERTY_NAME, newDescriptionContent ); Calendar lastModified = Calendar.getInstance(); this.node.setProperty( LAST_MODIFIED_PROPERTY_NAME, lastModified ); } catch ( Exception e ) { log.error( "Caught Exception", e ); throw new RulesRepositoryException( e ); } }
/** * Creates a new version of this object's node, updating the description content * for the node. * <br> * See the Dublin Core documentation for more * explanation: http://dublincore.org/documents/dces/ * * @param newDescriptionContent the new description content for the rule * @throws RulesRepositoryException */ public void updateDescription(String newDescriptionContent) throws RulesRepositoryException { try { this.checkout(); //this.node.setProperty(arg0, arg1); this.node.setProperty( DESCRIPTION_PROPERTY_NAME, newDescriptionContent ); Calendar lastModified = Calendar.getInstance(); this.node.setProperty( LAST_MODIFIED_PROPERTY_NAME, lastModified ); } catch ( Exception e ) { log.error( "Caught Exception", e ); throw new RulesRepositoryException( e ); } }
/** * optionally update last updated... */ public void updateStringProperty(String value, String prop, boolean setLastUpdated) { try { checkIsUpdateable(); if (value == null) { return; } this.checkout(); node.setProperty( prop, value ); if (setLastUpdated) { Calendar lastModified = Calendar.getInstance(); this.node.setProperty( LAST_MODIFIED_PROPERTY_NAME, lastModified ); } } catch ( Exception e ) { if ( e instanceof RuntimeException ) { throw (RuntimeException) e; } throw new RulesRepositoryException( e ); } }
/** * optionally update last updated... */ public void updateStringProperty(String value, String prop, boolean setLastUpdated) { try { checkIsUpdateable(); if (value == null) { return; } this.checkout(); node.setProperty( prop, value ); if (setLastUpdated) { Calendar lastModified = Calendar.getInstance(); this.node.setProperty( LAST_MODIFIED_PROPERTY_NAME, lastModified ); } } catch ( Exception e ) { if ( e instanceof RuntimeException ) { throw (RuntimeException) e; } throw new RulesRepositoryException( e ); } }
/** * Sets this object's rule node's state property to refer to the specified StateItem's node * * @param stateItem the StateItem encapsulating the node to refer to from this object's node's state * property * @throws RulesRepositoryException */ public void updateState(StateItem stateItem) throws RulesRepositoryException { checkIsUpdateable(); try { //now set the state property of the rule checkout(); this.node.setProperty( STATE_PROPERTY_NAME, stateItem.getNode() ); } catch ( Exception e ) { log.error( "Caught exception", e ); throw new RulesRepositoryException( e ); } }
/** * Sets this object's rule node's state property to refer to the specified state node * * @param stateName the name of the state to set the rule node to * @throws RulesRepositoryException */ public void updateState(String stateName) throws RulesRepositoryException { try { //now set the state property of the rule checkout(); StateItem stateItem = this.rulesRepository.getState( stateName ); this.updateState( stateItem ); } catch ( Exception e ) { log.error( "Caught exception", e ); throw new RulesRepositoryException( e ); } }
/** * Sets this object's rule node's state property to refer to the specified StateItem's node * * @param stateItem the StateItem encapsulating the node to refer to from this object's node's state * property * @throws RulesRepositoryException */ public void updateState(StateItem stateItem) throws RulesRepositoryException { checkIsUpdateable(); try { //now set the state property of the rule checkout(); this.node.setProperty( STATE_PROPERTY_NAME, stateItem.getNode() ); } catch ( Exception e ) { log.error( "Caught exception", e ); throw new RulesRepositoryException( e ); } }
/** * Sets this object's rule node's state property to refer to the specified state node * * @param stateName the name of the state to set the rule node to * @throws RulesRepositoryException */ public void updateState(String stateName) throws RulesRepositoryException { try { //now set the state property of the rule checkout(); StateItem stateItem = this.rulesRepository.getState( stateName ); this.updateState( stateItem ); } catch ( Exception e ) { log.error( "Caught exception", e ); throw new RulesRepositoryException( e ); } }
/** * optionally update last updated... */ public void updateStringArrayProperty(String[] value, String prop, boolean setLastUpdated) { try { checkIsUpdateable(); if (value == null) { return; } this.checkout(); node.setProperty(prop, value); if (setLastUpdated) { Calendar lastModified = Calendar.getInstance(); this.node.setProperty(LAST_MODIFIED_PROPERTY_NAME, lastModified); this.node.setProperty(LAST_CONTRIBUTOR_PROPERTY_NAME, node.getSession().getUserID()); } } catch (RulesRepositoryException e) { throw new RulesRepositoryException(e); } catch (UnsupportedRepositoryOperationException e) { throw new RulesRepositoryException(e); } catch (LockException e) { throw new RulesRepositoryException(e); } catch (RepositoryException e) { throw new RulesRepositoryException(e); } }
/** * optionally update last updated... */ public void updateStringArrayProperty(String[] value, String prop, boolean setLastUpdated) { try { checkIsUpdateable(); if (value == null) { return; } this.checkout(); node.setProperty(prop, value); if (setLastUpdated) { Calendar lastModified = Calendar.getInstance(); this.node.setProperty(LAST_MODIFIED_PROPERTY_NAME, lastModified); this.node.setProperty(LAST_CONTRIBUTOR_PROPERTY_NAME, node.getSession().getUserID()); } } catch (RulesRepositoryException e) { throw new RulesRepositoryException(e); } catch (UnsupportedRepositoryOperationException e) { throw new RulesRepositoryException(e); } catch (LockException e) { throw new RulesRepositoryException(e); } catch (RepositoryException e) { throw new RulesRepositoryException(e); } }