public abstract class DependencyDeferredContentTargetModelElement
extends org.springframework.extensions.surf.extensibility.impl.DefaultContentModelElement
implements org.springframework.extensions.surf.extensibility.DeferredContentTargetModelElement
| Constructor and Description |
|---|
DependencyDeferredContentTargetModelElement(String id,
String directiveName) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
dependencyAlreadyRequested(String dep)
Checks whether or not the supplied dependency has already been requested.
|
void |
enterEditMode(String mode,
org.springframework.extensions.surf.extensibility.DeferredContentSourceModelElement sourceElement)
Moves the
DeferredContentTargetModelElement instance into "editMode". |
void |
exitEditMode()
Resets the
editMode index to -1 (to indicate that we're out of "edit" mode) and clears the
previously populated List of DeferredContentSourceModelElement instances. |
protected abstract String |
getResourceControllerMapping()
This method must be implemented to return the mapping to the resource controller, e.g.
|
List<org.springframework.extensions.surf.extensibility.DeferredContentSourceModelElement> |
getSourceElements() |
void |
markDependencyAsRequested(String dep)
This method can be used to indicate that the supplied dependency has been requested by other means.
|
protected String |
normaliseDependency(String dependency)
This method can be used to normalise supplied dependencies such that they are all referenced from the
same location and that there are no duplicate forward slashes.
|
void |
registerDeferredSourceElement(org.springframework.extensions.surf.extensibility.DeferredContentSourceModelElement sourceElement) |
equals, flushContent, getNextContentBufferElement, getType, hashCode, parseContent, validateContentgetDirectiveName, getId, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic List<org.springframework.extensions.surf.extensibility.DeferredContentSourceModelElement> getSourceElements()
List of DeferredContentSourceModelElement instances registered with this
DeferredContentTargetModelElement instance.public void registerDeferredSourceElement(org.springframework.extensions.surf.extensibility.DeferredContentSourceModelElement sourceElement)
registerDeferredSourceElement in interface org.springframework.extensions.surf.extensibility.DeferredContentTargetModelElementpublic void enterEditMode(String mode, org.springframework.extensions.surf.extensibility.DeferredContentSourceModelElement sourceElement)
Moves the DeferredContentTargetModelElement instance into "editMode". It checks that that the DeferredContentSourceModelElement
argument has previously registered for inclusion in the output and then sets the editMode variable to be the
correct index for inserting subsequent requests.
enterEditMode in interface org.springframework.extensions.surf.extensibility.DeferredContentTargetModelElementpublic void exitEditMode()
Resets the editMode index to -1 (to indicate that we're out of "edit" mode) and clears the
previously populated List of DeferredContentSourceModelElement instances.
exitEditMode in interface org.springframework.extensions.surf.extensibility.DeferredContentTargetModelElementpublic boolean dependencyAlreadyRequested(String dep)
Checks whether or not the supplied dependency has already been requested.
dep - The path to the dependency to check.true if the dependency has already been requested and false otherwise.public void markDependencyAsRequested(String dep)
This method can be used to indicate that the supplied dependency has been requested by other means.
This is provided to ensure that dependencies requested directly on the output stream (e.g. via the
JavaScriptDependencyDirective, CssDependencyDirective, etc.)
dep - The path to the dependency to mark as requested.protected abstract String getResourceControllerMapping()
This method must be implemented to return the mapping to the resource controller, e.g. "/share/res/"
Copyright © 2005–2016 Alfresco Software. All rights reserved.