001    /*
002     * This file is part of the Echo Point Project.  This project is a
003     * collection of Components that have extended the Echo Web Application
004     * Framework Version 3.
005     *
006     * Version: MPL 1.1
007     *
008     * The contents of this file are subject to the Mozilla Public License Version
009     * 1.1 (the "License"); you may not use this file except in compliance with
010     * the License. You may obtain a copy of the License at
011     * http://www.mozilla.org/MPL/
012     *
013     * Software distributed under the License is distributed on an "AS IS" basis,
014     * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
015     * for the specific language governing rights and limitations under the
016     * License.
017     */
018    
019    package echopoint.internal;
020    
021    import nextapp.echo.webcontainer.service.JavaScriptService;
022    import nextapp.echo.webcontainer.Service;
023    import static nextapp.echo.webcontainer.WebContainerServlet.getServiceRegistry;
024    
025    /**
026     * Register the Echopoint core library.
027     *
028     * @author Rakesh 2008-06-23
029     * @version $Id: CommonService.java 220 2009-06-05 14:37:13Z sptrakesh $
030     */
031    public class CommonService
032    {
033      /** The service for the core echopoint namespace and components. */
034      public static final Service ECHOPOINT_SERVICE =
035          JavaScriptService.forResource( "echopoint.Boot", "resource/js/Echopoint.js" );
036    
037      public static final Service JQUERY_SERVICE = JavaScriptService.forResource( "jq",
038          "resource/js/jquery/jquery-1.3.2.js" );
039    
040      /** Add the {@link #ECHOPOINT_SERVICE} to the service registry. */
041      static
042      {
043        getServiceRegistry().add( ECHOPOINT_SERVICE );
044        getServiceRegistry().add( JQUERY_SERVICE );
045      }
046    }