@Override protected boolean isLatestVersion() throws RegistryException { String[] versions = getRepository().getVersions(getNode().getPath()); if(versions.length != 0) { return versions[0].equals(version); } else { return getNode().getPath().equals(version); } }
public RegistryDocument getGregNode(Resource node) throws RegistryException { String version = node.getPath(); String[] versions = repository.getVersions(node.getPath()); if(versions !=null && versions.length != 0){ version = versions[0]; } return new RegistryVersion(repository, node, version, typeManager, pathManager); }
String[] versionArray = getRepository().getVersions(getNode().getPath()); List<String> versions; if(versionArray.length == 0){
/** * @return Id of the version representing the base of this versions series * @throws RegistryException */ protected String getBaseNodeId() throws RegistryException { String[] versions = getRepository().getVersions(getNode().getPath()); return (versions.length != 0 ? versions[versions.length-1] : getNode().getPath()); }
String pathOfLatestVersion = repository.getVersions(pathToGet)[0];
if (registry.resourceExists(path) && !isNew) { resource = registry.get(path); String[] versions = registry.getVersions(path);
if (registry.resourceExists(path) && !isNew) { resource = registry.get(path); String[] versions = registry.getVersions(path);
if (registry.resourceExists(path) && !isNew) { resource = registry.get(path); String[] versions = registry.getVersions(path);
try { Resource node = getNode(); String[] versions = getRepository().getVersions(node.getPath()); if(versions == null){ throw new CmisObjectNotFoundException("No versions exist");
String[] versions = getRepository().getVersions(path); if(versions!=null){ for(String version: versions){
/** * See CMIS 1.0 section 2.2.7.3 checkedIn * * @throws CmisRuntimeException */ public RegistryVersion checkin(Properties properties, ContentStream contentStream, String checkinComment) { Resource node = getNode(); try { if (!isCheckedOut(node)) { throw new CmisStorageException("Not checked out: " + node.getId()); } if (properties != null && !properties.getPropertyList().isEmpty()) { updateProperties(properties); } if (contentStream != null) { setContentStream(contentStream, true); } // todo handle checkinComment Resource resource = checkin(); String pathOfLatestVersion = getRepository().getVersions(resource.getPath())[0]; return new RegistryVersion(getRepository(), resource, pathOfLatestVersion, typeManager, pathManager); } catch (RegistryException e) { String msg = "Failed checkin"; log.error(msg, e); throw new CmisRuntimeException(msg, e); } }
String pathOfLatestVersion = getRepository().getVersions(destPath)[0]; return getRepository().get(pathOfLatestVersion); } else{