private Icon[] determineStateIcons(final Node node) throws RepositoryException { switch (TypeState.getState(node)) { case NEW: return new Icon[]{Icon.MINUS_CIRCLE, Icon.EMPTY}; case LIVE: return new Icon[]{Icon.CHECK_CIRCLE, Icon.EMPTY}; case CHANGED: return new Icon[]{Icon.CHECK_CIRCLE, Icon.EXCLAMATION_TRIANGLE}; default: return EMPTY_STATE_ICONS; } }
static TypeState getState(Node node) { try { if (node.isNodeType(HippoNodeType.NT_TEMPLATETYPE)) { return determineState(node); } } catch (RepositoryException e) { log.info("Unable to determine document type state of node '{}'", JcrUtils.getNodePathQuietly(node), e); } return UNKNOWN; }