Class ClientlibExternalUri
- java.lang.Object
-
- com.composum.sling.clientlibs.handle.ClientlibExternalUri
-
- All Implemented Interfaces:
ClientlibElement
public class ClientlibExternalUri extends Object implements ClientlibElement
Models a reference to external URLs - as links, js or css.
-
-
Field Summary
Fields Modifier and Type Field Description protected ClientlibLink
link
-
Constructor Summary
Constructors Constructor Description ClientlibExternalUri(Clientlib.Type type, String uri, Map<String,String> properties)
Creates the element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(ClientlibVisitor visitor, ClientlibVisitor.VisitorMode mode, ClientlibResourceFolder parent)
Calls the visitor with modeClientlibVisitor.VisitorMode.DEPENDS
, since external references are never embedded.ClientlibRef
getRef()
Clientlib.Type
getType()
The resource-type for which it was created.ClientlibLink
makeLink()
Creates aClientlibLink
to this element.String
toString()
-
-
-
Field Detail
-
link
protected final ClientlibLink link
-
-
Constructor Detail
-
ClientlibExternalUri
public ClientlibExternalUri(Clientlib.Type type, String uri, Map<String,String> properties)
Creates the element.- Parameters:
type
- the type of the linkuri
- the URL (HTTP/HTTPS/protocol omitted)properties
- optionally, additional properties
-
-
Method Detail
-
accept
public void accept(ClientlibVisitor visitor, ClientlibVisitor.VisitorMode mode, ClientlibResourceFolder parent)
Calls the visitor with modeClientlibVisitor.VisitorMode.DEPENDS
, since external references are never embedded.- Specified by:
accept
in interfaceClientlibElement
- Parameters:
visitor
- the visitor we want to dispatch tomode
- processing modeparent
- if applicable, the parent of the visited resource
-
getType
public Clientlib.Type getType()
Description copied from interface:ClientlibElement
The resource-type for which it was created.- Specified by:
getType
in interfaceClientlibElement
-
makeLink
public ClientlibLink makeLink()
Description copied from interface:ClientlibElement
Creates aClientlibLink
to this element.- Specified by:
makeLink
in interfaceClientlibElement
-
getRef
public ClientlibRef getRef()
Description copied from interface:ClientlibElement
Returns aClientlibRef
ClientlibRef.isSatisfiedby(ClientlibLink)
ClientlibElement.makeLink()
. This is either a fresh one, or, in case of files, the one with which the file was located.- Specified by:
getRef
in interfaceClientlibElement
-
-