Examples of Plugin

  • org.syncany.plugins.Plugin
    A plugin can be used to store Syncany's repository files on any remote location. Implementations of the Plugin class identify a storage/transfer plugin.

    Using the 'id' attribute, plugins can be loaded by the {@link Plugins} class. Once a plugin is loaded, a corresponding {@link TransferSettings} object must be created and initialized. From the connection object, a {@link TransferManager} can then be used toupload/download files to the repository.

    Per naming convention, plugins must end by the name Plugin and extend this class. Furthermore, all plugin classes must reside in a package org.syncany.plugins.plugin-id, where plugin-id is the identifier specified by {@link #getId()}. @author Philipp C. Heckel

  • plugin.common.Plugin
  • plugins.PluginManager.tools.command.Plugin
    Plugin command used to list/load/unload/reload plugins at runtime. @author Witlospock @version 1.0
  • resources.digesters.Plugin
    Un plug-in es una extensi�n que se puede agregar a EasyBot. Por ejemplo, un robot y todos los componentes que lo conforman, son definidos como plug-ins.
    Un plug-in se crea a partir de un documento XML, y de un conjunto de reglas (tambi�n en formato XML) que permiten establecer los datos del estado del plug-in creado.
  • runjettyrun.Plugin
    The activator class controls the plug-in life cycle. @author hillenius

  • Examples of barrysoft.plugins.Plugin

          fail(String.format("%s, Cause: (%s) %s", e.getMessage(),
              e.getCause().getClass().getCanonicalName(),
              e.getCause().getMessage()));
        }
       
        Plugin p = pm.getPlugin(0);
       
        assertEquals("Test Plugin 1", p.getInfo().getName());
        assertEquals(p.getClass().getCanonicalName(), p.getInfo().getJarClass());
        assertEquals("test_plugin.jar", p.getInfo().getJarName());
        assertEquals("Test Type", p.getInfo().getType());
        assertEquals("Plugins Testing Unit", p.getInfo().getHostApplication());
        assertEquals("1.0", p.getInfo().getVersion());
        assertEquals("Daniele Rapagnani", p.getInfo().getAuthor());
        assertEquals("This plugin does nothing and is only used for testing purposes",
              p.getInfo().getDescription());
       
        p.getOptions().setOption("regex", "(?i).*?<h href=\"bla\">.*?");
       
        try {
          for (int i=1; i <= 4; i++)
            assertEquals("test"+i, p.getOptions().getOptionValue("option"+i, String.class));
        } catch (OptionNotFoundException e) {
          fail(e.getMessage());
        }
       
        Vector<String> v = new Vector<String>();
       
        for (int i=0; i < 20; i++) {
          String uuid = UUID.randomUUID().toString();
         
          v.add(uuid);
         
          p.getOptions().setOption("uuid"+(i+1), uuid);
        }
       
        try {
          p.save();
        } catch (IOException e1) {
          fail(e1.getMessage());
        }
       
        pm = new PluginsManager<TestPlugin>();
       
        try {
          pm.addPlugin(pluginFile);
        } catch (PluginLoadingException e) {
          fail(e.getMessage());
        }
       
        p = pm.getPlugin(0);
       
        try {
          for (int i=0; i < 20; i++)
            assertEquals(v.get(i), p.getOptions().getOptionValue("uuid"+(i+1), String.class));
        } catch (OptionNotFoundException e) {
          fail(e.getMessage());
        }
       
        try {
          assertEquals("(?i).*?<h href=\"bla\">.*?",p.getOptions().getOptionValue("regex", String.class));
        } catch (OptionNotFoundException e) {
          fail(e.getMessage());
        }
       
        assertEquals(TestPlugin.EXTERNAL, ((Testable)p).test());
    View Full Code Here

    Examples of bear.plugins.Plugin

        public List<Plugin<TaskDef>> getAllOrderedPlugins() {
            try {
                Set<Plugin<TaskDef>> plugins = new HashSet<Plugin<TaskDef>>();

                for (Field field : OpenBean.fieldsOfType(this, Plugin.class)) {
                    Plugin plugin = (Plugin) field.get(this);
                    Set<Plugin<TaskDef>> set = plugin.getAllPluginDependencies();

                    plugins.add(plugin);
                    plugins.addAll(set);
                }
    View Full Code Here

    Examples of com.abiquo.ssm.plugin.annotations.Plugin

            if (!this.getClass().isAnnotationPresent(Plugin.class))
            {
                throw new PluginException("Missing @Plugin annotation in " + this.getClass().getName());
            }

            Plugin pluginInfo = this.getClass().getAnnotation(Plugin.class);

            if (pluginInfo.type() == null)
            {
                throw new PluginException("Plugin type can not be null in " + this.getClass().getName());
            }

            StoragePluginMetadata metadata = new StoragePluginMetadata();
            metadata.setDefaultIscsiPort(pluginInfo.defaultIscsiPort());
            metadata.setDefaultManagementPort(pluginInfo.defaultManagementPort());
            metadata.setRequiresAuthentication(pluginInfo.requiresAuthentication());
            metadata.setType(pluginInfo.type());

            try
            {
                Method[] methods = StoragePlugin.class.getMethods();
                for (Method methodDefinition : methods)
    View Full Code Here

    Examples of com.adito.extensions.types.Plugin

         *
         * @param bundle bundle containing message resources
         * @param clazz class containing event codes
         */
        public static void updateEventsTable(String bundle, Class clazz) {
            Plugin auditingPlugin = PluginType.getPlugin("adito-enterprise-auditing");
            if (auditingPlugin == null) {
                if(log.isDebugEnabled())
                    log.warn("Could not locate auditing plugin. No events codes can be updated.");
            } else {
                try {
                    Method m = auditingPlugin.getClass().getMethod("getDatabase", new Class[] {});
                    Database d = (Database) m.invoke(auditingPlugin, new Object[] {});
                    m = d.getClass().getMethod("updateEventsTable", new Class[] { String.class, Class.class });
                    m.invoke(d, new Object[] { bundle, clazz });
                } catch (Exception e) {
                    log.error("Failed to register event codes.", e);
    View Full Code Here

    Examples of com.atlassian.plugin.Plugin


        public Repository open(HttpServletRequest req, String name) throws RepositoryNotFoundException, ServiceNotAuthorizedException, ServiceNotEnabledException
        {
            String pluginKey = extractKeyFromUrl(name);
            Plugin plugin = pluginAccessor.getPlugin(pluginKey);
            if ((plugin != null && isPureSpeakeasyExtension(bundleContext, plugin)) || new File(gitRepositoryManager.getRepositoriesDir(), pluginKey).exists())
            {
                gitRepositoryManager.ensureRepository(pluginKey);
                return resolver.open(req, pluginKey);
            }
    View Full Code Here

    Examples of com.bbn.openmap.plugin.PlugIn

                Object obj = ComponentFactory.create(className, layerName, p);
                if (obj instanceof Layer || obj instanceof PlugIn) {
                    Layer l = null;

                    if (obj instanceof PlugIn) {
                        PlugIn pi = (PlugIn) obj;
                        PlugInLayer pil = new PlugInLayer();
                        pil.setPlugIn(pi);
                        pil.setName(p.getProperty(PropUtils.getScopedPropertyPrefix(pi)
                                + Layer.PrettyNameProperty));
                        l = pil;
    View Full Code Here

    Examples of com.bramosystems.oss.player.core.client.Plugin

            for (String pder : PlayerUtil.getPlayerProviderNames()) {
                addPoolRow(pder, "", "", false, "", EntryType.header);
                for (String pInfo : PlayerUtil.getPlayerNames(pder)) {
                    PlayerInfo pi = PlayerUtil.getPlayerInfo(pder, pInfo);
                    Plugin pinf = pi.getDetectedPluginInfo().getPlugin();
                    boolean isSupported = pi.getDetectedPluginVersion().compareTo(pi.getRequiredPluginVersion()) >= 0;

                    addPoolRow(pi.getPlayerName(), pinf.equals(Plugin.None) ? "-" : pinf.toString(),
                            pinf.equals(Plugin.None) ? "-" : pi.getDetectedPluginVersion().toString(),
                            pinf.equals(Plugin.None) ? null : isSupported,
                            isSupported ? pi.getRegisteredExtensions().toString() : "-",
                            row++ % 2 != 0 ? EntryType.even : EntryType.odd);
                }
            }
    View Full Code Here

    Examples of com.cloudbees.sdk.Plugin

        @Override
        protected boolean execute() throws Exception {
            CommandServiceImpl service = (CommandServiceImpl) commandService;
            String name = getPluginName();
            Plugin plugin = service.getPlugin(name);
            if (plugin != null) {
                System.out.println();
                System.out.println("Plugin: " + plugin.getArtifact());
                String help = service.getHelp(plugin, "subcommands:", true);
                System.out.println(help);
                if (check()) {
                    GAV gav = new GAV(plugin.getArtifact());
                    return checkVersion(gav);
                }
            } else {
                throw new IOException("Plugin not found: " + name);
            }
    View Full Code Here

    Examples of com.crawljax.web.model.Plugin

      @GET
      @Path("{id}")
      public Response getPlugin(@PathParam("id") String id) {
        Response r;
        Plugin config = plugins.findByID(id);
        if (config != null)
          r = Response.ok(config).build();
        else
          r = Response.serverError().build();
        return r;
    View Full Code Here

    Examples of com.dotmarketing.plugin.model.Plugin

       
        for (File f : pluginJars) {
          String id = f.getName();
          try{
            id = PluginUtil.getPluginNameFromJar(f.getName())
            Plugin plugin = null;
           
            if (plugins != null) {
              for (Plugin tempPlugin: plugins) {
                if (tempPlugin.getId().equals(id)) {
                  plugin = tempPlugin;
                  break;
                }
              }
            }
           
            boolean newPlugin = false;
            JarFile jar;
            Manifest mf;
            try {
              jar = new JarFile(f.getPath());
              mf=jar.getManifest();
            } catch (IOException e1) {
              Logger.fatal(this, "Method loadPlugins : Error deploying plugin id:" + id, e1);
              continue;
            }
            Attributes attrs=mf.getMainAttributes();
            if(plugin == null || !UtilMethods.isSet(plugin.getId())){
              plugin = new Plugin();
              newPlugin = true;
              plugin.setFirstDeployedDate(Calendar.getInstance().getTime());
              plugin.setId(id);
            }
            String version = attrs.getValue("Plugin-Version");
            if(!UtilMethods.isSet(version)){
              Logger.fatal(this, "Method loadPlugins : Error deploying plugin id:" + id);
              continue;
            }
            if(!newPlugin){
              if(plugin.getPluginVersion().equalsIgnoreCase(version)){
                setUpHooks(id);
                loadPluginProperties(jar, plugin.getId());
                pluginIds.add(id);
                pluginAPI.setDeployedPluginOrder(pluginIds);
                continue;
              }
            }
           
            plugin.setPluginVersion(version);
            String oldVersion = plugin.getPluginVersion();
            plugin.setLastDeployedDate(Calendar.getInstance().getTime());
            String pluginName = attrs.getValue("Plugin-Name") ==  null ? "":attrs.getValue("Plugin-Name");
            String author = attrs.getValue("Author") ==  null ? "":attrs.getValue("Author");
            plugin.setAuthor(author);
            plugin.setPluginName(pluginName);
            try{
              pluginAPI.save(plugin);
            } catch (DotDataException e2) {
              Logger.fatal(this, "Method loadPlugins : Error deploying plugin id:" + id, e2);
              continue;
            }
            loadPluginProperties(jar, plugin.getId());
            String deployClass = attrs.getValue("Deploy-Class");
            PluginDeployer deployer=null;
            if (deployClass!=null && deployClass.length()>0) {
              try {
                Object o=Class.forName(deployClass).newInstance();
                if (o instanceof PluginDeployer) {
                  deployer=(PluginDeployer)o;
                  if(newPlugin)
                    deployer.deploy();
                  else
                    deployer.redeploy(oldVersion);
                }
              } catch (InstantiationException e) {
                Logger.debug(PluginLoader.class,"InstantiationException: " + id + " " + e.getMessage(),e);
                continue;
              } catch (IllegalAccessException e) {
                Logger.debug(PluginLoader.class,"IllegalAccessException: " + id + " " + e.getMessage(),e);
                continue;
              } catch (ClassNotFoundException e) {
                Logger.debug(PluginLoader.class,"ClassNotFoundException: " + id + " " + e.getMessage(),e);
                continue;
              }
            }
            setUpHooks(id);
            pluginIds.add(id);
            pluginAPI.setDeployedPluginOrder(pluginIds);
            pluginAPI.loadBackEndFiles(plugin.getId());
           
          }catch (Exception e) {
            Logger.fatal(this, "ERROR DEPLOYING A PLUGIN : " + id, e);
          }
        }
    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.