Package org.jasig.portal.tools.versioning

Examples of org.jasig.portal.tools.versioning.Version


        ChannelStaticData staticData = getStaticData();
        String componentFunctionalName = (String) staticData
                .get("componentFunctionalName");

        Version componentVersion = versionsManager
                .getVersion(componentFunctionalName);

        String version = "unknown";

        if (componentVersion != null) {
            int majorVersion = componentVersion.getMajor();
            int minorVersion = componentVersion.getMinor();
            int microVersion = componentVersion.getMicro();

            StringBuffer versionStringBuffer = new StringBuffer();
            versionStringBuffer.append(majorVersion);
            versionStringBuffer.append(".");
            versionStringBuffer.append(minorVersion);
View Full Code Here


     * Internal method just to clarify that the writableRequest should be used from here on out.
     */
    protected void doGetInternal(IWritableHttpServletRequest writableRequest, HttpServletResponse res) {
        // Send the uPortal version in a header
        final VersionsManager versionManager = VersionsManager.getInstance();
        final Version version = versionManager.getVersion(IPermission.PORTAL_FRAMEWORK);
        res.setHeader("uPortal-version", "uPortal_rel-" + version.getMajor() + "-" + version.getMinor() + "-" + version.getMicro());

        //Check if the servlet failed to initialize
        if (fatalError) {
            try {
                final StringBuilder loginRedirect = new StringBuilder();
View Full Code Here

                    // the uP_productAndVersion stylesheet parameter is deprecated
                    // instead use the more generic "version-UP_VERSION" generated from the
                    // framework's functional name when all versions are pulled immediately
                    // above.
                    Version uPortalVersion = versionsManager.getVersion(IPermission.PORTAL_FRAMEWORK);
                    tst.setParameter("uP_productAndVersion", "uPortal " + uPortalVersion.dottedTriple());

                    final Locale[] locales = localeManager.getLocales();
                    if (locales != null && locales.length > 0 && locales[0] != null) {
                        tst.setParameter("USER_LANG", locales[0].toString().replace('_', '-'));
                    }
View Full Code Here

     * @see javax.portlet.PortalContext#getPortalInfo()
     */
    public String getPortalInfo() {
        //TODO Refactor this to use an injected utility to retrieve the version once VersionsManager is reviewed
        final VersionsManager versionManager = VersionsManager.getInstance();
        final Version version = versionManager.getVersion(IPermission.PORTAL_FRAMEWORK);
        return "uPortal/" + version.dottedTriple();
    }
View Full Code Here

        for (Version version : versions) {
            String paramName = "version-" + version.getFname();
            runtimeData.setParameter(paramName, version.dottedTriple());
        }

        Version uPortalVersion = versionsManager.getVersion(IPermission.PORTAL_FRAMEWORK);

        // The "uP_productAndVersion" parameter is deprecated
        // instead use the "version-UP_FRAMEWORK" and other version parameters
        // generated immediately previously.
        runtimeData.put("uP_productAndVersion", "uPortal " + uPortalVersion.dottedTriple());

    // OK, pass everything we got cached in params...
    if (params != null)
    {
      Iterator it = params.keySet().iterator();
View Full Code Here

     * @return true if the block should be processed.
     */
    private boolean evaluate(String testType, String fname, int major, int minor, int micro)
    {
        VersionsManager vMgr = VersionsManager.getInstance();
        Version currVer = vMgr.getVersion(fname);
        Version testVer = new Version(fname, "", major, minor, micro);
       
        if (currVer == null)
            return true;
           
        if (testType.equals(EQU))
View Full Code Here

     * @return true if the block should be processed.
     */
    private boolean evaluate(String testType, String fname, int major, int minor, int micro)
    {
        VersionsManager vMgr = VersionsManager.getInstance();
        Version currVer = vMgr.getVersion(fname);
        Version testVer = new Version(fname, "", major, minor, micro);
       
        if (currVer == null)
            return true;
           
        if (testType.equals(EQU))
View Full Code Here

TOP

Related Classes of org.jasig.portal.tools.versioning.Version

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.