Changeset 6963 for ComponentRegistry


Ignore:
Timestamp:
02/09/16 14:53:05 (8 years ago)
Author:
Twan Goosen
Message:

merged 2.0 branch into trunk. Trunk now 2.1-SNAPSHOT

Location:
ComponentRegistry/trunk
Files:
8 deleted
19 edited
3 copied

Legend:

Unmodified
Added
Removed
  • ComponentRegistry/trunk

  • ComponentRegistry/trunk/CHANGES

    r6451 r6963  
    11Bug Fixes and Features
     2
     3Release ComponentRegistry-2.0 (February 2016)
     4- New React.JS based front end
    25
    36Release ComponentRegistry-1.14.6 (12 August 2015)
  • ComponentRegistry/trunk/ComponentRegistry

  • ComponentRegistry/trunk/ComponentRegistry/pom.xml

    r6454 r6963  
    44    <modelVersion>4.0.0</modelVersion>
    55    <parent>
    6         <groupId>clarin.cmdi</groupId>
     6        <groupId>eu.clarin.cmdi</groupId>
    77        <artifactId>componentRegistry.parent</artifactId>
    8         <version>1.0</version>
     8        <version>2.1-SNAPSHOT</version>
    99    </parent>
    10     <groupId>clarin.cmdi</groupId>
    11     <artifactId>ComponentRegistry</artifactId>
     10    <groupId>eu.clarin.cmdi</groupId>
     11    <artifactId>component-registry-rest</artifactId>
    1212    <packaging>${packaging}</packaging>
    13     <version>${ComponentRegistry.version}</version>
     13    <version>2.1-SNAPSHOT</version>
    1414    <name>ComponentRegistry</name>
    1515    <description>
     
    2323        <!-- Properties to configure ComponentRegistry override on commandline
    2424        with -D or change here -->
    25         <serviceRootUrl>http://localhost:8080/${project.artifactId}</serviceRootUrl>
     25        <serviceUrlBase>http://localhost:8080</serviceUrlBase>
     26        <serviceUrlPath>/${project.artifactId}</serviceUrlPath>
    2627        <!-- Will be inserted in context.xml -->
    2728        <webXmlPath>src/main/webapp/WEB-INF/web-test.xml</webXmlPath>
    2829        <!-- non-shib web.xml -->
    2930        <isocatSearchUrl>http://www.isocat.org/rest/user/guest/search</isocatSearchUrl>
    30         <ComponentRegistrySwfName>${project.artifactId}-${ComponentBrowserGui.version}</ComponentRegistrySwfName>
    31         <flexDebug>0</flexDebug>
     31        <frontEndVersion>1.0.0-beta3</frontEndVersion>
    3232        <spring-data-jpa.version>1.3.4.RELEASE</spring-data-jpa.version>
    3333        <spring.version>3.2.10.RELEASE</spring.version>
     
    4141    </properties>
    4242
    43 
    4443    <ciManagement>
    4544        <system>hudson</system>
     
    346345                <logging.level>debug</logging.level>
    347346                <logging.appender>CONSOLE</logging.appender>
    348                 <serviceRootUrl>http://localhost:8080/ComponentRegistry</serviceRootUrl>
     347                <serviceUrlBase>http://localhost:8080</serviceUrlBase>
     348                <serviceUrlPath>/ComponentRegistry</serviceUrlPath>
    349349                <!-- Will be inserted in context.xml -->
    350350                <shibLI>http://lux16.mpi.nl/Shibboleth.sso/Login</shibLI>
     
    359359            <id>lux16</id>
    360360            <properties>
    361                 <serviceRootUrl>http://lux16.mpi.nl/ds/ComponentRegistry</serviceRootUrl>
     361                <serviceUrlBase>http://lux16.mpi.nl</serviceUrlBase>
     362                <serviceUrlPath>/ds/ComponentRegistry</serviceUrlPath>
    362363                <!-- Will be inserted in context.xml -->
    363                 <shibLI>http://lux16.mpi.nl/Shibboleth.sso/Login</shibLI>
     364                <shibLI>https://lux16.mpi.nl/Shibboleth.sso/Login</shibLI>
    364365                <!-- Shibboleth login URI for SHHAA -->
    365                 <shibLO>http://lux16.mpi.nl/Shibboleth.sso/Logout</shibLO>
     366                <shibLO>https://lux16.mpi.nl/Shibboleth.sso/Logout</shibLO>
    366367                <!-- Shibboleth logout URI for SHHAA -->
    367368                <webXmlPath>src/main/webapp/WEB-INF/web-shib.xml</webXmlPath>
     
    373374            <properties>
    374375                <logging.level>warn</logging.level>
    375                 <serviceRootUrl>http://catalog.clarin.eu/ds/ComponentRegistry</serviceRootUrl>
     376                <serviceRootUrl></serviceRootUrl>
     377                <serviceUrlBase>http://catalog.clarin.eu</serviceUrlBase>
     378                <serviceUrlPath>/ds/ComponentRegistry</serviceUrlPath>
    376379                <!-- Will be inserted in context.xml -->
    377380                <shibLI>https://catalog.clarin.eu/Shibboleth.sso/Login</shibLI>
     
    490493                <executions>
    491494                    <execution>
    492                         <id>copy</id>
     495                        <id>unpack-ui</id>
    493496                        <phase>process-resources</phase>
    494497                        <goals>
    495                             <goal>copy</goal>
     498                            <goal>unpack</goal>
    496499                        </goals>
    497500                        <configuration>
    498501                            <artifactItems>
    499502                                <artifactItem>
    500                                     <groupId>clarin.cmdi</groupId>
    501                                     <artifactId>ComponentBrowserGui</artifactId>
    502                                     <version>${ComponentBrowserGui.version}</version>
    503                                     <type>swf</type>
     503                                    <groupId>${project.groupId}</groupId>
     504                                    <artifactId>component-registry-react-ui</artifactId>
     505                                    <version>${frontEndVersion}</version>
    504506                                    <overWrite>true</overWrite>
    505507                                    <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}</outputDirectory>
    506                                     <destFileName>${ComponentRegistrySwfName}.swf</destFileName>
     508                                    <!-- exclude bundled external config, we provide our own -->
     509                                    <excludes>compRegConfig.jsp</excludes>
    507510                                </artifactItem>
    508511                            </artifactItems>
     
    549552    </build>
    550553
    551     <!--
    552                 <reporting>
    553                                 <plugins>
    554                                                 <plugin>
    555                                                                 <groupId>org.codehaus.mojo</groupId>
    556                                                                 <artifactId>findbugs-maven-plugin</artifactId>
    557                                                         <version>2.5.4-SNAPSHOT</version>
    558                                                                 <configuration>
    559                                                                         <excludeFilterFile>${basedir}/src/main/resources/findbugs-exclude.xml</excludeFilterFile>
    560                                                                         <threshold>Normal</threshold>
    561                                                                         <effort>Min</effort>
    562                                                                 </configuration>
    563                                                 </plugin>
    564                                 </plugins>
    565                 </reporting>
    566     -->
    567554    <repositories>
    568                 <repository>
    569                         <id>CLARIN</id>
    570                         <name>Clarin Repository</name>
    571                         <url>https://nexus.clarin.eu/content/repositories/Clarin</url>
    572                 </repository>
     555        <repository>
     556            <id>CLARIN</id>
     557            <name>Clarin Repository</name>
     558            <url>https://nexus.clarin.eu/content/repositories/Clarin</url>
     559        </repository>
    573560    </repositories>
    574561</project>
  • ComponentRegistry/trunk/ComponentRegistry/src/main/java

  • ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/rest/ComponentRegistryRestService.java

    r5938 r6963  
    16151615
    16161616    /**
    1617      *
    1618      * @return The application's base URI as configured in the
    1619      * {@link #APPLICATION_BASE_URL_PARAM} context parameter. If correctly
    1620      * configured, it should look something like
    1621      * "http://catalog.clarin.eu/ds/ComponentRegistry". <em>Be aware that this
    1622      * can also be null if configured incorrectly!</em>
    1623      *
    1624      * @see #APPLICATION_BASE_URL_PARAM
     1617     *
     1618     * @see ComponentRegistryRestService#getApplicationBaseURI(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest)
    16251619     */
    16261620    private String getApplicationBaseURI() {
    1627         return servletContext.getInitParameter(APPLICATION_BASE_URL_PARAM);
     1621        return getApplicationBaseURI(servletContext, request);
    16281622    }
    16291623
     
    19961990        }
    19971991    }
     1992
     1993    /**
     1994     *
     1995     * @return The application's base URI as defined by the following context
     1996     * parameters:
     1997     *
     1998     * {@link APPLICATION_URL_BASE_PARAM},
     1999     *     {@link APPLICATION_URL_PATH_PARAM},
     2000     *     {@link APPLICATION_URL_PROTOCOL_HEADER_PARAM}, and
     2001     * {@link APPLICATION_URL_HOST_HEADER_PARAM}
     2002     *
     2003     * If correctly configured, it should look something like
     2004     * "http://catalog.clarin.eu/ds/ComponentRegistry". <em>Be aware that this
     2005     * can also be null if configured incorrectly!</em>
     2006     */
     2007    public static String getApplicationBaseURI(ServletContext servletContext, HttpServletRequest request) {
     2008        final String path = servletContext.getInitParameter(APPLICATION_URL_PATH_PARAM);
     2009        if (path != null) {
     2010            final String protocolHeader = servletContext.getInitParameter(APPLICATION_URL_PROTOCOL_HEADER_PARAM);
     2011            final String hostHeader = servletContext.getInitParameter(APPLICATION_URL_HOST_HEADER_PARAM);
     2012            if (protocolHeader != null && hostHeader != null) {
     2013
     2014                return String.format("%s://%s%s",
     2015                        request.getHeader(protocolHeader),
     2016                        request.getHeader(hostHeader),
     2017                        path
     2018                );
     2019            } else {
     2020                final String base = servletContext.getInitParameter(APPLICATION_URL_BASE_PARAM);
     2021                return base + path;
     2022            }
     2023        }
     2024        LOG.error("Application URI could not be determined. Information available:\n"
     2025                + " {}: {}\n {}: {}\n {}: {}\n {}: {}",
     2026                APPLICATION_URL_PATH_PARAM, servletContext.getInitParameter(APPLICATION_URL_PATH_PARAM),
     2027                APPLICATION_URL_BASE_PARAM, servletContext.getInitParameter(APPLICATION_URL_BASE_PARAM),
     2028                APPLICATION_URL_PROTOCOL_HEADER_PARAM, servletContext.getInitParameter(APPLICATION_URL_PROTOCOL_HEADER_PARAM),
     2029                APPLICATION_URL_HOST_HEADER_PARAM, servletContext.getInitParameter(APPLICATION_URL_HOST_HEADER_PARAM)
     2030        );
     2031        throw new RuntimeException("Cannot determine application path");
     2032    }
     2033
    19982034}
  • ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/rest/IComponentRegistryRestService.java

    r5832 r6963  
    3838public interface IComponentRegistryRestService {
    3939
    40     public static final String APPLICATION_BASE_URL_PARAM = "eu.clarin.cmdi.componentregistry.serviceRootUrl";
     40    public static final String APPLICATION_URL_BASE_PARAM = "eu.clarin.cmdi.componentregistry.serviceUrlBase";
     41    public static final String APPLICATION_URL_PATH_PARAM = "eu.clarin.cmdi.componentregistry.serviceUrlPath";
     42    public static final String APPLICATION_URL_PROTOCOL_HEADER_PARAM = "eu.clarin.cmdi.componentregistry.serviceUrlProtocolHeader";
     43    public static final String APPLICATION_URL_HOST_HEADER_PARAM = "eu.clarin.cmdi.componentregistry.serviceUrlHostHeader";
    4144    public static final String DATA_FORM_FIELD = "data";
    4245    public static final String NAME_FORM_FIELD = "name";
  • ComponentRegistry/trunk/ComponentRegistry/src/main/webapp/META-INF/context.xml

    r5917 r6963  
    3737<Context antiJARLocking="true" path="/ComponentRegistry">
    3838  <!--
    39         Passed to the Flex UI via index.jsp so that it can locate the
    40         ComponentRegistry REST service. Just supply the application root:
    41         the '/rest/registry' part will be added by the application.
     39        Passed to the Flex via compRegConfig.jsp so that it can locate the
     40        ComponentRegistry REST service. Just supply the PUBLIC application root
     41        in the path; the '/rest/registry' part will be added by the application.
     42       
     43        "serviceUrlPath" is MANDATORY in all cases and should contain the path
     44        of the application relative to the server root, starting with a forward
     45        slash but no trailing slash, e.g. "/ComponentRegistry", or "" for root
     46        deployment.
     47       
     48        In addition, either "serviceUrlPath" OR the two parameters
     49        "serviceUrlProtocolHeader" and "serviceUrlHostHeader" need to be
     50        defined.
    4251    -->
    43   <Parameter name="eu.clarin.cmdi.componentregistry.serviceRootUrl" value="${serviceRootUrl}"/>
     52  <Parameter name="eu.clarin.cmdi.componentregistry.serviceUrlBase" value="${serviceUrlBase}"/>
     53  <Parameter name="eu.clarin.cmdi.componentregistry.serviceUrlPath" value="${serviceUrlPath}"/>
     54 <!--
     55  Uncomment two lines below iff you would like to use the protocol and host
     56  provided in the request headers.
     57  <Parameter name="eu.clarin.cmdi.componentregistry.serviceUrlProtocolHeader" value="X-FORWARDED-PROTO"/>
     58  <Parameter name="eu.clarin.cmdi.componentregistry.serviceUrlHostHeader" value="X-FORWARDED-HOST"/>
     59 -->
     60 
    4461  <!--
    4562        Location that gets redirected to from /documentation.jsp, which in turn is linked to
     
    5067        Space-separated list of users (getRemoteUser()) that should have access to the admin area of the ComponentRegistry
    5168    -->
    52   <Parameter name="eu.clarin.cmdi.componentregistry.adminUsers" value="twagoo@mpi.nl olhsha@mpi.nl daan.broeder@mpi.nl dietuyt@mpi.nl Menzo.Windhouwer@mpi.nl"/>
     69  <Parameter name="eu.clarin.cmdi.componentregistry.adminUsers" value="twagoo@mpi.nl twan.goosen_mpi.nl@clarin.eu dietuyt@mpi.nl dietuyt_mpi.nl@clarin.eu menwin@mpi.nl menwin_mpi.nl@clarin.eu"/>
    5370  <!--
    5471        Location of the CMDI general component schema that validates component specifications
  • ComponentRegistry/trunk/ComponentRegistry/src/main/webapp/WEB-INF/shhaa.xml

    r5871 r6963  
    3535       
    3636        <authorization>
    37             <location  target="/admin/*" />
     37            <location target="/admin/*" />
     38            <location target="/rest/authentication" methods="POST" />
    3839        </authorization>
    3940       
  • ComponentRegistry/trunk/ComponentRegistry/src/main/webapp/WEB-INF/web-shib.xml

    r5944 r6963  
    8787        <url-pattern>/admin/*</url-pattern>
    8888    </filter-mapping>
     89   
     90    <!-- Enable CORS -->
     91<!--    <filter>
     92        <filter-name>CorsFilter</filter-name>
     93        <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
     94        <init-param>
     95            <param-name>cors.allowed.methods</param-name>
     96            <param-value>GET, POST, PUT, DELETE, HEAD, OPTIONS</param-value>
     97        </init-param>
     98    </filter>
     99    <filter-mapping>
     100        <filter-name>CorsFilter</filter-name>
     101        <url-pattern>/*</url-pattern>
     102    </filter-mapping>-->
     103
    89104    <servlet>
    90105        <servlet-name>ComponentRegistry Web Application</servlet-name>
     
    127142        <load-on-startup>2</load-on-startup>
    128143    </servlet>
     144       
     145    <welcome-file-list>
     146        <welcome-file>index.html</welcome-file>
     147    </welcome-file-list>
    129148
    130149</web-app>
  • ComponentRegistry/trunk/ComponentRegistry/src/main/webapp/WEB-INF/web-test.xml

    r5944 r6963  
    6565        <url-pattern>/admin/*</url-pattern>
    6666    </filter-mapping>
     67   
     68    <!-- Enable CORS -->
     69<!--    <filter>
     70        <filter-name>CorsFilter</filter-name>
     71        <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
     72        <init-param>
     73            <param-name>cors.allowed.methods</param-name>
     74            <param-value>GET, POST, PUT, DELETE, HEAD, OPTIONS</param-value>
     75        </init-param>
     76    </filter>
     77    <filter-mapping>
     78        <filter-name>CorsFilter</filter-name>
     79        <url-pattern>/*</url-pattern>
     80    </filter-mapping>-->
     81   
    6782    <servlet>
    6883        <servlet-name>ComponentRegistry Web Application</servlet-name>
     
    142157       
    143158    <welcome-file-list>
    144         <welcome-file>index.jsp</welcome-file>
     159        <welcome-file>index.html</welcome-file>
    145160    </welcome-file-list>
    146161       
  • ComponentRegistry/trunk/ComponentRegistry/src/main/webapp/WEB-INF/web.xml

    r5917 r6963  
    6565        <url-pattern>/admin/*</url-pattern>
    6666    </filter-mapping>
     67   
     68    <!-- Enable CORS -->
     69<!--    <filter>
     70        <filter-name>CorsFilter</filter-name>
     71        <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
     72        <init-param>
     73            <param-name>cors.allowed.methods</param-name>
     74            <param-value>GET, POST, PUT, DELETE, HEAD, OPTIONS</param-value>
     75        </init-param>
     76    </filter>
     77    <filter-mapping>
     78        <filter-name>CorsFilter</filter-name>
     79        <url-pattern>/*</url-pattern>
     80    </filter-mapping>-->
     81   
    6782    <servlet>
    6883        <servlet-name>ComponentRegistry Web Application</servlet-name>
     
    120135        </auth-constraint>
    121136    </security-constraint>
    122     <security-constraint>
    123         <display-name>ComponentRegistry SWF GET</display-name>
    124         <web-resource-collection>
    125             <web-resource-name>ComponentRegistry access</web-resource-name>
    126             <description />
    127             <url-pattern>/*</url-pattern>
    128             <http-method>GET</http-method>
    129         </web-resource-collection>
    130         <auth-constraint>
    131             <role-name>tomcat</role-name>
    132         </auth-constraint>
    133     </security-constraint>
    134137    <login-config>
    135138        <auth-method>BASIC</auth-method>
     
    142145       
    143146    <welcome-file-list>
    144         <welcome-file>index.jsp</welcome-file>
     147        <welcome-file>index.html</welcome-file>
    145148    </welcome-file-list>
    146149       
  • ComponentRegistry/trunk/ComponentRegistry/src/main/webapp/index.jsp

    r6591 r6963  
    11<?xml version="1.0" encoding="UTF-8" ?>
    22<%@ page language="java" contentType="text/html; charset=UTF-8"
    3         pageEncoding="UTF-8"%>
     3         pageEncoding="UTF-8"%>
    44<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    55
    66<html
    7         xmlns="http://www.w3.org/1999/xhtml" lang="en">
    8 <head>
    9 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
     7    xmlns="http://www.w3.org/1999/xhtml" lang="en">
     8    <head>
     9        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
     10        <title>${title}</title>
     11    </head>
    1012
    11 <!--  BEGIN Browser History required section -->
    12 <link rel="stylesheet" type="text/css" href="history/history.css" />
    13 <!--  END Browser History required section -->
     13    <body>
     14        <form action="rest/authentication" method="GET">
     15            <input type="submit" value="Authentication status"/>
     16        </form>
     17        <form action="rest/authentication?redirect=${pageContext.request.requestURL}" method="POST">
     18            <input type="submit" value="Log in"/>
     19        </form>
    1420
    15 <title>${title}</title>
    16 <script src="AC_OETags.js" language="javascript"></script>
     21<!-- Piwik -->
     22<script type="text/javascript">
     23  var _paq = _paq || [];
     24  _paq.push(['trackPageView']);
     25  _paq.push(['enableLinkTracking']);
     26  (function() {
     27    var u="//stats.clarin.eu/";
     28    _paq.push(['setTrackerUrl', u+'piwik.php']);
     29    _paq.push(['setSiteId', 17]);
     30    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
     31    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
     32  })();
     33</script>
     34<noscript><p><img src="//stats.clarin.eu/piwik.php?idsite=17" style="border:0;" alt="" /></p></noscript>
     35<!-- End Piwik Code -->
    1736
    18 <!--  BEGIN Browser History required section -->
    19 <script src="history/history.js" language="javascript"></script>
    20 <!--  END Browser History required section -->
    21 
    22 <style>
    23 body {
    24         margin: 0px;
    25         overflow: hidden
    26 }
    27 </style>
    28 <script type="text/javascript" src="./js/extMouseWheel.js"></script>
    29 <script language="JavaScript" type="text/javascript">
    30 <!--
    31 // -----------------------------------------------------------------------------
    32 // Globals
    33 // Major version of Flash required
    34 var requiredMajorVersion = ${version_major};
    35 // Minor version of Flash required
    36 var requiredMinorVersion = ${version_minor};
    37 // Minor version of Flash required
    38 var requiredRevision = ${version_revision};
    39 // -----------------------------------------------------------------------------
    40 // -->
    41 </script>
    42 </head>
    43 
    44 <body scroll="no">
    45 <div id="flashContainerDiv"
    46         style="position: absolute; width: 100%; height: 100%"><script
    47         language="JavaScript" type="text/javascript">
    48 <!--
    49 // Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
    50 var hasProductInstall = DetectFlashVer(6, 0, 65);
    51 
    52 // Version check based upon the values defined in globals
    53 var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
    54 
    55 if ( hasProductInstall && !hasRequestedVersion ) {
    56         // DO NOT MODIFY THE FOLLOWING FOUR LINES
    57         // Location visited after installation is complete if installation is required
    58         var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
    59         var MMredirectURL = window.location;
    60     document.title = document.title.slice(0, 47) + " - Flash Player Installation";
    61     var MMdoctitle = document.title;
    62 
    63         AC_FL_RunContent(
    64                 "src", "playerProductInstall",
    65                 "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
    66                 "width", "${width}",
    67                 "height", "${height}",
    68                 "align", "middle",
    69                 "id", "${application}",
    70                 "quality", "high",
    71                 "bgcolor", "${bgcolor}",
    72                 "name", "${application}",
    73                 "allowScriptAccess","sameDomain",
    74                 "type", "application/x-shockwave-flash",
    75                 "pluginspage", "http://www.adobe.com/go/getflashplayer"
    76         );
    77 } else if (hasRequestedVersion) {
    78         // if we've detected an acceptable version
    79         // embed the Flash Content SWF when all tests are passed
    80         AC_FL_RunContent(
    81                         "src", "${ComponentRegistrySwfName}",
    82                         "width", "${width}",
    83                         "height", "${height}",
    84                         "align", "middle",
    85                         "id", "${application}",
    86                         "quality", "high",
    87                         "bgcolor", "${bgcolor}",
    88                         "name", "${application}",
    89                         "allowScriptAccess","sameDomain",
    90                         "type", "application/x-shockwave-flash",
    91                         "pluginspage", "http://www.adobe.com/go/getflashplayer",
    92                         "FlashVars", "serviceRootUrl=<%= application.getInitParameter("eu.clarin.cmdi.componentregistry.serviceRootUrl") %>&userName=${pageContext.request.remoteUser}&itemId=${param.itemId}&view=${param.view}&browserview=${param.browserview}&registrySpace=${param.registrySpace}&groupId=${param.groupId}&debug=${flexDebug}"
    93                            
    94         );
    95   } else {  // flash is too old or we can't detect the plugin
    96     var alternateContent = 'This content requires the Adobe Flash Player. '
    97         + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
    98     document.write(alternateContent);  // insert non-flash content
    99   }
    100 // -->
    101 </script>
    102 <noscript><object
    103         classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    104         id="${application}" width="${width}" height="${height}"
    105         codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
    106         <param name="movie" value="${ComponentRegistrySwfName}.swf" />
    107         <param name="quality" value="high" />
    108         <param name="bgcolor" value="${bgcolor}" />
    109         <param name="allowScriptAccess" value="sameDomain" />
    110         <embed src="${ComponentRegistrySwfName}.swf" quality="high" bgcolor="${bgcolor}"
    111                 width="${width}" height="${height}" name="${application}"
    112                 align="middle" play="true" loop="false" quality="high"
    113                 allowScriptAccess="sameDomain" type="application/x-shockwave-flash"
    114                 pluginspage="http://www.adobe.com/go/getflashplayer"
    115                 FlashVars="serviceRootUrl=<%= application.getInitParameter("eu.clarin.cmdi.componentregistry.serviceRootUrl") %>&userName=${pageContext.request.remoteUser}&item=${param.item}&view=${param.view}&browserview=${param.browserview}&space=${param.space}&debug=${flexDebug}">
    116         </embed>
    117 </object>
    118 </noscript>
    119 </div>
    12037       
    12138<!-- Piwik -->
  • ComponentRegistry/trunk/ComponentRegistry/src/test/java

  • ComponentRegistry/trunk/ComponentRegistry/src/test/java/clarin/cmdi/componentregistry/rest/ComponentRegistryRestServiceTestCase.java

    r5800 r6963  
    9696                .contextParam("contextConfigLocation",
    9797                        getApplicationContextFile())
     98                .contextParam("eu.clarin.cmdi.componentregistry.serviceUrlBase", "localhost") // deliberately inaccurate,
     99                .contextParam("eu.clarin.cmdi.componentregistry.serviceUrlPath", "test")      // for use of user/front end only
    98100                .servletClass(SpringServlet.class)
    99101                .initParam(WebComponent.RESOURCE_CONFIG_CLASS,
  • ComponentRegistry/trunk/INSTALL

    r5934 r6963  
    77Tomcat.
    88
    9 The package includes a Flex based client that runs client-side in the
    10 user's browser. It is wrapped by an index.jsp page that embeds it and passes
    11 some parameters; it is located in the root of the application directory.
     9The package includes a Javascript (REACT) based client that runs client-side in
     10the user's browser. It is wrapped by an index.html page that loads it and passes
     11some configuration; it is located in the root of the application directory.
    1212
    13 The web application uses the Spring framework and in the current version it
    14 is partly configured through Spring (see below).
     13The application is mainly configured through context parameters (see below).
    1514
    1615Setting up the database
     
    6766        * eu.clarin.cmdi.componentregistry.componentSpecSchemaLocation
    6867        * eu.clarin.cmdi.componentregistry.ccrRestUrl
     68
     69- Public base location for the application: needs to be configured, and will
     70  need additional attention if the application is running behind a proxy.
     71  See context.xml for details.
  • ComponentRegistry/trunk/README

    r5794 r6963  
    55-----------
    66The Component Registry stores CMDI metadata components and profiles and
    7 offers a service to list and retrieve them. The BrowserGui is a web
     7offers a service to list and retrieve them. The separate GUI project is a web
    88application displaying available components in the component registry in the
    99correct context: application domain, creator, creation date, version, etc.
    1010The registry offers a hierarchical structure for browsing the components.
    1111
    12 The componentRegistry is set up as a Flex Gui frontend communicating with a
    13 Java based backend (REST service).
     12The Component Registry is set up as a Javascript frontend communicating with a
     13Java based backend (REST service). Sources for the front end can be found, along
     14with more information, at <https://github.com/clarin-eric/react-webpack-comp-reg>.
    1415
    1516The ComponentRegistry is a central software component to the Clarin MetaData
     
    3637- 'ComponentRegistry', a Java project that implements the Component Registry
    3738  REST service, administration pages and a web container for a client UI.
    38 - 'ComponentBrowserGui', a Flex project that implements a client for the
    39   Component Registry REST service.
     39- 'ComponentSpecFixer', a utility that cleans up the component specifications
     40in the database with 'materialised expansion'.
    4041
    4142How to set up for development/building from source
     
    4344* Creating initial setup files:
    4445
    45  - in ComponentBrowserGui: `mvn buildnumber:create flexmojos:flexbuilder`
    46         - This generates project files for Flash Builder. Open in FB using
    47           File > Import Flex Project and use the 'Project Folder' option.
    4846 - in ComponentRegistry: `mvn eclipse:eclipse` 
    4947        - Generates eclipse configuration
    5048        - For NetBeans, simply open the POM as a project
    5149
    52 When using FlashBuilder to develop the ComponentBrowserGui, create a porject by
    53 "Import a Flex project from an FXP, ZIP, or project folder".
    54 
    55 When using FlashBuilder to develop, make sure to configure the correct Flex SDK. It should
    56 be version 3.6, which you can download for free at <http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3sdk>.
    57 In addition, you should configure the project to build for Flash player 10.0.0 (instead of default minimum version
    58 provided by SDK).
    59 
    6050* Creating war artifact for local deployment:
    6151
    62  - in ComponentBrowserGui: mvn install
    6352 - in ComponentRegistry: mvn package
    6453 
    65 The ComponentRegistry war will include the flex swf file needed to start the application.
    66 So deploying the resulting war will be enough to start the application.
     54The ComponentRegistry war will include the front end files needed to start the
     55application. So deploying the resulting war will be enough to start the
     56application.
    6757
    6858* Building for specific deployment environment
     
    7868The ComponentRegistry needs the general-component-schema.xsd, which should be found at:
    79691) ComponentRegistry/src/main/binding/ -> that directory has a svn:externals property pointing to the schema.
    80 Do a 'svn propget svn:externals' to see the property. Results in: 'http://svn.clarin.eu/metadata/trunk/toolkit/general-component-schema.xsd general-component-schema.xsd'
    81 
    82 * Missing some artifacts for Maven?:
    83 The ComponentBrowserGui project needs some swf files which are not in any maven repository I could find.
    84 So install them manually: go to ComponentBrowserGui/libs/ and run the commands in maveninstalllib.txt
     70Do a 'svn propget svn:externals' to see the property. Results in:
     71        'http://svn.clarin.eu/metadata/trunk/toolkit/general-component-schema.xsd general-component-schema.xsd'
    8572
    8673* Developing and Debugging "ComponentRegistry" back-end.
     
    9380it means that you do not have a JNDI resource for the database connection set up correctly.
    9481See the installation instructions for more information.
    95  
    96 * Developing and Debugging "ComponentBrowserGui".
    9782
    98 Always make sure that ComponentRegistry-war grabbed the newest version of the Flex GUI.
    99 For this you do "mvn install" in ComponentBrowserGui, and
    100 then compile the backend in ComponentRegistry. Second of all, you should know that you can run and
    101 debug the Gui from FlashBuilder.  For this you need to edit "Run/Debug" in the project properties.
    102 For instance,  if a bug to fix appears when fuilfilling the request
    103 http://localhost:8080/ComponentRegistry/?item=clarin.eu:cr1:c_1288172614011&browserview=comments
    104 you need to make this uri an "URI to launch". To do this, you duplicate one of the existing
    105 scenarios in Run/debug menu, and then EDIT the duplicated version by changing its "name"
    106 and  "URI or path to launch" in the corresponding way.
     83* Developing the front end:
    10784
    108 Make sure to download and install the DEBUG version of the Adobe Flash Player plugin from
    109         <https://www.adobe.com/support/flashplayer/downloads.html>
    110 If you are using Chrome, make sure to also disable the built-in Flash player. See:
    111         <https://support.google.com/chrome/answer/108086>
    112 
     85See <https://github.com/clarin-eric/react-webpack-comp-reg>.
    11386 
    11487Installation
  • ComponentRegistry/trunk/UPDATE

    r5945 r6963  
    2323-------------------------------------
    2424
    25 === 1.15.0 ===
     25=== 2.0 ===
     26
     27- The application's public base URL is configured differently as of this
     28  release.
     29
     30  The following context parameter is NO LONGER USED:
     31
     32    eu.clarin.cmdi.componentregistry.serviceRootUrl <- DEPRECATED
     33
     34  Instead, configure the parameter:
     35
     36    eu.clarin.cmdi.componentregistry.serviceUrlPath
     37        e.g. "/ds/ComponentRegistry" (or "" for root deployment)
     38  and
     39
     40    EITHER
     41        eu.clarin.cmdi.componentregistry.serviceUrlBase
     42            e.g. "http://catalog.clarin.eu"
     43    OR (if the application is running behind a proxy)
     44            eu.clarin.cmdi.componentregistry.serviceUrlProtocolHeader
     45                    e.g. (usually) "X-FORWARDED-PROTO"
     46                AND
     47            eu.clarin.cmdi.componentregistry.serviceUrlHostHeader
     48                    e.g. (usually) "X-FORWARDED-HOST"
     49
     50  See the bundled context.xml for details and examples.
     51
     52- The scheme for bookmark URLs of the front end have changed. Add a rewrite rule
     53  that causes a redirect from
     54 
     55    http://server/ComponentRegistry?param1=x&param2=y
     56                                   ^
     57  to
     58 
     59    http://server/ComponentRegistry#/?param1=x&param2=y
     60                                   ^^^
     61  (Difference marked)
     62
     63- Since the JS front end (like the previous Flash based front end) is quite heavy
     64  on the loading of compressible content, consider enabling content compression
     65  on the Tomcat server to improve performance, especially on clients with slow
     66  connections. In particular the loading of content of types 'application/json'
     67  and 'application/javascript' benefits from this.
     68 
     69  E.g., use the following in the Tomcat's server.xml:
     70
     71    <Connector port="8080" protocol="HTTP/1.1"
     72               connectionTimeout="20000"
     73               redirectPort="8443"
     74               compression="on"
     75               compressableMimeType="text/html,text/xml,text/plain,text/javascript,text/css,application/json,application/javascript"
     76               />
     77
     78  More information can be found at the following page:
     79        <https://tomcat.apache.org/tomcat-7.0-doc/config/http.html>
    2680
    2781- Remove the context parameter eu.clarin.cmdi.componentregistry.jpaDialect from the global
  • ComponentRegistry/trunk/pom.xml

    r6455 r6963  
    44                      http://maven.apache.org/xsd/maven-4.0.0.xsd">
    55  <modelVersion>4.0.0</modelVersion>
    6   <groupId>clarin.cmdi</groupId>
     6  <groupId>eu.clarin.cmdi</groupId>
    77  <artifactId>componentRegistry.parent</artifactId>
    88  <name>componentRegistry_parent</name>
    99  <packaging>pom</packaging>
    10   <version>1.0</version>
     10  <version>2.1-SNAPSHOT</version>
    1111  <description>Parent pom for ComponentRegistry, see www.clarin.eu/cmdi.</description>
    1212  <modules>
    13     <module>ComponentBrowserGui</module>
    1413    <module>ComponentRegistry</module>
    1514  </modules>
     
    2120  <properties>
    2221    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    23     <ComponentBrowserGui.version>1.15.0-SNAPSHOT</ComponentBrowserGui.version>
    24     <ComponentRegistry.version>1.15.0-SNAPSHOT</ComponentRegistry.version>
    2522  </properties>
    2623 
Note: See TracChangeset for help on using the changeset viewer.