/** * Copies a holder value for a holder to a WS holder. */ public static <T> void setHolderValue(Holder<T> source, javax.xml.ws.Holder<T> target) { if ((source == null) || (target == null)) { return; } target.value = source.getValue(); }
/** * Copies a holder value for a WS holder to a holder. */ public static <T> void setHolderValue(javax.xml.ws.Holder<T> source, Holder<T> target) { if ((source == null) || (target == null)) { return; } target.setValue(source.value); }
@Override public boolean exists(String objectId) { checkObjectId(objectId); try { binding.getObjectService().getObject(getRepositoryId(), objectId, "cmis:objectId", Boolean.FALSE, IncludeRelationships.NONE, "cmis:none", Boolean.FALSE, Boolean.FALSE, null); return true; } catch (CmisObjectNotFoundException onf) { removeObjectFromCache(objectId); return false; } }
@Override public ObjectType getTypeDefinition(String typeId) { TypeDefinition typeDefinition = getBinding().getRepositoryService().getTypeDefinition(getRepositoryId(), typeId, null); return convertAndCacheTypeDefinition(typeDefinition, true); }
private static String getRootFolderId(CmisBinding binding, String repositoryId, String rootFolderId) { RepositoryService repSvc = binding.getRepositoryService(); RepositoryInfo rep = repSvc.getRepositoryInfo(repositoryId, null); if (null == rootFolderId || rootFolderId.length() == 0) { rootFolderId = rep.getRootFolderId(); } return rootFolderId; }
private void getContentChanges(String token) { LOG.debug("getContentChanges"); Holder<String> changeLogToken = new Holder<String>("token-000010"); discSvc.getContentChanges(repositoryId, changeLogToken, false, "*", false, false, null, null); renameFiles("getContentChanges"); LOG.debug("getContentChanges() done."); }
@Override public void delete(ObjectId objectId, boolean allVersions) { checkObjectId(objectId); getBinding().getObjectService().deleteObject(getRepositoryId(), objectId.getId(), allVersions, null); removeObjectFromCache(objectId); }
@Override public void deleteType(String typeId) { checkCmisVersion(); getBinding().getRepositoryService().deleteType(getRepositoryId(), typeId, null); removeFromObjectTypeCache(typeId); }
@Override public ObjectType createType(TypeDefinition type) { checkCmisVersion(); TypeDefinition newType = getBinding().getRepositoryService().createType(getRepositoryId(), type, null); return convertTypeDefinition(newType); }
@Override public ObjectType updateType(TypeDefinition type) { checkCmisVersion(); TypeDefinition updatedType = getBinding().getRepositoryService().updateType(getRepositoryId(), type, null); removeFromObjectTypeCache(updatedType.getId()); return convertTypeDefinition(updatedType); }
public Acl getAcl(boolean onlyBasicPermissions) { String objectId = getObjectId(); return getBinding().getAclService().getAcl(getRepositoryId(), objectId, onlyBasicPermissions, null); }
@Override public void cancelCheckOut() { String objectId = getObjectId(); getBinding().getVersioningService().cancelCheckOut(getRepositoryId(), objectId, null); // remove PWC from cache, it doesn't exist anymore getSession().removeObjectFromCache(this); }
@Override public boolean exists(String objectId) { checkObjectId(objectId); try { binding.getObjectService().getObject(getRepositoryId(), objectId, "cmis:objectId", Boolean.FALSE, IncludeRelationships.NONE, "cmis:none", Boolean.FALSE, Boolean.FALSE, null); return true; } catch (CmisObjectNotFoundException onf) { removeObjectFromCache(objectId); return false; } }
public static boolean hasObjectId(Holder<String> objectId) { return objectId != null && objectId.getValue() != null; }
@Override public ObjectType getTypeDefinition(String typeId) { TypeDefinition typeDefinition = getBinding().getRepositoryService().getTypeDefinition(getRepositoryId(), typeId, null); return convertAndCacheTypeDefinition(typeDefinition, true); }
@Override public void deleteType(String typeId) { checkCmisVersion(); getBinding().getRepositoryService().deleteType(getRepositoryId(), typeId, null); removeFromObjectTypeCache(typeId); }
@Override public ObjectType createType(TypeDefinition type) { checkCmisVersion(); TypeDefinition newType = getBinding().getRepositoryService().createType(getRepositoryId(), type, null); return convertTypeDefinition(newType); }
@Override public ObjectType updateType(TypeDefinition type) { checkCmisVersion(); TypeDefinition updatedType = getBinding().getRepositoryService().updateType(getRepositoryId(), type, null); removeFromObjectTypeCache(updatedType.getId()); return convertTypeDefinition(updatedType); }
public Acl getAcl(boolean onlyBasicPermissions) { String objectId = getObjectId(); return getBinding().getAclService().getAcl(getRepositoryId(), objectId, onlyBasicPermissions, null); }