Class External


  • public class External
    extends java.lang.Object
    Provides convenience methods for rendering external application paragraphs.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  External.Limit
      Limit enumeration.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String PN_HEIGHT
      Height property.
      static java.lang.String PN_INCLUSION
      Inclusion property.
      static java.lang.String PN_LIMIT
      Limit property.
      static java.lang.String PN_PASSPARAMS
      Pass parameters property.
      static java.lang.String PN_TARGET
      Target property.
      static java.lang.String PN_WIDTH
      Width property.
      static java.lang.String PV_FIXED
      Fixed property value.
    • Constructor Summary

      Constructors 
      Constructor Description
      External​(Resource resource, Page page, java.lang.String spoolSelector, java.lang.String postSelector, java.lang.String targetParam)
      Creates a new external based on the given resource
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void draw​(SlingHttpServletRequest request, SlingHttpServletResponse response)
      Draw this component.
      java.lang.String getHeight()
      Return the height as a string.
      External.Limit getLimit()
      Return the limit.
      Resource getResource()
      Returns the underlying resource.
      java.lang.String getTarget()
      Return the target of the external application component.
      java.lang.String getWidth()
      Return the width as a string.
      boolean hasContent()
      Checks if this external component has content.
      boolean isFixed()
      Return a flag indicating whether the external site should be included adaptive (rewritten html) or fixed (as an IFRAME).
      boolean passParameters()
      Return a flag indicating whether parameters should be passed to the external site.
      void setTarget​(java.lang.String target)
      Override the target to display.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PN_TARGET

        public static final java.lang.String PN_TARGET
        Target property.
        See Also:
        Constant Field Values
      • PN_INCLUSION

        public static final java.lang.String PN_INCLUSION
        Inclusion property.
        See Also:
        Constant Field Values
      • PN_LIMIT

        public static final java.lang.String PN_LIMIT
        Limit property.
        See Also:
        Constant Field Values
      • PN_PASSPARAMS

        public static final java.lang.String PN_PASSPARAMS
        Pass parameters property.
        See Also:
        Constant Field Values
      • PN_WIDTH

        public static final java.lang.String PN_WIDTH
        Width property.
        See Also:
        Constant Field Values
      • PN_HEIGHT

        public static final java.lang.String PN_HEIGHT
        Height property.
        See Also:
        Constant Field Values
      • PV_FIXED

        public static final java.lang.String PV_FIXED
        Fixed property value.
        See Also:
        Constant Field Values
    • Constructor Detail

      • External

        public External​(Resource resource,
                        Page page,
                        java.lang.String spoolSelector,
                        java.lang.String postSelector,
                        java.lang.String targetParam)
        Creates a new external based on the given resource
        Parameters:
        resource - resource
        page - page
        spoolSelector - spool selector
        postSelector - post selector
        targetParam - target param
        Throws:
        java.lang.IllegalArgumentException - if the given resource is not adaptable to node.
    • Method Detail

      • getResource

        public Resource getResource()
        Returns the underlying resource.
        Returns:
        the resource
      • hasContent

        public boolean hasContent()
        Checks if this external component has content.
        Returns:
        true if this download has content.
      • getTarget

        public java.lang.String getTarget()
        Return the target of the external application component.
        Returns:
        target
      • setTarget

        public void setTarget​(java.lang.String target)
        Override the target to display.
        Parameters:
        target - target
      • passParameters

        public boolean passParameters()
        Return a flag indicating whether parameters should be passed to the external site.
        Returns:
        true if the parameters should be passed; false otherwise
      • isFixed

        public boolean isFixed()
        Return a flag indicating whether the external site should be included adaptive (rewritten html) or fixed (as an IFRAME).
        Returns:
        true if the external site should be included fixed; false otherwise
      • getWidth

        public java.lang.String getWidth()
        Return the width as a string. If none is found, returns "100%".
        Returns:
        width
      • getHeight

        public java.lang.String getHeight()
        Return the height as a string. If none is found, returns "100%".
        Returns:
        height
      • getLimit

        public External.Limit getLimit()
        Return the limit.
        Returns:
        limit