Package org.zanata.rest.dto

Examples of org.zanata.rest.dto.VersionInfo


     * @param username username
     * @param apiKey user api key
     */
    public ZanataRestCaller(String username, String apiKey) {
        try {
            VersionInfo versionInfo = VersionUtility.getAPIVersionInfo();
            String baseUrl =
                    PropertiesHolder.getProperty(Constants.zanataInstance
                            .value());
            zanataProxyFactory =
                    new ZanataProxyFactory(new URI(baseUrl), username, apiKey,
View Full Code Here


                ServletLifecycle.getCurrentServletContext();
        String appServerHome = servletContext.getRealPath("/");

        File manifestFile = new File(appServerHome, "META-INF/MANIFEST.MF");

        VersionInfo ver;
        Attributes atts = null;
        if (manifestFile.canRead()) {
            Manifest mf = new Manifest();
            final FileInputStream fis = new FileInputStream(manifestFile);
            try {
                mf.read(fis);
            } finally {
                fis.close();
            }
            atts = mf.getMainAttributes();
        }
        ver = VersionUtility.getVersionInfo(atts, ZanataInit.class);

        this.applicationConfiguration.setVersion(ver.getVersionNo());
        this.applicationConfiguration.setBuildTimestamp(ver.getBuildTimeStamp());
        this.applicationConfiguration.setScmDescribe(ver.getScmDescribe());

        logBanner(ver);

        if (this.applicationConfiguration.isDebug()) {
            log.info("debug: enabled");
View Full Code Here

        IVersionResource resource;
        log.debug("setup test version service");
        resource =
                getClientRequestFactory().createProxy(IVersionResource.class);

        VersionInfo entity = resource.get().getEntity();
        assertThat(entity.getVersionNo(), is(vVar));
        assertThat(entity.getBuildTimeStamp(), is(vBuild));
    }
View Full Code Here

        testRestUtilUnmarshall(res, ResourceMeta.class);
    }

    @Test
    public void testVersion() throws UnsupportedEncodingException {
        VersionInfo ver = new VersionInfo(null, null);
        testRestUtilUnmarshall(ver, VersionInfo.class);
    }
View Full Code Here

     */
    public final ZanataProxyFactory createClientProxyFactory(String username,
            String apiKey) {
        try {
            return new ZanataProxyFactory(new URI(getRestEndpointUrl()),
                    username, apiKey, new VersionInfo("Test", "Test"),
                    false, false) {
                @Override
                protected String getUrlPrefix() {
                    return ""; // No prefix for tests
                }
View Full Code Here

TOP

Related Classes of org.zanata.rest.dto.VersionInfo

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