Class URLHandlerDTO
java.lang.Object
org.broadleafcommerce.cms.url.domain.URLHandlerDTO
- All Implemented Interfaces:
Serializable
,URLHandler
,MultiTenantCloneable<URLHandler>
- Direct Known Subclasses:
NullURLHandler
A bean representation of a URLHandler
- Author:
- bpolster
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<G extends URLHandler>
CreateResponse<G>Clone this entity for the purpose of multiple tenancy.getId()
boolean
Indicates if the value returned bygetIncomingURL()
is a regex expression rather than a concrete URI.void
void
setIncomingURL
(String incomingURL) void
void
setRegexHandler
(boolean regexHandler) Deprecated.void
setRegexHandler
(Boolean regexHandler) Indicates if the value set by the methodsetIncomingURL(String)
should be treated as a regex expression rather than as a concrete URI.void
setUrlRedirectType
(URLRedirectType redirectType)
-
Field Details
-
id
-
incomingURL
-
newURL
-
urlRedirectType
-
isRegex
protected boolean isRegex
-
-
Constructor Details
-
URLHandlerDTO
-
-
Method Details
-
getId
- Specified by:
getId
in interfaceURLHandler
-
setId
- Specified by:
setId
in interfaceURLHandler
-
getIncomingURL
- Specified by:
getIncomingURL
in interfaceURLHandler
-
setIncomingURL
- Specified by:
setIncomingURL
in interfaceURLHandler
-
getNewURL
- Specified by:
getNewURL
in interfaceURLHandler
-
setNewURL
- Specified by:
setNewURL
in interfaceURLHandler
-
isRegexHandler
public boolean isRegexHandler()Description copied from interface:URLHandler
Indicates if the value returned bygetIncomingURL()
is a regex expression rather than a concrete URI. Default is false.- Specified by:
isRegexHandler
in interfaceURLHandler
- Returns:
-
setRegexHandler
Deprecated.- Specified by:
setRegexHandler
in interfaceURLHandler
-
setRegexHandler
Description copied from interface:URLHandler
Indicates if the value set by the methodsetIncomingURL(String)
should be treated as a regex expression rather than as a concrete URI.- Specified by:
setRegexHandler
in interfaceURLHandler
-
getUrlRedirectType
- Specified by:
getUrlRedirectType
in interfaceURLHandler
-
setUrlRedirectType
- Specified by:
setUrlRedirectType
in interfaceURLHandler
-
createOrRetrieveCopyInstance
public <G extends URLHandler> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException Description copied from interface:MultiTenantCloneable
Clone this entity for the purpose of multiple tenancy. Note, extending classes should follow this pattern:public CreateResponse<MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException { CreateResponse<MyClass> createResponse = super.createOrRetrieveCopyInstance(context); if (createResponse.isAlreadyPopulated()) { return createResponse; } MyClass myClone = createResponse.getClone();
Support should also be added for @Embeddable classes that contribute fields (collections or basic) to a cloneable entity://copy extended field values on myClone here
return createResponse; }
public CreateResponse<G extends MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException { CreateResponse
createResponse = context.createOrRetrieveCopyInstance(this); MyClass myClone = createResponse.getClone(); //copy extended field values on myClone here
return createResponse; }
- Specified by:
createOrRetrieveCopyInstance
in interfaceMultiTenantCloneable<URLHandler>
- Parameters:
context
- a context object providing persistence and library functionality for copying entities- Returns:
- the resulting copy container, possibly already persisted
- Throws:
CloneNotSupportedException
- if there's a problem detected with the cloning configuration
-