Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Rich Ajax Platform
Release 1.2

org.eclipse.rwt.resources
Interface IResource


public interface IResource

Implementations of this interface represent an existing resource - local or external.

Since:
1.0

Method Summary
  String getCharset ()
          Specifies the charset to use for this resource.
  ClassLoader getLoader ()
          Specifies the classloader that has access to the resource that should be loaded.
  String getLocation ()
          Returns the location of the resource.
  IResourceManager.RegisterOptions getOptions ()
          Specifies in which way the resource is delivered.
 boolean isExternal ()
          Decides whether the resource is external or not.
 boolean isJSLibrary ()
          Decides whether the resource is a javascript library and thus handled a bit different than other resources.
 

Method Detail

getLoader

public 
ClassLoader getLoader()
Specifies the classloader that has access to the resource that should be loaded. If there is no special classloader you want to use just return the one of your implementation: ClassLoader getLoader() { return this.getClass().getClassLoader(); }

Returns:
the classloader to use

getLocation

public 
String getLocation()
Returns the location of the resource. This can be a path to a file within the bundles classpath or a URI for an external resource.

Returns:
the location of the resource
See Also:
isExternal()

getCharset

public 
String getCharset()
Specifies the charset to use for this resource.

Returns:
the charset to use
See Also:
HTML

getOptions

public 
IResourceManager.RegisterOptions getOptions()
Specifies in which way the resource is delivered. This is interesting for javascript libraries to compress and version them before sending them to the client. If this resource is not an javascript library use RegisterOptions#NONE. If you want RAP to compress the file use RegisterOptions#COMPRESS and to version it use RegisterOptions#VERSION. If you want to combine versioning and compression you can return RegisterOptions#VERSION_AND_COMPRESS as value.

Returns:
an instance of RegisterOptions
See Also:
IResourceManager.RegisterOptions

isJSLibrary

public boolean isJSLibrary()
Decides whether the resource is a javascript library and thus handled a bit different than other resources. This is also needed if you plan to have external, compressed and versioned javascript libraries.

Returns:
whether this resource is a javascript library
See Also:
IResourceManager.RegisterOptions, isExternal(), getOptions()

isExternal

public boolean isExternal()
Decides whether the resource is external or not. If the resource is a javascript library and not external it will be transmitted immediately with all the other resources. In the case of an external javascript library it will be included in the generated page with a <script> tag.

Returns:
whether the resource is located externally

Eclipse Rich Ajax Platform
Release 1.2

Copyright (c) Innoopract Informationssysteme GmbH and others 2002, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire