public class MappingsStrategyContext extends Object implements MappingsStrategy
Constructor and Description |
---|
MappingsStrategyContext(MappingsStrategy strategy)
Creates context with needed strategy to resolve URLs.
|
MappingsStrategyContext(MappingsStrategy strategy,
MappingsStrategyContext next)
Creates context with needed strategy to resolve URLs.
|
Modifier and Type | Method and Description |
---|---|
PublicationMapping |
resolvePublicationMapping(int namespaceId,
String siteUrl)
Resolves publication based on publication namespace and url.
|
PublicationMapping |
resolvePublicationMapping(String url)
Resolves publication based on publication identifier.
|
public MappingsStrategyContext(MappingsStrategy strategy)
strategy
- default mapping strategypublic MappingsStrategyContext(MappingsStrategy strategy, MappingsStrategyContext next)
strategy
- default mapping strategynext
- is a strategy context which will be added into the chain of responsibility.public PublicationMapping resolvePublicationMapping(String url)
MappingsStrategy
resolvePublicationMapping
in interface MappingsStrategy
url
- publication identifier. (Can be full url or publication property)public PublicationMapping resolvePublicationMapping(int namespaceId, String siteUrl)
MappingsStrategy
resolvePublicationMapping
in interface MappingsStrategy
namespaceId
- publication namespace id.siteUrl
- publication site url.Copyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries