Package com.day.cq.wcm.foundation
Class External
java.lang.Object
com.day.cq.wcm.foundation.External
Provides convenience methods for rendering external application paragraphs.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringHeight property.static final StringInclusion property.static final StringLimit property.static final StringPass parameters property.static final StringTarget property.static final StringWidth property.static final StringFixed property value. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(SlingHttpServletRequest request, SlingHttpServletResponse response) Draw this component.Return the height as a string.getLimit()Return the limit.Returns the underlying resource.Return the target of the external application component.getWidth()Return the width as a string.booleanChecks 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).booleanReturn a flag indicating whether parameters should be passed to the external site.voidOverride the target to display.
-
Field Details
-
PN_TARGET
Target property.- See Also:
-
PN_INCLUSION
Inclusion property.- See Also:
-
PN_LIMIT
Limit property.- See Also:
-
PN_PASSPARAMS
Pass parameters property.- See Also:
-
PN_WIDTH
Width property.- See Also:
-
PN_HEIGHT
Height property.- See Also:
-
PV_FIXED
Fixed property value.- See Also:
-
-
Constructor Details
-
External
public External(Resource resource, Page page, String spoolSelector, String postSelector, String targetParam) Creates a new external based on the given resource- Parameters:
resource- resourcepage- pagespoolSelector- spool selectorpostSelector- post selectortargetParam- target param- Throws:
IllegalArgumentException- if the given resource is not adaptable to node.
-
-
Method Details
-
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
Return the target of the external application component.- Returns:
- target
-
setTarget
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
Return the width as a string. If none is found, returns "100%".- Returns:
- width
-
getHeight
Return the height as a string. If none is found, returns "100%".- Returns:
- height
-
getLimit
Return the limit.- Returns:
- limit
-
draw
public void draw(SlingHttpServletRequest request, SlingHttpServletResponse response) throws IOException Draw this component.- Parameters:
request- requestresponse- response- Throws:
IOException
-