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 String
Height property.static final String
Inclusion property.static final String
Limit property.static final String
Pass parameters property.static final String
Target property.static final String
Width property.static final String
Fixed property value. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
draw
(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.boolean
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
Return a flag indicating whether parameters should be passed to the external site.void
Override 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:
true
if 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:
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
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
-