@Override public Object doInJcr( final Session session ) { try { enableTenant( session, tenant, enable ); } catch ( RepositoryException e ) { e.printStackTrace(); } return null; } } );
@Override public Object doInJcr( final Session session ) { try { deleteTenants( session, tenants ); } catch ( RepositoryException e ) { e.printStackTrace(); } return null; } } );
@Override public Object doInJcr( final Session session ) { List<ITenant> childTenants = null; try { childTenants = getChildTenants( session, parentTenant, includeDisabledTenants ); } catch ( RepositoryException e ) { childTenants = new ArrayList<ITenant>(); e.printStackTrace(); } return childTenants; } } );
@Override public Object doInJcr( final Session session ) { try { deleteTenant( session, tenant ); } catch ( RepositoryException e ) { e.printStackTrace(); } return null; } } );
@Override public Object doInJcr( final Session session ) { try { enableTenants( session, tenants, enable ); } catch ( RepositoryException e ) { e.printStackTrace(); } return null; } } );
@Override public Object doInJcr( final Session session ) { List<ITenant> childTenants = null; try { childTenants = getChildTenants( session, parentTenant ); } catch ( RepositoryException e ) { childTenants = new ArrayList<ITenant>(); e.printStackTrace(); } return childTenants; } } );
@Override protected WorkflowManager load() { Session jcrSession = getJcrSessionInternal(); if (jcrSession != null) { try { HippoWorkspace workspace = (HippoWorkspace)jcrSession.getWorkspace(); return workspace.getWorkflowManager(); } catch (RepositoryException ex) { ex.printStackTrace(); } } return null; }
@Override protected void operateOnNode(InstallContext installContext, Node node) { try { // simply add the 'updated' property node.setProperty(UPDATED_PROPERTY, true); } catch (RepositoryException e) { e.printStackTrace(); } }
public void printNode(Session session, String absPath) { try { Node node = session.getNode(absPath); super.printNode(node); out.flush(); } catch (RepositoryException e) { e.printStackTrace(this.out); } }
public boolean canExport(PropertyExportContext context, boolean b) { try { final Node node = (Node) context.getExportRoot(); return matches(node.getPath()); } catch (RepositoryException e) { e.printStackTrace(); } return false; }
@Override protected void initialized() { try { authorId = (int) getNode().getProperty("sample:id").getLong(); } catch (RepositoryException e) { e.printStackTrace(); } } }
public void printSubgraph(Session session, String absPath) { try { Node node = session.getNode(absPath); super.printSubgraph(node); out.flush(); } catch (RepositoryException e) { e.printStackTrace(this.out); } } }
public boolean canExport(ExportContext context, boolean b) { try { final Node node = (Node) context.getExportRoot(); return matches(node.getPath()); } catch (RepositoryException e) { e.printStackTrace(); } return false; }
private boolean isCurrentSelected() { String selectedName = getDefaultModelObjectAsString(); String currentName; try { currentName = descriptives.get(current).getModel().getNode().getName(); if (selectedName != null && selectedName.equals(currentName)) { return true; } } catch (RepositoryException e) { e.printStackTrace(); } return false; }
private PropertyModel<String> getValueCurrentlySelectedJcrNode() { PropertyModel<String> value = new PropertyModel<>(this, WICKET_ELEMENT_ID); final Node node = modelReference.getModel().getObject(); try { value.setObject(node.getPath()); } catch (RepositoryException e) { e.printStackTrace(); } return value; }
@Override protected boolean nodeMatches(Node node) { try { // match nodes if they have a class property equal to a specific definition class return node.hasProperty("class") && MATCHING_DEFINITION_CLASS.equals(node.getProperty("class").getString()); } catch (RepositoryException e) { e.printStackTrace(); } return false; }
@Override public void execute(Repository repository, Credentials credentials, ExecutionContext context) throws Exception { Session session = repository.login(credentials); QueryManager qm; try { qm = session.getWorkspace().getQueryManager(); search(qm, context); } catch (RepositoryException e) { e.printStackTrace(); } }
@Override public void onEvent(EventIterator events) { try { while (events.hasNext()) { events.nextEvent().getPath(); } } catch (RepositoryException e) { e.printStackTrace(); throw new RuntimeException(e); } } }
@Override protected void initialized() { try { articleId = (int) getNode().getProperty("sample:id").getLong(); authorId = (int) getNode().getProperty("sample:authorId").getLong(); } catch (RepositoryException e) { e.printStackTrace(); } }
@Override public boolean evaluateTyped(Node node) { try { // sample predicate that keeps visiting only if node-type is mgnl:contentNode return node.getPrimaryNodeType().getName().equals(NodeTypes.ContentNode.NAME); } catch (RepositoryException e) { e.printStackTrace(); } return false; } });