]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - rap/SimpleRapE4App.java
1 package org
.argeo
.cms
.e4
.rap
;
3 import java
.util
.Enumeration
;
5 import org
.argeo
.api
.cms
.CmsLog
;
6 import org
.eclipse
.rap
.rwt
.application
.Application
;
7 import org
.osgi
.framework
.Bundle
;
9 /** Simple RAP app which loads all e4xmi files. */
10 public class SimpleRapE4App
extends AbstractRapE4App
{
11 private final static CmsLog log
= CmsLog
.getLog(SimpleRapE4App
.class);
13 private String baseE4xmi
= "/e4xmi";
16 protected void addEntryPoints(Application application
) {
17 Bundle bundle
= getBundleContext().getBundle();
18 Enumeration
<String
> paths
= bundle
.getEntryPaths(baseE4xmi
);
19 while (paths
.hasMoreElements()) {
20 String p
= paths
.nextElement();
21 if (p
.endsWith(".e4xmi")) {
22 String e4xmiPath
= bundle
.getSymbolicName() + '/' + p
;
23 // FIXME deal with base name
24 String name
=null;// = '/' + FilenameUtils.removeExtension(FilenameUtils.getName(p));
25 addE4EntryPoint(application
, name
, e4xmiPath
, getBaseProperties());
26 if (log
.isDebugEnabled())
27 log
.debug("Registered " + e4xmiPath
+ " as " + getContextName() + name
);