com.adobe.icomm.assetplacement.model
Class Resource

java.lang.Object
  extended by com.adobe.icomm.assetplacement.model.PackageElement
      extended by com.adobe.icomm.assetplacement.model.Resource

public class Resource
extends PackageElement

Class that represents a <resource> child of <resources> inside a package definition. Get a list of these from the PackageDefinition's getResources method.


Method Summary
 String getAltText()
          Alternative text (alt text) is used as a replacement for an image, whenever the image cannot be seen.
 String getContentType()
          Identifies the content type of the current resource.
 String getControllerID()
          Return the controller id of the parent <resources> node.
 String getExpiration()
          Specifies the expiration date of a giving resource.
 String getSource()
          Specifies a reference to an external file resource.
 String getTarget()
          Specifies a reference to an external web page.
 boolean isExpired()
          Returns true if the current date is past the resource's expiration date and false otherwise.
 void setAltText(String value)
          Alternative text (alt text) is used as a replacement for an image, whenever the image cannot be seen.
 void setContentType(String value)
          Identifies the content type of the current resource.
 void setSource(String value)
          Specifies a reference to an external file resource.
 void setTarget(String value)
          Specifies a reference to an external web page.
 
Methods inherited from class com.adobe.icomm.assetplacement.model.PackageElement
getAttribute, getMetaData, remove, setAttribute, setMetaData
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getControllerID

public String getControllerID()
Return the controller id of the parent <resources> node.

Returns:
Value of the controller attribute of parent <resources> node, if any. Otherwise returns empty string.

getTarget

public String getTarget()
Specifies a reference to an external web page.

Returns:
the url to an external web page associated with this resource.

setTarget

public void setTarget(String value)
Specifies a reference to an external web page.

Parameters:
value - the new url to a web page associated with this resource.

getContentType

public String getContentType()
Identifies the content type of the current resource.

Returns:
the content type of the resource.

setContentType

public void setContentType(String value)
Identifies the content type of the current resource.

Parameters:
value - the new content type of this resource.

getExpiration

public String getExpiration()
Specifies the expiration date of a giving resource. This date must be specified as YYYY-MM-DD

Returns:
the expiration date of this resource.

isExpired

public boolean isExpired()
Returns true if the current date is past the resource's expiration date and false otherwise. A resource expiration date must be of the form YYYY-MM-DD. Resources with malformed dates will return false.

Returns:
boolean indicating whether expiration has occurred

getSource

public String getSource()
Specifies a reference to an external file resource.

Returns:
the external file resource that underlies this object.

setSource

public void setSource(String value)
Specifies a reference to an external file resource.

Parameters:
value - the new uri to the external file resource that underlies this object.

getAltText

public String getAltText()
Alternative text (alt text) is used as a replacement for an image, whenever the image cannot be seen. Every visible image should have alt text, unless the image is purely decorative, that is, it has no function and is used only for visual formatting or decoration. This text will also be used by screen readers and as the tooltip for the asset, if applicable.

Returns:
the alt text value of this resource.

setAltText

public void setAltText(String value)
Alternative text (alt text) is used as a replacement for an image, whenever the image cannot be seen. Every visible image should have alt text, unless the image is purely decorative, that is, it has no function and is used only for visual formatting or decoration. This text will also be used by screen readers and as the tooltip for the asset, if applicable.

Parameters:
value - the new alt text value.


[an error occurred while processing this directive] [an error occurred while processing this directive]