예제 #1
0
 @JsonProperty
 public List<String> getBundleVersions() {
   Bundle[] bundles = ServiceUtility.getContext().getBundles();
   List<String> versions = new ArrayList<>();
   for (Bundle bundle : bundles) {
     String version = bundle.getHeaders().get("Bundle-Version");
     String implVersion = bundle.getHeaders().get("Implementation-Version");
     if (version != null && implVersion != null) {
       versions.add(String.format("%s_%s_%s", bundle.getSymbolicName(), version, implVersion));
     } else if (version != null) {
       versions.add(String.format("%s_%s", bundle.getSymbolicName(), version));
     } else {
       versions.add(String.format("%s", bundle.getSymbolicName()));
     }
   }
   Collections.sort(versions);
   return versions;
 }
 public IModelManager getModelManager() {
   return ServiceUtility.getService(IModelManager.class, 5000);
 }
 @SuppressWarnings("rawtypes")
 @Override
 public IMessageManager getMsgManager() {
   return ServiceUtility.getService(IMessageManager.class, false);
 }