Esempio n. 1
0
  @Test
  public void testEquals() {
    final ContentId contentId = ContentId.from("a");

    final ContentPath parentPath = ContentPath.ROOT;

    MoveContentParams params = new MoveContentParams(contentId, parentPath);
    params.creator(PrincipalKey.ofAnonymous());

    assertEquals(contentId, params.getContentId());
    assertEquals(parentPath, params.getParentContentPath());
    assertEquals(PrincipalKey.ofAnonymous(), params.getCreator());

    MoveContentParams params2 =
        new MoveContentParams(params.getContentId(), params.getParentContentPath());

    assertEquals(params, params2);
    assertEquals(params.hashCode(), params2.hashCode());
  }
Esempio n. 2
0
 private static Filter createNoPrincipalsFilter() {
   return ValueFilter.create()
       .fieldName(NodeIndexPath.PERMISSIONS_READ.toString())
       .addValue(ValueFactory.newString(PrincipalKey.ofAnonymous().toString()))
       .build();
 }