Class DisplayResourceCommand

  • All Implemented Interfaces:
    org.apache.commons.chain.Command

    public class DisplayResourceCommand
    extends Object
    implements org.apache.commons.chain.Command
    Created by The eXo Platform SAS .
    the command to output nt:resource to Servlet Response gets DefaultKeys.PATH attrribute from the Context and acts as follow: - if there is nt:resource Node on DefaultKeys.PATH displays it - otherwise recursively tries to get nt:resource from incoming node's primary items and display it - throws PathNotFoundException if no such a node found WARNING: this mechanizm is not suitable for big files streaming as uses byte arry buffer for data transfer!
    Version:
    $Id: DisplayResourceCommand.java 13861 2007-03-28 11:31:16Z vetal_ok $
    Author:
    Gennady Azarenkov
    • Field Detail

      • DEFAULT_MAPPING

        public static String DEFAULT_MAPPING
      • DEFAULT_ENCODING

        public static String DEFAULT_ENCODING
    • Constructor Detail

      • DisplayResourceCommand

        public DisplayResourceCommand()
    • Method Detail

      • execute

        public boolean execute​(org.apache.commons.chain.Context context)
                        throws Exception
        Specified by:
        execute in interface org.apache.commons.chain.Command
        Throws:
        Exception
      • getPathKey

        public String getPathKey()
        Returns:
        path Key