@Test public void testRetrievalOfMixinTypesViaApi() throws RepositoryException { withMixinTypes("nt:file", "rep:AccessControllable"); assertThat(geMixinTypes(this.node)).isEqualTo("nt:file,rep:AccessControllable"); }
public static @CheckForNull String geMixinTypes(@Nonnull Node node) throws RepositoryException { Object[] mixinTypes = node.hasProperty(JCR_MIXIN_TYPES) ? node.getProperty(JCR_MIXIN_TYPES).getValues() : node.getMixinNodeTypes(); if (mixinTypes == null || mixinTypes.length == 0) { return null; } StringBuilder commaSeparatedMixinTypeNames = new StringBuilder(64); for (int i = 0; i < mixinTypes.length; ++i) { commaSeparatedMixinTypeNames.append(mixinTypes[i].toString()); if (i < mixinTypes.length - 1) { commaSeparatedMixinTypeNames.append(','); } } return commaSeparatedMixinTypeNames.toString(); }
NodeUtil { public static @CheckForNull String geMixinTypes(@Nonnull Node node) throws RepositoryException { Object[] mixinTypes = node.hasProperty(JCR_MIXIN_TYPES) ? node.getProperty(JCR_MIXIN_TYPES).getValues() : node.getMixinNodeTypes(); if (mixinTypes == null || mixinTypes.length == 0) { return null; } StringBuilder commaSeparatedMixinTypeNames = new StringBuilder(64); for (int i = 0; i < mixinTypes.length; ++i) { commaSeparatedMixinTypeNames.append(mixinTypes[i].toString()); if (i < mixinTypes.length - 1) { commaSeparatedMixinTypeNames.append(','); } } return commaSeparatedMixinTypeNames.toString(); } }
NodeUtil { public static @CheckForNull String geMixinTypes(@Nonnull Node node) throws RepositoryException { Object[] mixinTypes = node.hasProperty(JCR_MIXIN_TYPES) ? node.getProperty(JCR_MIXIN_TYPES).getValues() : node.getMixinNodeTypes(); if (mixinTypes == null || mixinTypes.length == 0) { return null; } StringBuilder commaSeparatedMixinTypeNames = new StringBuilder(64); for (int i = 0; i < mixinTypes.length; ++i) { commaSeparatedMixinTypeNames.append(mixinTypes[i].toString()); if (i < mixinTypes.length - 1) { commaSeparatedMixinTypeNames.append(','); } } return commaSeparatedMixinTypeNames.toString(); } private  NodeUtil(); }
NodeUtil { public static @CheckForNull String geMixinTypes(@Nonnull Node node) throws RepositoryException { Object[] mixinTypes = node.hasProperty(JCR_MIXIN_TYPES) ? node.getProperty(JCR_MIXIN_TYPES).getValues() : node.getMixinNodeTypes(); if (mixinTypes == null || mixinTypes.length == 0) { return null; } StringBuilder commaSeparatedMixinTypeNames = new StringBuilder(64); for (int i = 0; i < mixinTypes.length; ++i) { commaSeparatedMixinTypeNames.append(mixinTypes[i].toString()); if (i < mixinTypes.length - 1) { commaSeparatedMixinTypeNames.append(','); } } return commaSeparatedMixinTypeNames.toString(); } private  NodeUtil(); static @Nonnull String getPrimaryType(@Nonnull Node node); static @CheckForNull String geMixinTypes(@Nonnull Node node); }
NodeUtil { public static @CheckForNull String geMixinTypes(@Nonnull Node node) throws RepositoryException { Object[] mixinTypes = node.hasProperty(JCR_MIXIN_TYPES) ? node.getProperty(JCR_MIXIN_TYPES).getValues() : node.getMixinNodeTypes(); if (mixinTypes == null || mixinTypes.length == 0) { return null; } StringBuilder commaSeparatedMixinTypeNames = new StringBuilder(64); for (int i = 0; i < mixinTypes.length; ++i) { commaSeparatedMixinTypeNames.append(mixinTypes[i].toString()); if (i < mixinTypes.length - 1) { commaSeparatedMixinTypeNames.append(','); } } return commaSeparatedMixinTypeNames.toString(); } private  NodeUtil(); static @Nonnull String getPrimaryType(@Nonnull Node node); static @CheckForNull String geMixinTypes(@Nonnull Node node);  }