Exemplo n.º 1
0
 private void setupObjectInfo(ObjectInfoImpl objectInfo, String typeId) {
   objectInfo.setBaseType(BaseTypeId.CMIS_FOLDER);
   objectInfo.setTypeId(typeId);
   objectInfo.setContentType(null);
   objectInfo.setFileName(null);
   objectInfo.setHasAcl(false);
   objectInfo.setHasContent(false);
   objectInfo.setVersionSeriesId(null);
   objectInfo.setIsCurrentVersion(true);
   objectInfo.setRelationshipSourceIds(null);
   objectInfo.setRelationshipTargetIds(null);
   objectInfo.setRenditionInfos(null);
   objectInfo.setSupportsDescendants(true);
   objectInfo.setSupportsFolderTree(true);
   objectInfo.setSupportsPolicies(false);
   objectInfo.setSupportsRelationships(false);
   objectInfo.setWorkingCopyId(null);
   objectInfo.setWorkingCopyOriginalId(null);
 }
Exemplo n.º 2
0
  @Override
  protected void compileProperties(
      PropertiesImpl properties, Set<String> filter, ObjectInfoImpl objectInfo)
      throws RepositoryException {

    super.compileProperties(properties, filter, objectInfo);

    objectInfo.setHasContent(false);
    objectInfo.setSupportsDescendants(true);
    objectInfo.setSupportsFolderTree(true);

    String typeId = getTypeIdInternal();

    addPropertyString(properties, typeId, filter, PropertyIds.PATH, pathManager.getPath(getNode()));

    // folder properties
    if (pathManager.isRoot(getNode())) {
      objectInfo.setHasParent(false);
    } else {
      objectInfo.setHasParent(true);
      addPropertyId(properties, typeId, filter, PropertyIds.PARENT_ID, getParent().getObjectId());
    }
  }