Package com.google.enterprise.connector.filenet4.mock

Examples of com.google.enterprise.connector.filenet4.mock.AccessPermissionListMock


   * Test method for
   * 'com.google.enterprise.connector.file.FileDocument.findProperty(String)'
   */
  public void testFindProperty() throws RepositoryException {
    FileDocument fd =
        new FileDocument(new FnId(TestConnection.docId1), ios, connec);

    Property prop = fd.findProperty("Id");
    assertEquals(TestConnection.docId1, prop.nextValue().toString());

    // TODO(tdnguyen) Revisit these test cases after fixing Permissions
View Full Code Here


   * Test method for
   * 'com.google.enterprise.connector.file.FileDocument.getPropertyNames()'
   */
  public void testGetPropertyNames() throws RepositoryException {
    FileDocument fd =
        new FileDocument(new FnId(TestConnection.docId2), ios, connec);
    Iterator<String> properties = fd.getPropertyNames().iterator();

    int counter = 0;
    while (properties.hasNext()) {
      properties.next();
View Full Code Here

   * document ACL but is the creator and owner and the #CREATOR-OWNER ACE must
   * be present in the ACL with AccessLevel.VIEW_AS_INT access or above.
   */
  public void testCreatorOwnerPermissions() throws RepositoryException {
    IDocument doc = (IDocument) ios.fetchObject(ClassNames.DOCUMENT,
        new FnId(TestConnection.docId4), null);
    List<Value> ownerValue = new ArrayList<Value>();
    doc.getPropertyStringValue("Owner", ownerValue);
    assertEquals(adminUser.get_Name(), ownerValue.get(0).toString());
    Permissions perms = new Permissions(doc.get_Permissions());
    assertTrue(perms.authorize(adminUser));
View Full Code Here

    Date expectedDate = new Date();
    String expectedDateString =
        FileUtil.getQueryTimeString(dateFormatter.format(expectedDate));

    Checkpoint cp = new Checkpoint();
    cp.setTimeAndUuid(dateField, expectedDate, uuidField, new FnId(expectedId));

    connec.setUseIDForChangeDetection(String.valueOf(useIdForChangeDetection));
    FileDocumentTraverser traverser =
        new FileDocumentTraverser(null, null, connec);
View Full Code Here

    }
    return objectMap;
  }

  private IObjectSet newEmptyObjectSet() {
    return new FnObjectList(new ArrayList<IBaseObject>());
  }
View Full Code Here

    for (IBaseObject obj : objects.values()) {
      if (!obj.isDeletionEvent() && !(obj instanceof FileDeletionObject)) {
        objectList.add(obj);
      }
    }
    return new FnObjectList(objectList);
  }
View Full Code Here

    for (IBaseObject obj : objects.values()) {
      if (obj.isDeletionEvent()) {
        objectList.add(obj);
      }
    }
    return new FnObjectList(objectList);
  }
View Full Code Here

    for (IBaseObject obj : objects.values()) {
      if (obj instanceof FileDeletionObject) {
        objectList.add(obj);
      }
    }
    return new FnObjectList(objectList);
  }
View Full Code Here

  }

  private IObjectSet getObjectSet(MockObjectStore mockOs) {
    List<IBaseObject> objectList = new ImmutableList.Builder<IBaseObject>()
        .addAll(mockOs.getObjects().values().iterator()).build();
    return new FnObjectList(objectList);
  }
View Full Code Here

  public void testMarkingPermissions() throws RepositoryException {
    IVersionSeries versionSeries =
        (IVersionSeries) ios.getObject(ClassNames.VERSION_SERIES,
            TestConnection.docVsId1);
    IDocument doc = versionSeries.get_ReleasedVersion();
    IActiveMarkingList activeMarkingList = doc.get_ActiveMarkings();
    assertNotNull("Active marking is null", activeMarkingList);
    assertTrue(user.get_Name() + " is not authorized by document's marking",
        new MarkingPermissions(activeMarkingList).authorize(user));
  }
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.filenet4.mock.AccessPermissionListMock

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.