@Exported public class DefaultBuildersFactory extends Object implements BuildersFactory
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
log |
Constructor and Description |
---|
DefaultBuildersFactory(ICS ics) |
Modifier and Type | Method and Description |
---|---|
void |
addSessionVariable(String name,
String value) |
void |
addVariable(String name,
String value) |
AssetId |
getAssetId()
Get the current asset id in the scope, for ICS, it will get it from c/cid combinations
|
String |
getCookie(String name) |
void |
logAssetDeps(AssetId... assetIds) |
void |
logDeps(String... deps) |
List<AssetId> |
lookUp(String assetType,
String assetName,
String siteName) |
LinkInfo |
newAssetLinkInfo() |
AssetReader |
newAssetReader() |
BlobLinkInfo |
newBlobLinkInfo() |
EditableTemplateFragment<?> |
newEditableTemplateFragment()
Returns a new
EditableTemplateFragment instance. |
ElementFragment<?> |
newElementFragment()
Returns a new
ElementFragment instance. |
Filter |
newFilter(String left,
BinaryRelationalOperator operator,
String right,
String... more)
Returns a new
Filter which can be used in a search query. |
<F extends Fragment> |
newFragmentList()
Returns an empty list typed for fragments.
|
<F extends EditableTemplateFragment<F>> |
newFragmentList(int initialSize,
F prototype)
Returns a list of the specified size initially filled with fragments based on a prototype fragment.
|
LegacyLinkInfo |
newLegacyAssetLinkInfo() |
LegacyBlobLinkInfo |
newLegacyBlobLinkInfo() |
LinkFactory |
newLinkFactory() |
NavigationReader |
newNavigationReader() |
OrderBuilder.OrderChainBuilder<?> |
newOrderChain(SortDirection direction,
String sortField,
String... more)
Returns a new
OrderBuilder.OrderChainBuilder instance which can be further built upon for creating a list orders for using in a search query. |
OrderBuilder.OrderChainBuilder<?> |
newOrderChain(String sortField,
String... more)
Returns a new
OrderBuilder.OrderChainBuilder instance which can be further built upon for creating a list orders for using in a search query. |
RecommendationReader |
newRecommendationReader() |
Searcher |
newSearcher()
Returns a
Searcher which can be further built upon for creating a search query. |
SiteEntryFragment<?> |
newSiteEntryFragment()
Returns a new
SiteEntryFragment instance. |
oracle.fatwire.api.TableReader |
newTableReader()
Returns a new link TableReader which can be used to query Sites managed tables
|
TemplateFragment<?> |
newTemplateFragment()
Returns a new
TemplateFragment instance. |
void |
removeSessionVariable(String name) |
void |
removeVariable(String name) |
void |
setCookie(String name,
String value,
int timeout,
String url,
String domain,
boolean bSecure) |
public DefaultBuildersFactory(ICS ics)
public AssetId getAssetId()
getAssetId
in interface BuildersFactory
public oracle.fatwire.api.TableReader newTableReader()
newTableReader
in interface BuildersFactory
public Searcher newSearcher()
BuildersFactory
Searcher
which can be further built upon for creating a search query.newSearcher
in interface BuildersFactory
Searcher
instance.public Filter newFilter(String left, BinaryRelationalOperator operator, String right, String... more)
BuildersFactory
Filter
which can be used in a search query.
This filter may be used to build more complex filters (see composite Filter
instances).
Once ready, the filter maybe used in a query by invoking the Searcher
filter(Filter)
method.newFilter
in interface BuildersFactory
left
- leftoperator
- operatorright
- rightmore
- moreFilter
instance.
see
Filter
FilterBuilder
Searcherpublic OrderBuilder.OrderChainBuilder<?> newOrderChain(String sortField, String... more)
BuildersFactory
OrderBuilder.OrderChainBuilder
instance which can be further built upon for creating a list orders for using in a search query.
The Orders
instance is obtained by invoking the OrderBuilder.OrderChainBuilder
build()
method.
This Orders
instance can then be used in a query by invoking the Searcher
orderBy(Orders)
method.
This method is equivalent to invoking newOrderChain(SortDirection.ASCENDING, String, String...)
.newOrderChain
in interface BuildersFactory
sortField
- sortFieldmore
- moreOrderBuilder.OrderChainBuilder
instance.Order
Searcher
public OrderBuilder.OrderChainBuilder<?> newOrderChain(SortDirection direction, String sortField, String... more)
BuildersFactory
OrderBuilder.OrderChainBuilder
instance which can be further built upon for creating a list orders for using in a search query.
The Orders
instance is obtained by invoking the OrderBuilder.OrderChainBuilder
build()
method.
This Orders instance can then be used in a query by invoking the Searcher
orderBy(Orders)
method.newOrderChain
in interface BuildersFactory
direction
- directionsortField
- sortFieldmore
- moreOrderBuilder.OrderChainBuilder
instance.
see
Orders
Order
Searcherpublic TemplateFragment<?> newTemplateFragment()
BuildersFactory
TemplateFragment
instance.newTemplateFragment
in interface BuildersFactory
public EditableTemplateFragment<?> newEditableTemplateFragment()
BuildersFactory
EditableTemplateFragment
instance.newEditableTemplateFragment
in interface BuildersFactory
public SiteEntryFragment<?> newSiteEntryFragment()
BuildersFactory
SiteEntryFragment
instance.newSiteEntryFragment
in interface BuildersFactory
public ElementFragment<?> newElementFragment()
BuildersFactory
ElementFragment
instance.newElementFragment
in interface BuildersFactory
public <F extends Fragment> List<F> newFragmentList()
BuildersFactory
newFragmentList
in interface BuildersFactory
public <F extends EditableTemplateFragment<F>> List<EditableTemplateFragment<?>> newFragmentList(int initialSize, F prototype)
BuildersFactory
newFragmentList
in interface BuildersFactory
F
- any subclass of Fragment which can be copied
any subclass of Fragment which can be copied.initialSize
- the initial size of the list.
The template based on which the fragments are created and populated into the list.prototype
- list containing prototyped fragments.public AssetReader newAssetReader()
newAssetReader
in interface BuildersFactory
public RecommendationReader newRecommendationReader()
newRecommendationReader
in interface BuildersFactory
public NavigationReader newNavigationReader()
newNavigationReader
in interface BuildersFactory
public LinkFactory newLinkFactory()
newLinkFactory
in interface BuildersFactory
public LinkInfo newAssetLinkInfo()
newAssetLinkInfo
in interface BuildersFactory
public BlobLinkInfo newBlobLinkInfo()
newBlobLinkInfo
in interface BuildersFactory
public LegacyLinkInfo newLegacyAssetLinkInfo()
newLegacyAssetLinkInfo
in interface BuildersFactory
public LegacyBlobLinkInfo newLegacyBlobLinkInfo()
newLegacyBlobLinkInfo
in interface BuildersFactory
public void logDeps(String... deps)
logDeps
in interface BuildersFactory
public void logAssetDeps(AssetId... assetIds)
logAssetDeps
in interface BuildersFactory
public void addSessionVariable(String name, String value)
addSessionVariable
in interface BuildersFactory
public void removeSessionVariable(String name)
removeSessionVariable
in interface BuildersFactory
public void addVariable(String name, String value)
addVariable
in interface BuildersFactory
public void removeVariable(String name)
removeVariable
in interface BuildersFactory
public void setCookie(String name, String value, int timeout, String url, String domain, boolean bSecure)
setCookie
in interface BuildersFactory
public String getCookie(String name)
getCookie
in interface BuildersFactory