Examples of PluginProperties


Examples of com.cosmo.util.PluginProperties

   {
      Node attribNode;
      NodeList attribList;
      Element pluginElement;
      Element attribElement;
      PluginProperties plugin;

      HashMap<String, PluginProperties> plugins = new HashMap<String, PluginProperties>();

      NodeList pluginList = doc.getElementsByTagName(pluginTag);
      for (int pidx = 0; pidx < pluginList.getLength(); pidx++)
      {
         Node pluginNode = pluginList.item(pidx);
         if (pluginNode.getNodeType() == Node.ELEMENT_NODE)
         {
            pluginElement = (Element) pluginNode;

            plugin = new PluginProperties();
            plugin.setId(pluginElement.getAttribute(WorkspaceProperties.XML_ATT_ID));
            plugin.setModuleClass(pluginElement.getAttribute(WorkspaceProperties.XML_ATT_DRIVER));

            attribList = pluginElement.getElementsByTagName(WorkspaceProperties.XML_TAG_PARAMETER);
            for (int aidx = 0; aidx < attribList.getLength(); aidx++)
            {
               attribNode = attribList.item(aidx);
               if (attribNode.getNodeType() == Node.ELEMENT_NODE)
               {
                  attribElement = (Element) attribNode;
                  plugin.setParam(attribElement.getAttribute(WorkspaceProperties.XML_ATT_KEY),
                                  attribElement.getAttribute(WorkspaceProperties.XML_ATT_VALUE));
               }
            }

            plugins.put(plugin.getId(), plugin);
         }
      }

      return plugins;
   }
View Full Code Here

Examples of com.cosmo.util.PluginProperties

      {
         return agents.get(agentId);
      }
      else
      {
         PluginProperties agent = workspace.getProperties().getCommProperties().getCommunicationAgent(agentId);

         className = agent.getModuleClass();
         if (StringUtils.isNullOrEmptyTrim(className))
         {
            throw new CommunicationsException("Communications Configuration Exception: No communications driver found");
         }
View Full Code Here

Examples of com.cosmo.util.PluginProperties

    *
    * @throws AuthorizationException
    */
   private static Authorization loadProvider(Workspace workspace) throws AuthorizationException
   {
      PluginProperties agent;
      String className = "-- no authorization provider defined in proprties --";
      Authorization provider;
     
      // Obtiene el agente de autorizaci�n
      agent = workspace.getProperties().getSecurityProperties().getAuthorizationAgent();
      if (agent == null)
      {
         throw new AuthorizationException("Security Configuration Exception: No authorization agent found");
      }
     
      // Obtiene el driver de autorizaci�n
      className = agent.getModuleClass();
      if (StringUtils.isNullOrEmptyTrim(className))
      {
         throw new AuthorizationException("Security Configuration Exception: No authorization driver found");
      }
     
View Full Code Here

Examples of com.cosmo.util.PluginProperties

    * @throws AuthenticationException
    */
   private static Authentication loadProvider(Workspace workspace) throws AuthenticationException
   {
      String className = "-- no authentication provider defined in proprties --";
      PluginProperties agent;
      Authentication provider;
     
      // Obtiene el agente de autenticaci�n
      agent = workspace.getProperties().getSecurityProperties().getAuthenticationAgent();
      if (agent == null)
      {
         throw new AuthenticationException("Security Configuration Exception: No authentication agent found");
      }
     
      // Obtiene el driver de autenticaci�n
      className = agent.getModuleClass();
      if (StringUtils.isNullOrEmptyTrim(className))
      {
         throw new AuthenticationException("Security Configuration Exception: No authentication driver found");
      }
     
View Full Code Here

Examples of com.cosmo.util.PluginProperties

      {
         return agents.get(agentId);
      }
      else
      {
         PluginProperties agent = workspace.getProperties().getDataProperties().getDataAgent(agentId);

         className = agent.getModuleClass();
         if (StringUtils.isNullOrEmptyTrim(className))
         {
            throw new DataException("Data Services Configuration Exception: No data driver found");
         }
View Full Code Here

Examples of net.sourceforge.pebble.PluginProperties

    } catch (PersistenceException pe) {
      pe.printStackTrace();
    }

    refererFilterManager = new RefererFilterManager(this);
    pluginProperties = new PluginProperties(this);
    blogCompanion = new BlogCompanion(this);
    years = new ArrayList<Year>();

    // create the various indexes for this blog
    searchIndex = new SearchIndex(this);
View Full Code Here

Examples of net.sourceforge.pebble.PluginProperties

        }

        // Establish default sizes.
        int defaultThumbSize = 200;
        int defaultPopupSize = 640;
        PluginProperties props = blog.getPluginProperties();
        if (props.hasProperty(thumbSizeProp)) {
            try {
                defaultThumbSize =
                  Integer.parseInt(props.getProperty(thumbSizeProp));
            } catch (NumberFormatException nfe) {
                // Ignore.
            }
        }
        if (props.hasProperty(popupSizeProp)) {
            try {
                defaultPopupSize =
                  Integer.parseInt(props.getProperty(popupSizeProp));
            } catch (NumberFormatException nfe) {
                // Ignore.
            }
        }
View Full Code Here

Examples of net.sourceforge.pebble.PluginProperties

   * @param blogEntry
   *          the blog entry to be decorated
   */
  public void decorate(ContentDecoratorContext context, BlogEntry blogEntry) {

    PluginProperties props = blogEntry.getBlog().getPluginProperties();
    int maxPosts = StringUtils.MAX_NUM_OF_POSTS;

    if (props.hasProperty(RelatedPostsDecorator.MAX_POSTS)) {
      try {
        maxPosts = Integer.parseInt(props.getProperty(MAX_POSTS));
      }
      catch (NumberFormatException nfe) {
        log.error(nfe.getMessage());
        // do nothing, the value has already been defaulted
      }
View Full Code Here

Examples of net.sourceforge.pebble.PluginProperties

   * Called when a comment or TrackBack has been added.
   *
   * @param response a Response
   */
  protected void blogEntryResponseAdded(Response response) {
    PluginProperties props = response.getBlogEntry().getBlog().getPluginProperties();
    String regexList = props.getProperty(REGEX_LIST_KEY);
    String regexes[] = null;
    if (regexList != null) {
      regexes = regexList.split(",");
    } else {
      regexes = new String[0];
    }

    int threshold = DEFAULT_THRESHOLD;
    if (props.hasProperty(THRESHOLD_KEY)) {
      try {
        threshold = Integer.parseInt(props.getProperty(THRESHOLD_KEY));
      } catch (NumberFormatException nfe) {
        log.error(nfe.getMessage());
        // do nothing, the value has already been defaulted
      }
    }
View Full Code Here

Examples of net.sourceforge.pebble.PluginProperties

   * Called when a comment or TrackBack has been added.
   *
   * @param response a Response
   */
  protected void blogEntryResponseAdded(Response response) {
    PluginProperties props = response.getBlogEntry().getBlog().getPluginProperties();
    String propertyName = "";
    if (response instanceof Comment) {
      propertyName = COMMENT_THRESHOLD_KEY;
    } else {
      propertyName = TRACKBACK_THRESHOLD_KEY;
    }
    int threshold = DEFAULT_THRESHOLD;
    if (props.hasProperty(propertyName)) {
      try {
        threshold = Integer.parseInt(props.getProperty(propertyName));
      } catch (NumberFormatException nfe) {
        log.error(nfe.getMessage());
        // do nothing, the value has already been defaulted
      }
    }
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.