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()booleanIndicates if the value returned bygetIncomingURL()is a regex expression rather than a concrete URI.voidvoidsetIncomingURL(String incomingURL) voidvoidsetRegexHandler(boolean regexHandler) Deprecated.voidsetRegexHandler(Boolean regexHandler) Indicates if the value set by the methodsetIncomingURL(String)should be treated as a regex expression rather than as a concrete URI.voidsetUrlRedirectType(URLRedirectType redirectType)
-
Field Details
-
id
-
incomingURL
-
newURL
-
urlRedirectType
-
isRegex
protected boolean isRegex
-
-
Constructor Details
-
URLHandlerDTO
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceURLHandler
-
setId
- Specified by:
setIdin interfaceURLHandler
-
getIncomingURL
- Specified by:
getIncomingURLin interfaceURLHandler
-
setIncomingURL
- Specified by:
setIncomingURLin interfaceURLHandler
-
getNewURL
- Specified by:
getNewURLin interfaceURLHandler
-
setNewURL
- Specified by:
setNewURLin interfaceURLHandler
-
isRegexHandler
public boolean isRegexHandler()Description copied from interface:URLHandlerIndicates if the value returned bygetIncomingURL()is a regex expression rather than a concrete URI. Default is false.- Specified by:
isRegexHandlerin interfaceURLHandler- Returns:
-
setRegexHandler
Deprecated.- Specified by:
setRegexHandlerin interfaceURLHandler
-
setRegexHandler
Description copied from interface:URLHandlerIndicates if the value set by the methodsetIncomingURL(String)should be treated as a regex expression rather than as a concrete URI.- Specified by:
setRegexHandlerin interfaceURLHandler
-
getUrlRedirectType
- Specified by:
getUrlRedirectTypein interfaceURLHandler
-
setUrlRedirectType
- Specified by:
setUrlRedirectTypein interfaceURLHandler
-
createOrRetrieveCopyInstance
public <G extends URLHandler> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException Description copied from interface:MultiTenantCloneableClone 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 { CreateResponsecreateResponse = context.createOrRetrieveCopyInstance(this); MyClass myClone = createResponse.getClone(); //copy extended field values on myClone here
return createResponse; }
- Specified by:
createOrRetrieveCopyInstancein 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
-