Package org.apache.myfaces.trinidadinternal.image

Examples of org.apache.myfaces.trinidadinternal.image.ImageType


    // will return quickly.

    try
    {
      // Get the ImageType for this request
      ImageType type = _getImageType(context, request);
      assert (type != null);

      // Get the in-memory Cache for this request
      Cache cache = _getCache(context, type);
      assert (cache != null);
View Full Code Here


    if (request == null)
      return null;

    // Get the ImageType from the request
    ImageType type = _getImageType(context, request);
    assert (type != null);

      // Get the properties from the request
    Map<Object, Object> properties = request.getRenderProperties(context);
    assert (properties != null);
View Full Code Here

    String name = request.getLocalName();

    ImageTypeManager manager = CacheUtils.getImageTypeManager(context);
    assert (manager != null);

    ImageType type = manager.getImageType(namespace, name);

    if (type == null)
      _error(_IMAGE_TYPE_ERROR + namespace + ", " + name);

    return type;
View Full Code Here

    boolean hasPropertiesFilter,
    boolean checkSource
    )
  {
    // Register the type
    ImageType type =
      manager.registerImageType(
        ImageConstants.TECATE_NAMESPACE,
        name,
        null
        );

    char initialCap = Character.toUpperCase(name.charAt(0));
    String baseName = initialCap + name.substring(1);

    String rendererName =
      "org.apache.myfaces.trinidadinternal.image.laf.browser." + baseName + "ImageRenderer";

    // Initialize renderer name
    type.setProperty(ImageType.IMAGE_RENDERER_NAME_PROPERTY, rendererName);

    // Initialize the renderer
    type.setProperty(
      ImageType.IMAGE_RENDERER_PROPERTY,
      new PropertyInstantiator(rendererName));

    // Initialize encoder
    type.setProperty(
      ImageType.XML_ENCODER_PROPERTY,
      new PropertyInstantiator(
        "org.apache.myfaces.trinidadinternal.image.xml.encode." + baseName + "Encoder"
      ));

    // FileSystemImageCache properties
    type.setProperty(
      CacheKeyFactory.CACHE_KEY_FACTORY_PROPERTY,
      new PropertyInstantiator(
        "org.apache.myfaces.trinidadinternal.image.cache." + baseName + "KeyFactory"
      ));

    type.setProperty(
      NameProvider.NAME_PROVIDER_PROPERTY,
      new PropertyInstantiator(
        "org.apache.myfaces.trinidadinternal.image.cache." + baseName + "NameProvider"
      ));


    if (hasPropertiesFilter)
    {
      type.setProperty(
        PropertiesFilter.PROPERTIES_FILTER_PROPERTY,
        new PropertyInstantiator(
          "org.apache.myfaces.trinidadinternal.image.cache." + baseName + "PropertiesFilter"
        ));
    }

    // Initialize localized property
    type.setProperty(
      ImageType.LOCALIZED_PROPERTY,
      isLocalized ? Boolean.TRUE : Boolean.FALSE
      );

    // Initialize check source property
    type.setProperty(
      ImageType.CHECK_SOURCE_PROPERTY,
      checkSource ? Boolean.TRUE : Boolean.FALSE
      );
  }
View Full Code Here

    boolean hasPropertiesFilter,
    boolean checkSource
    )
  {
    // Register the type
    ImageType type =
      manager.registerImageType(
        ImageConstants.TECATE_NAMESPACE,
        name,
        null
        );

    char initialCap = Character.toUpperCase(name.charAt(0));
    String baseName = initialCap + name.substring(1);

    String rendererName =
      "org.apache.myfaces.trinidadinternal.image.laf.browser." + baseName + "ImageRenderer";

    // Initialize renderer name
    type.setProperty(ImageType.IMAGE_RENDERER_NAME_PROPERTY, rendererName);

    // Initialize the renderer
    type.setProperty(
      ImageType.IMAGE_RENDERER_PROPERTY,
      new PropertyInstantiator(rendererName));

    // Initialize encoder
    type.setProperty(
      ImageType.XML_ENCODER_PROPERTY,
      new PropertyInstantiator(
        "org.apache.myfaces.trinidadinternal.image.xml.encode." + baseName + "Encoder"
      ));

    // FileSystemImageCache properties
    type.setProperty(
      CacheKeyFactory.CACHE_KEY_FACTORY_PROPERTY,
      new PropertyInstantiator(
        "org.apache.myfaces.trinidadinternal.image.cache." + baseName + "KeyFactory"
      ));

    type.setProperty(
      NameProvider.NAME_PROVIDER_PROPERTY,
      new PropertyInstantiator(
        "org.apache.myfaces.trinidadinternal.image.cache." + baseName + "NameProvider"
      ));


    if (hasPropertiesFilter)
    {
      type.setProperty(
        PropertiesFilter.PROPERTIES_FILTER_PROPERTY,
        new PropertyInstantiator(
          "org.apache.myfaces.trinidadinternal.image.cache." + baseName + "PropertiesFilter"
        ));
    }

    // Initialize localized property
    type.setProperty(
      ImageType.LOCALIZED_PROPERTY,
      isLocalized ? Boolean.TRUE : Boolean.FALSE
      );

    // Initialize check source property
    type.setProperty(
      ImageType.CHECK_SOURCE_PROPERTY,
      checkSource ? Boolean.TRUE : Boolean.FALSE
      );
  }
View Full Code Here

    // will return quickly.

    try
    {
      // Get the ImageType for this request
      ImageType type = _getImageType(context, request);
      assert (type != null);

      // Get the in-memory Cache for this request
      Cache cache = _getCache(context, type);
      assert (cache != null);
View Full Code Here

    if (request == null)
      return null;

    // Get the ImageType from the request
    ImageType type = _getImageType(context, request);
    assert (type != null);

      // Get the properties from the request
    Map<Object, Object> properties = request.getRenderProperties(context);
    assert (properties != null);
View Full Code Here

    String name = request.getLocalName();

    ImageTypeManager manager = CacheUtils.getImageTypeManager(context);
    assert (manager != null);

    ImageType type = manager.getImageType(namespace, name);

    if (type == null)
      _error(_IMAGE_TYPE_ERROR + namespace + ", " + name);

    return type;
View Full Code Here

    // will return quickly.

    try
    {
      // Get the ImageType for this request
      ImageType type = _getImageType(context, request);
      assert (type != null);

      // Get the in-memory Cache for this request
      Cache cache = _getCache(context, type);
      assert (cache != null);
View Full Code Here

    if (request == null)
      return null;

    // Get the ImageType from the request
    ImageType type = _getImageType(context, request);
    assert (type != null);

      // Get the properties from the request
    Map<Object, Object> properties = request.getRenderProperties(context);
    assert (properties != null);
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidadinternal.image.ImageType

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.