Examples of VersionPath


Examples of org.wso2.carbon.registry.resource.beans.VersionPath

            String[] versions = userRegistry.getVersions(path);

            List <VersionPath> versionPaths = new ArrayList <VersionPath> ();
            for (String version : versions) {
                VersionPath versionPath = new VersionPath();
                versionPath.setCompleteVersionPath(version);
                versionPath.setActiveResourcePath(path);

                ResourcePath resourcePath = new ResourcePath(version);
                if (!resourcePath.isCurrentVersion()) {
                    long versionNumber = Long.parseLong(resourcePath.
                            getParameterValue(RegistryConstants.VERSION_PARAMETER_NAME));
                    versionPath.setVersionNumber(versionNumber);
                }

                Resource versionResource = userRegistry.get(version);
                if (versionResource != null) {
                    versionPath.setUpdater(versionResource.getLastUpdaterUserName());
                    Calendar versionLastModified = Calendar.getInstance();
                    versionLastModified.setTime(versionResource.getLastModified());
                    versionPath.setUpdatedOn(versionLastModified);
                    versionResource.discard();
                }

                versionPaths.add(versionPath);
            }
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.