/** * 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 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 ); } }
public void renameState(String oldName, String newName) { try { StateItem state = loadState(oldName); Node node = state.getNode(); String sourcePath = node.getPath(); String destPath = node.getParent().getPath() + "/" + newName; this.session.move(sourcePath, destPath); save(); } catch (RepositoryException e) { log.error(e.getMessage(), e); throw new RulesRepositoryException(e); } }
public void renameState(String oldName, String newName) { try { StateItem state = loadState(oldName); Node node = state.getNode(); String sourcePath = node.getPath(); String destPath = node.getParent().getPath() + "/" + newName; this.session.move(sourcePath, destPath); save(); } catch (RepositoryException e) { log.error(e.getMessage(), e); throw new RulesRepositoryException(e); } }
/** * Finds the AssetItem's linked to the requested state. Similar to finding * by category. * * @param filter an AssetItem filter */ public AssetItemPageResult findAssetsByState(String stateName, boolean seekArchivedAsset, int skip, int numRowsToReturn, RepositoryFilter filter) throws RulesRepositoryException { StateItem item = this.getState(stateName); try { return loadLinkedAssets(seekArchivedAsset, skip, numRowsToReturn, item.getNode(), filter); } catch (RepositoryException e) { throw new RulesRepositoryException(e); } }
/** * Finds the AssetItem's linked to the requested state. Similar to finding * by category. * * @param filter an AssetItem filter */ public AssetItemPageResult findAssetsByState(String stateName, boolean seekArchivedAsset, int skip, int numRowsToReturn, RepositoryFilter filter) throws RulesRepositoryException { StateItem item = this.getState(stateName); try { return loadLinkedAssets(seekArchivedAsset, skip, numRowsToReturn, item.getNode(), filter); } catch (RepositoryException e) { throw new RulesRepositoryException(e); } }