Package org.apache.myfaces.trinidadinternal.share.config

Examples of org.apache.myfaces.trinidadinternal.share.config.Configuration


    String encoding = (String)properties.get(ENCODING_TYPE_KEY);
    if (encoding != null)
      return encoding;

    // Pick an encoding based on the Configuration/Agent
    Configuration config = context.getConfiguration();
    TrinidadAgent agent = context.getAgent();
    //encodings was part of old Agent capabilities, not in new Agent Caps. So replaced
    //Object encodingsObj = agent.getCapability(AdfFacesAgent.CAP_IMAGE_ENCODINGS);
    //int encodings = ((encodingsObj == null)
    //                 ? (AdfFacesAgent.IMAGE_ENCODINGS_CAP_GIF |
    //                    AdfFacesAgent.IMAGE_ENCODINGS_CAP_PNG)
    //                 : ((Number) encodingsObj).intValue());

    // If GIF is enabled and supported, use it
    //if (((encodings & AdfFacesAgent.IMAGE_ENCODINGS_CAP_GIF) != 0) &&
    //      !Boolean.FALSE.equals(config.getProperty(_GIF_ENABLED)))
    //{
    //  return ImageEncoderManager.GIF_TYPE;
    //}
    if ((agent.getCapability(TrinidadAgent.CAP_GIF_TYPE_IMAGE) == Boolean.TRUE) &&
            !Boolean.FALSE.equals(config.getProperty(_GIF_ENABLED)))
    {
      return ImageEncoderManager.GIF_TYPE;
    }

    //encodings was part of old Agent capabilities, not in new Agent Caps. So replaced
View Full Code Here


  // Returns an XMLProvider to use for parsing XML documents
  private XMLProvider _getXMLProvider(ImageContext context)
    throws CacheException
  {
    // Create a parser to use for parsing IMX files
    Configuration config = context.getConfiguration();
    XMLProvider parser = XMLUtils.getXMLProvider(config);

    if (parser == null)
     _error(_XML_PROVIDER_ERROR);
View Full Code Here

    if (agent.getCapability(TrinidadAgent.CAP_TRANSPARENT_PNG_TYPE_IMAGE) == Boolean.TRUE)
       return true;

    // Otherwise, check GIF suport...
    Configuration config = context.getConfiguration();

    //return (((encodings & AdfFacesAgent.IMAGE_ENCODINGS_CAP_GIF) != 0) &&
    //          !Boolean.FALSE.equals(config.getProperty(_GIF_ENABLED)));
    return ((agent.getCapability(TrinidadAgent.CAP_GIF_TYPE_IMAGE) == Boolean.TRUE) &&
               !Boolean.FALSE.equals(config.getProperty(_GIF_ENABLED)));

  }
View Full Code Here

   */
  public static String getConfiguredURL(
    UIXRenderingContext context,
    Object           directoryKey)
  {
    Configuration config = context.getConfiguration();
    String contextURI = (String)context.getProperty(MARLIN_NAMESPACE,
                                   UIXRenderingContext.CONTEXT_URI_PROPERTY);

    String baseURL = config.getURI(directoryKey,
                                   contextURI);

    // Check for design time and modify URL if needed
    if (Beans.isDesignTime())
    {
View Full Code Here

  {
    String designTimeURL;
    String tempCacheDirectory;
    String resourceDirectoryPath;

    Configuration configInfo = context.getConfiguration();
    ExternalContext external = context.getFacesContext().getExternalContext();

    String contextURI = external.getRequestContextPath();

    // Ignore javascripts for design time
    boolean isJavascript =
       (baseURL.indexOf((String)Configuration.JSLIBS_DIRECTORY)!=-1);

    if (!baseURL.equals(configInfo.getURI(Configuration.IMAGES_CACHE_DIRECTORY,
                                          contextURI))
        && !baseURL.equals(configInfo.getURI(Configuration.STYLES_CACHE_DIRECTORY,
                                             contextURI))
        && !isJavascript)
    {
       designTimeURL =
         (ClassLoaderUtils.getResource( _BASE_DIRECTORY + baseURL)).toString();
View Full Code Here

    RendererManager manager = _manager;

    // If the manager is
    if (manager == null)
    {
      Configuration config = getConfiguration();
      if (config != null)
      {
        Object o = config.getProperty(Configuration.RENDERER_MANAGER);
        if (o instanceof RendererManager)
        {
          manager = _manager = (RendererManager) o;
        }
      }
View Full Code Here

    LookAndFeelManager manager = null;

    //
    // try getting the LookAndFeelManager from the Configuration
    //
    Configuration config = getConfiguration();

    if (config != null)
    {
      Object o = config.getProperty(Configuration.LOOK_AND_FEEL_MANAGER);
      if (o instanceof LookAndFeelManager)
      {
        manager = (LookAndFeelManager)o;
      }
    }
View Full Code Here

  // Uses the web server root and base image uri to determine the
  // location of the default cache
  private ImageProvider _getDefaultImageProvider()
  {
    ImageProvider provider = null;
    Configuration config = getConfiguration();
    try
    {
      // We explicitly avoid using the SHARED_CONTEXT_PATH for the
      // image cache.  That way, we can ensure that each application
      // creates its own local image cache.
      String contextPath = (String) _getContextProperty(CONTEXT_PATH_PROPERTY);
      String path = config.getPath(Configuration.IMAGES_CACHE_DIRECTORY,
                                   contextPath);

      provider = FileSystemImageCache.getSharedCache(path);
    }
    catch (Exception e)
View Full Code Here

    RendererManager manager = _manager;

    // If the manager is
    if (manager == null)
    {
      Configuration config = getConfiguration();
      if (config != null)
      {
        Object o = config.getProperty(Configuration.RENDERER_MANAGER);
        if (o instanceof RendererManager)
        {
          manager = _manager = (RendererManager) o;
        }
      }
View Full Code Here

    LookAndFeelManager manager = null;

    //
    // try getting the LookAndFeelManager from the Configuration
    //
    Configuration config = getConfiguration();

    if (config != null)
    {
      Object o = config.getProperty(Configuration.LOOK_AND_FEEL_MANAGER);
      if (o instanceof LookAndFeelManager)
      {
        manager = (LookAndFeelManager)o;
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidadinternal.share.config.Configuration

Copyright © 2018 www.massapicom. 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.