Examples of Bundle


Examples of org.apache.cocoon.i18n.Bundle

     *
     * @param catalogueId if not null, this catalogue will be used instead of the default one.
     */
    private String getString(String key, String catalogueId, String defaultValue) {
        try {
            Bundle catalogue = defaultCatalogue;
            if (catalogueId != null) {
                CatalogueInfo catalogueInfo = (CatalogueInfo)catalogues.get(catalogueId);
                if (catalogueInfo == null) {
                    if (getLogger().isDebugEnabled())
                        debug("Catalogue not found: " + catalogueId + ", could not translate key " + key);
                    return defaultValue;
                }
                try {
                    catalogue = catalogueInfo.getCatalogue();
                } catch (Exception e) {
                    getLogger().error("Error getting catalogue " + catalogueInfo.getName() + " from location " + catalogueInfo.getLocation() + " for locale " + locale + ", will not translate key " + key);
                    return defaultValue;
                }
            }
            Node res = (Node)catalogue.getObject(
                    I18N_CATALOGUE_PREFIX + "[@key='" + key + "']");

            String value = getTextValue(res);
            return value != null ? value : defaultValue;
        } catch (MissingResourceException e)  {
View Full Code Here

Examples of org.apache.karaf.eik.core.features.Bundle

            }
        } else if (element instanceof Feature) {
            final Feature feature = (Feature) element;
            return feature.getName();
        } else if (element instanceof Bundle) {
            final Bundle bundle = (Bundle) element;
            final String label;
            if (bundle.getBundleUrl().startsWith(MVN_URL_PREFIX)) {
                final String[] bundleComponents = bundle.getBundleUrl().split("/"); //$NON-NLS-1$
                label = bundleComponents[1];
            } else {
                label = element.toString();
            }
View Full Code Here

Examples of org.apache.karaf.features.internal.model.Bundle

                if (manifest == null || !ManifestUtils.isBundle(getManifest(bundleFile))) {
                    bundleName = "wrap:" + bundleName;
                }

                Bundle bundle = null;
                for (Bundle b : feature.getBundle()) {
                    if (bundleName.equals(b.getLocation())) {
                        bundle = b;
                        break;
                    }
                }
                if (bundle == null) {
                    bundle = objectFactory.createBundle();
                    bundle.setLocation(bundleName);
                    feature.getBundle().add(bundle);
                }
                if ("runtime".equals(entry.getValue())) {
                    bundle.setDependency(true);
                }
                if (startLevel != null && bundle.getStartLevel() == 0) {
                    bundle.setStartLevel(startLevel);
                }
            }
        }

        if ((!feature.getBundle().isEmpty() || !feature.getFeature().isEmpty()) && !features.getFeature().contains(feature)) {
View Full Code Here

Examples of org.apache.myfaces.extensions.cdi.core.api.resource.bundle.Bundle

    /**
     * {@inheritDoc}
     */
    public ResourceBundle useBundle(Class<?> bundleClass)
    {
        Bundle bundleName = bundleClass.getAnnotation(Bundle.class);
        if(bundleName != null)
        {
            this.bundleName = bundleName.name();
        }

        if(this.bundleName == null || "".equals(this.bundleName))
        {
            String className = bundleClass.getSimpleName();
View Full Code Here

Examples of org.apache.sling.maven.projectsupport.bundlelist.v1_0_0.Bundle

    public List<Bundle> toBundleList() {
        ArrayList<Bundle> bundleList = new ArrayList<Bundle>();

        if (bundles == null) {
            Bundle bnd = new Bundle();
            bnd.setArtifactId(artifactId);
            bnd.setGroupId(groupId);
            bnd.setVersion(version);
            if (type != null) {
                bnd.setType(type);
            }
            bnd.setClassifier(classifier);
            bnd.setStartLevel(startLevel);
            bundleList.add(bnd);
        } else {
            for (ArtifactDefinition bundle : bundles) {
                bundleList.addAll(bundle.toBundleList());
            }
View Full Code Here

Examples of org.datanucleus.plugin.Bundle

    {
        ClassLoaderResolver clr = new JDOClassLoaderResolver();
        NonManagedPluginRegistry mgr = new NonManagedPluginRegistry(clr, "EXCEPTION", true);
        assertEquals(0,mgr.getExtensionPoints().length);

        Bundle bundle0 = mgr.registerBundle(clr.getResource("/org/datanucleus/samples/plugin/MANIFEST0.MF",null));
        mgr.registerExtensionsForPlugin(clr.getResource("/org/datanucleus/samples/plugin/plugin1expoint.xml",null),bundle0);
        assertEquals(2,mgr.getExtensionPoints().length);
        assertNull(mgr.getExtensionPoint("testID"));
        assertNull(mgr.getExtensionPoint("testID2"));
        assertNotNull(mgr.getExtensionPoint("org.datanucleus.testID"));
View Full Code Here

Examples of org.dspace.content.Bundle

        throws SQLException, IOException, AuthorizeException
    {
        if (license == null)
            license = collection.getLicense();
        InputStream lis = new ByteArrayInputStream(license.getBytes());
        Bundle lb = item.createBundle(Constants.LICENSE_BUNDLE_NAME);
        Bitstream lbs = lb.createBitstream(lis);
        lis.close();
        BitstreamFormat bf = BitstreamFormat.findByShortDescription(context, "License");
        if (bf == null)
            bf = FormatIdentifier.guessFormat(context, lbs);
        lbs.setFormat(bf);
View Full Code Here

Examples of org.jboss.errai.ui.shared.api.annotations.Bundle

   * Gets the bundle name from the @Bundle annotation.
   *
   * @param bundleAnnotatedClass
   */
  private String getMessageBundlePath(MetaClass bundleAnnotatedClass) {
    Bundle annotation = bundleAnnotatedClass.getAnnotation(Bundle.class);
    String name = annotation.value();
    if (name == null) {
      throw new GenerationException("@Bundle: bundle name must not be null].");
    }
    // Absolute path vs. relative path.
    if (name.startsWith("/")) {
View Full Code Here

Examples of org.osgi.framework.Bundle

  };

  @Override
  public void createPartControl(Composite parent) {
    _browser = new Browser(parent, SWT.NONE);
    Bundle plugin = WGADesignerPlugin.getDefault().getBundle();
    IPath relativePagePath = new Path("resources/html/gettingStarted/step1.1.html");
    URL fileInPlugin = FileLocator.find(plugin, relativePagePath, null);
    if (fileInPlugin != null) {
      try {
        URL pageUrl = FileLocator.toFileURL(fileInPlugin);
View Full Code Here

Examples of org.osgi.framework.Bundle

                }           
            }
        }
       
        // retrieve J2EE libs
        Bundle bundle = Platform.getBundle("de.innovationgate.eclipse.plugins.Core");
        if (bundle != null && wgaVersion != null) {           
            IPath path = new Path("resources").append("librarySets");
            if (wgaVersion.isAtLeast(5, 0)) {
                path = path.append("j2ee14");
            } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.