Document Tree
Document Properties
Kbid
285A56
Last Modified
04-Feb-2020
Added to KB
01-Feb-2018
Public Access
Everyone
Status
Online
Doc Type
References
Product
  • ICM 7.10
  • ICM 11
  • ICM 12
ISML Tag - ISRESOURCE

Name

 ISRESOURCE

Short Description

 puts a (File-)Resource into the pipeline dictionary

Table of Contents

 

Product Version

7.10

Product To Version

 
Status

Introduction

The <ISRESOURCE> is similar to the <ISFILE> tag, but can be used outside of an <ISFILEBUNDLE> tag.

Sometimes, you need to use the attributes of a FileResource, like LastModified. In these cases, you can easily create a resource with the <ISRESOURCE> tag.

Syntax

<isResource
  file = "{relative target path}"
  [name = "{name of the FileResource in the pipeline-dictionary}"]>

Example

<isresource file="aPath/aFileRef.css" name="TheFile">

Puts a FileResource for aPath/aFileRef.css under the name TheFile into the pipeline dictionary.

<isresource file="aPath/aFileRef.css">

Puts a FileResource for aPath/aFileRef.css under the name Resource into the pipeline dictionary.

Attributes

file

The file attribute is required.

It must contain the relative path to an file.

name

The name attribute is optional.

It contains the name of the created FileResource for the later usage. If no name is given, FILERES will be the name of the FileResource.

Returns

Resource

The resource is the implementation of the interface com.intershop.beehive.core.capi.resource.Resource.

Resource
/**
 * This is an abstract resource which can be an array of bytes or file on the
 * file system specified through a relative path.
 */
public interface Resource
{
    /**
     * Returns the name of this resource. If the resource is a file, this is the
     * relative path of resource file.
     * 
     * @return
     *      the name of the resource
     */
    public String getName();
    
    /**
     * Returns date of the last modification of this resource. If the resource
     * is a file, this method accessed the file system.
     * 
     * @return
     *      the date of the last modification
     */
    public long getLastModified();
    
    /**
     * Returns true if there is data behind this resource.
     * For example, a file-resource would return true if the file exists, and false if not.
     * @return false if there is no data present for this resource.
     */
    public boolean exists();
        
    /**
     * Returns the same then the method exist. But the signature will be found by the isml-lookup.
     * @see Resource#exists()
     * @return false if the underlying resource does not exist.
     */
    default public boolean getDoExist()
    {
        return exists();
    }
}

The resource has the here important methods getName(), getLastModified() and getDoExist().

Example Calls

<isresource file="/css/test.css" name="TheFile">
<isprint value="#TheFile:Name#">
<isprint value="#TheFile:DoExist#">
<isprint value="#TheFile:LastModified#">

Reference - ISML Tags

Disclaimer
The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.
The Intershop Knowledge Portal uses only technically necessary cookies. We do not track visitors or have visitors tracked by 3rd parties. Please find further information on privacy in the Intershop Privacy Policy and Legal Notice.
Home
Knowledge Base
Product Releases
Log on to continue
This Knowledge Base document is reserved for registered customers.
Log on with your Intershop Entra ID to continue.
Write an email to supportadmin@intershop.de if you experience login issues,
or if you want to register as customer.