Examples of IVersionSeries


Examples of com.google.enterprise.connector.filenet4.filewrap.IVersionSeries

  @Override
  public AuthorizationResponse authorizeDocid(String docId, IUser user,
      boolean checkMarkings) throws RepositoryException {
    AuthorizationResponse authorizationResponse = null;
    IVersionSeries versionSeries = null;
    try {
      logger.config("Getting version series for document DocID: "
          + docId);
      versionSeries = (IVersionSeries) objectStore.getObject(ClassNames.VERSION_SERIES, URLDecoder.decode(docId, "UTF-8"));
    } catch (UnsupportedEncodingException e) {
      logger.log(Level.WARNING, "Unable to Decode: Encoding is not supported for the document with DocID: "
          + docId);
      versionSeries = null;
    } catch (RepositoryException e) {
      logger.log(Level.WARNING, "Error : document Version Series Id "
          + docId + " may no longer exist. Message: "
          + e.getLocalizedMessage());
      versionSeries = null;
    }

    if (versionSeries != null) {
      logger.config("Authorizing DocID: " + docId + " for user: "
          + user.get_Name());
      // Check whether the search user is authorized to view document
      // contents or
      // not.
      IDocument releasedVersion = versionSeries.get_ReleasedVersion();
      Permissions permissions = new Permissions(
          releasedVersion.get_Permissions(), releasedVersion.get_Owner());
      if (permissions.authorize(user)) {
        logger.log(Level.INFO, "As per the ACLS User "
            + user.get_Name()
View Full Code Here

Examples of com.google.enterprise.connector.filenet4.filewrap.IVersionSeries

      assertTrue(value.getClass().getName().toUpperCase().contains(typeSet));
    }
  }

  public void testGetVersionSeries() throws RepositoryException {
    IVersionSeries vs = fd.getVersionSeries();
    assertEquals("{" + TestConnection.docVsId1 + "}", vs.get_Id().toString());
  }
View Full Code Here

Examples of com.google.enterprise.connector.filenet4.filewrap.IVersionSeries

    boolean authorized = perms.authorize(MockUtil.createAdministratorUser());
    assertTrue("User is not authorized", authorized);
  }

  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
Copyright © 2018 www.massapi.com. 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.