Package com.webobjects.appserver

Examples of com.webobjects.appserver.WOResourceManager


         if(value != null) {
           String stringValue;
           if("background-image".equals(key)) {
             if (value instanceof NSData) {
               NSData data = (NSData) value;
               WOResourceManager rm = WOApplication.application().resourceManager();
               String mimeType = (String) (_mimeType != null ? _mimeType.valueInComponent(component) : "image/jpeg");
               WOURLValuedElementData uve = new WOURLValuedElementData(data, mimeType, null);
               rm._cacheData(uve);
               stringValue = uve.dataURL(wocontext);
             } else {
               stringValue = value.toString();
             }
             if(stringValue.indexOf("url(") < 0) {
View Full Code Here


      return href();
    }

    String result = "#";
    if(!ERXStringUtilities.stringIsNullOrEmpty(fileName())) {
      WOResourceManager rm = WOApplication.application().resourceManager();
      try {
        result = rm.urlForResourceNamed(fileName(), framework(), null, aWOContext.request())
      }
      catch (Exception e) {
        log.warn("The Resource Path is not correct : " + this);
      }
    }
View Full Code Here

      } else {
        fileName = url;
      }

      if(!ERXStringUtilities.stringIsNullOrEmpty(fileName)) {
        WOResourceManager rm = WOApplication.application().resourceManager();
        try {
          return rm.urlForResourceNamed(fileName, framework, null, context.request())
        }
        catch (Exception e) {
          log.warn("The Resource Path is not correct : " + url);
        }
      }
View Full Code Here

    }

 
  public String redSquareSrc() {
    WOResourceManager rm = application().resourceManager();
    return rm.urlForResourceNamed("img/Red_Thumb.png", "app", null, context().request());
  }
View Full Code Here

    WOResourceManager rm = application().resourceManager();
    return rm.urlForResourceNamed("img/Red_Thumb.png", "app", null, context().request());
  }
 
  public String yellowSquareSrc() {   
    WOResourceManager rm = application().resourceManager();
    return rm.urlForResourceNamed("img/Yellow_Thumb.png", "app", null, context().request());
  }
View Full Code Here

    WOResourceManager rm = application().resourceManager();
    return rm.urlForResourceNamed("img/Yellow_Thumb.png", "app", null, context().request());
  }
 
  public String greenSquareSrc() {
    WOResourceManager rm = application().resourceManager();
    return rm.urlForResourceNamed("img/Green_Thumb.png", "app", null, context().request());
  }
View Full Code Here

    if(valueForBinding("href", component) != null) {
      href = (String)valueForBinding("href", component);
    } else if(attachment != null) {
      href = ERAttachmentProcessor.processorForType(attachment).attachmentUrl(attachment, context.request(), context);
    } else {
      WOResourceManager rm = WOApplication.application().resourceManager();
      String fileName = (String)valueForBinding("filename", component);
      String frameWork = (String)valueForBinding("framework", component);
      href = rm.urlForResourceNamed(fileName, frameWork, null, context.request()).toString();
    }
   
    appendTagAttributeToResponse(response, "href", href);
    appendTagAttributeToResponse(response, "rel", valueForBinding("rel", component));
    appendTagAttributeToResponse(response, "title", valueForBinding("title", component));
View Full Code Here

        if(val != null) {
          framework = val.toString();
        }
      }
      String filename = (String)_filename.valueInComponent(component);
      WOResourceManager rs = WOApplication.application().resourceManager();
      href = rs.urlForResourceNamed(filename, framework, null, context.request());
    }
    response._appendTagAttributeAndValue("href", href, false);
    String rel = "SHORTCUT ICON";
    if(_type != null) {
      String val = (String) _type.valueInComponent(component);
View Full Code Here

public class ERMimetypesMapper {
  private static MimetypesFileTypeMap mimetypesMapper = null;

  protected static MimetypesFileTypeMap mapper() {
    if (mimetypesMapper == null) {
      WOResourceManager resourceManager = WOApplication.application().resourceManager();
      InputStream is = resourceManager.inputStreamForResourceNamed("mime.types", "ERJavaMail", null);

      mimetypesMapper = new MimetypesFileTypeMap(is);
      is = null;
    }
View Full Code Here

  public ERXClippy(WOContext context) {
    super(context);
  }

  public String src() {
    WOResourceManager rm = WOApplication.application().resourceManager();
    return rm.urlForResourceNamed("clippy.swf", "ERExtensions", null, context().request());
  }
View Full Code Here

TOP

Related Classes of com.webobjects.appserver.WOResourceManager

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.