Package com.day.cq.wcm.foundation
Class External
- java.lang.Object
-
- com.day.cq.wcm.foundation.External
-
public class External extends java.lang.ObjectProvides convenience methods for rendering external application paragraphs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classExternal.LimitLimit enumeration.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPN_HEIGHTHeight property.static java.lang.StringPN_INCLUSIONInclusion property.static java.lang.StringPN_LIMITLimit property.static java.lang.StringPN_PASSPARAMSPass parameters property.static java.lang.StringPN_TARGETTarget property.static java.lang.StringPN_WIDTHWidth property.static java.lang.StringPV_FIXEDFixed property value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddraw(SlingHttpServletRequest request, SlingHttpServletResponse response)Draw this component.java.lang.StringgetHeight()Return the height as a string.External.LimitgetLimit()Return the limit.ResourcegetResource()Returns the underlying resource.java.lang.StringgetTarget()Return the target of the external application component.java.lang.StringgetWidth()Return the width as a string.booleanhasContent()Checks if this external component has content.booleanisFixed()Return a flag indicating whether the external site should be included adaptive (rewritten html) or fixed (as an IFRAME).booleanpassParameters()Return a flag indicating whether parameters should be passed to the external site.voidsetTarget(java.lang.String target)Override the target to display.
-
-
-
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- resourcepage- pagespoolSelector- spool selectorpostSelector- post selectortargetParam- 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:
trueif 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:
trueif the parameters should be passed;falseotherwise
-
isFixed
public boolean isFixed()
Return a flag indicating whether the external site should be included adaptive (rewritten html) or fixed (as an IFRAME).- Returns:
trueif the external site should be included fixed;falseotherwise
-
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
-
draw
public void draw(SlingHttpServletRequest request, SlingHttpServletResponse response) throws java.io.IOException
Draw this component.- Parameters:
request- requestresponse- response- Throws:
java.io.IOException
-
-