public class LayoutServiceImpl extends AbstractServiceImpl implements LayoutService
| Constructor and Description |
|---|
LayoutServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
AttributePlaceholderModel |
createAttributePlaceholder(PlaceholderTemplateModel template,
String qualifier,
List<AttributeDescriptorModel> ad)
Creates a new attribute placeholder.
|
ClassificationAttributePlaceholderModel |
createClassificationAttributePlaceholder(PlaceholderTemplateModel template,
String qualifier,
ClassAttributeAssignmentModel assignment)
Creates a new classification attribute placeholder.
|
protected Map<String,Object> |
createEmptyLocMap() |
ExpressionPlaceholderModel |
createExpressionPlaceholder(PlaceholderTemplateModel template,
String qualifer)
Creates a new expression placeholder.
|
PlaceholderTemplateModel |
createPlaceholderTemplate(CometConfigurationModel cfg,
String type,
String code)
Creates a new placeholder template.
|
List<CometConfigurationModel> |
getAllCometConfigurations()
Finds all comet configurations.
|
List<MediaModel> |
getAlternativeMedias(PlaceholderTemplateModel placeholderTemplate,
ItemModel item) |
List<HybrisEnumValue> |
getAvailableGridModes()
Returns all grid mode enums.
|
List<GridModel> |
getAvailableGrids(CometConfigurationModel cfg)
Finds all grids within a specified comet configuration.
|
List<LayoutTemplateModel> |
getAvailableLayoutTemplates(CometConfigurationModel cfg,
String type)
Finds all layout templates applicable to a given type within a specified comet configuration.
|
List<LayoutTemplateModel> |
getAvailableLayoutTemplates(PlaceholderTemplateModel placeholderTemplate)
Finds all layout templates applicable to a given PlaceholderTemplate.
|
List<MasterPageModel> |
getAvailableMasterPages(String type)
Finds all master pages applicable to a given type.
|
List<HybrisEnumValue> |
getAvailablePageAlignments()
Returns all page alignment enums.
|
List<PageFormatModel> |
getAvailablePageFormats()
Returns all page formats available within the system.
|
List<HybrisEnumValue> |
getAvailablePageStates()
Returns all page states enums.
|
List<HybrisEnumValue> |
getAvailablePageTypes()
Returns all page type enums.
|
List<PlaceholderTemplateModel> |
getAvailablePlaceholderTemplates(CometConfigurationModel cfg,
String type)
Finds all placeholder templates applicable to a given type within a specified comet configuration.
|
Collection<HybrisEnumValue> |
getAvailablePlaceholderTypes()
Returns all available placeholder types for
PlaceholderModel.getPlaceholderType(). |
Collection<HybrisEnumValue> |
getAvailablePlaceholderValueTypes()
Returns all available placeholder value types
|
List<HybrisEnumValue> |
getAvailablePlacementModes() |
LayoutTemplateModel |
getDefaultLayoutTemplate(PageModel page,
PlaceholderTemplateModel placeholderTemplate,
PlacementModel uiPlacement,
ItemModel placementItem,
SpreadPosition gridType)
Returns default layout template for this placement but.
|
PlaceholderTemplateModel |
getDefaultPlaceholderTemplate(PageModel page,
PlacementModel uiPlacement,
ItemModel placementItem)
Determines the default placeholder template for a given placement and placed item.
|
HybrisEnumValue |
getDefaultPlaceholderType()
Returns the default placeholder type when creating a new (unspecified) placeholder.
|
HybrisEnumValue |
getDefaultPlaceholderType(AttributeDescriptorModel attribute)
Returns the default placeholder type when creating a new attribute placeholder.
|
HybrisEnumValue |
getDefaultPlaceholderType(ClassAttributeAssignmentModel assignmnet)
Returns the default placeholder type when creating a new classification attribute placeholder.
|
HybrisEnumValue |
getDefaultPlaceholderValueType()
Returns the default placeholder value type when creating a new (unspecified) placeholder.
|
HybrisEnumValue |
getDefaultPlaceholderValueType(AttributeDescriptorModel attribute)
Returns the default placeholder value type when creating a new attribute placeholder.
|
HybrisEnumValue |
getDefaultPlaceholderValueType(ClassAttributeAssignmentModel assignmnet)
Returns the default placeholder type when creating a new classification attribute placeholder.
|
String |
getDisplayName(PlacementModel placementModel)
Calculates the dynamic display name of the given placement.
|
GridModel |
getGrid(CometConfigurationModel cfg,
int id)
Fetches a grid by its id.
|
int[] |
getPageDimensions(PageModel pageModel)
Compute width and height only once for all images
|
String |
getPlaceholderSource(PlaceholderModel placeholder) |
Map<String,String> |
getPlaceholderValue(PlaceholderTemplateModel template,
ItemModel item)
Calculates all placeholder values for a placeholder template applied to a item.
|
String |
getPreview(PlacementModel placement)
Calculates the dynamic preview for the given placement.
|
List<LayoutTemplateModel> |
getUnassignedLayoutTemplates(CometConfigurationModel cfg)
Finds all layout templates which haven't been assigned to any placeholder template yet.
|
Object |
getValue(PlaceholderModel placeholder,
PlacementModel placement)
Calculates the actual value for a given placeholder applied to a placement.
|
protected Object |
getValue(PlaceholderModel placeholder,
PlacementModel placementModel,
Item item) |
LayoutTemplateModel |
loadLayoutTemplate(PlaceholderTemplateModel placeholderTemplate,
LayoutTemplate templ) |
PlaceholderTemplateModel |
loadPlaceholderTemplate(PlaceholderTemplate pt) |
protected PlaceholderTemplateModel |
loadPlaceholderTemplateReferences(PlaceholderTemplateModel me,
PlaceholderTemplate orig) |
protected List<LayoutTemplate> |
queryLayoutTemplates(CometConfigurationModel cfg,
String type)
Finds layout templates by given type.
|
protected List<PlaceholderTemplate> |
queryPlaceholderTemplates(CometConfigurationModel cfg,
String type,
boolean includeSuperType)
Finds all placeholder templates matching the given type.
|
protected Map<Language,Object> |
unmapLocMap(Map<String,Object> src) |
getEnum, getEnums, getModelService, setModelServicepublic AttributePlaceholderModel createAttributePlaceholder(PlaceholderTemplateModel template, String qualifier, List<AttributeDescriptorModel> ad)
LayoutServicecreateAttributePlaceholder in interface LayoutServicetemplate - the enclosing templatequalifier - the qualifierad - the attribute descriptor pathpublic ClassificationAttributePlaceholderModel createClassificationAttributePlaceholder(PlaceholderTemplateModel template, String qualifier, ClassAttributeAssignmentModel assignment)
LayoutServicecreateClassificationAttributePlaceholder in interface LayoutServicetemplate - the enclosing templatequalifier - TODOassignment - the class-attribute assignmentpublic ExpressionPlaceholderModel createExpressionPlaceholder(PlaceholderTemplateModel template, String qualifer)
LayoutServicecreateExpressionPlaceholder in interface LayoutServicetemplate - the enclosing placeholder templatequalifer - the qualifierpublic PlaceholderTemplateModel createPlaceholderTemplate(CometConfigurationModel cfg, String type, String code)
LayoutServicecreatePlaceholderTemplate in interface LayoutServicecfg - the enclosing comet configurationtype - the associated composed typecode - the codepublic List<CometConfigurationModel> getAllCometConfigurations()
LayoutServicegetAllCometConfigurations in interface LayoutServicepublic List<MediaModel> getAlternativeMedias(PlaceholderTemplateModel placeholderTemplate, ItemModel item)
getAlternativeMedias in interface LayoutServicepublic List<HybrisEnumValue> getAvailableGridModes()
LayoutServicegetAvailableGridModes in interface LayoutServicepublic List<HybrisEnumValue> getAvailablePlacementModes()
getAvailablePlacementModes in interface LayoutServicepublic List<GridModel> getAvailableGrids(CometConfigurationModel cfg)
LayoutServicegetAvailableGrids in interface LayoutServicecfg - the comet configurationpublic List<LayoutTemplateModel> getAvailableLayoutTemplates(CometConfigurationModel cfg, String type)
LayoutServicegetAvailableLayoutTemplates in interface LayoutServicecfg - the comet configurationtype - the type to matchpublic List<LayoutTemplateModel> getAvailableLayoutTemplates(PlaceholderTemplateModel placeholderTemplate)
LayoutServicegetAvailableLayoutTemplates in interface LayoutServiceplaceholderTemplate - the placeholderTemplate to matchpublic List<MasterPageModel> getAvailableMasterPages(String type)
LayoutServicegetAvailableMasterPages in interface LayoutServicetype - the type to match.public List<HybrisEnumValue> getAvailablePageAlignments()
LayoutServicegetAvailablePageAlignments in interface LayoutServicepublic List<PageFormatModel> getAvailablePageFormats()
LayoutServicegetAvailablePageFormats in interface LayoutServicepublic List<HybrisEnumValue> getAvailablePageStates()
LayoutServicegetAvailablePageStates in interface LayoutServicepublic List<HybrisEnumValue> getAvailablePageTypes()
LayoutServicegetAvailablePageTypes in interface LayoutServicepublic List<PlaceholderTemplateModel> getAvailablePlaceholderTemplates(CometConfigurationModel cfg, String type)
LayoutServicegetAvailablePlaceholderTemplates in interface LayoutServicecfg - the comet configurationtype - the type to matchpublic Collection<HybrisEnumValue> getAvailablePlaceholderTypes()
LayoutServicePlaceholderModel.getPlaceholderType().getAvailablePlaceholderTypes in interface LayoutServicepublic Collection<HybrisEnumValue> getAvailablePlaceholderValueTypes()
LayoutServicegetAvailablePlaceholderValueTypes in interface LayoutServicepublic LayoutTemplateModel getDefaultLayoutTemplate(PageModel page, PlaceholderTemplateModel placeholderTemplate, PlacementModel uiPlacement, ItemModel placementItem, SpreadPosition gridType)
getDefaultLayoutTemplate in interface LayoutServicepublic PlaceholderTemplateModel getDefaultPlaceholderTemplate(PageModel page, PlacementModel uiPlacement, ItemModel placementItem)
LayoutServicegetDefaultPlaceholderTemplate in interface LayoutServiceuiPlacement - the placement to place the item intoplacementItem - the placed itempublic HybrisEnumValue getDefaultPlaceholderType()
LayoutServicegetDefaultPlaceholderType in interface LayoutServicepublic HybrisEnumValue getDefaultPlaceholderType(AttributeDescriptorModel attribute)
LayoutServicegetDefaultPlaceholderType in interface LayoutServicepublic HybrisEnumValue getDefaultPlaceholderType(ClassAttributeAssignmentModel assignmnet)
LayoutServicegetDefaultPlaceholderType in interface LayoutServicepublic HybrisEnumValue getDefaultPlaceholderValueType()
LayoutServicegetDefaultPlaceholderValueType in interface LayoutServicepublic HybrisEnumValue getDefaultPlaceholderValueType(AttributeDescriptorModel attribute)
LayoutServicegetDefaultPlaceholderValueType in interface LayoutServicepublic HybrisEnumValue getDefaultPlaceholderValueType(ClassAttributeAssignmentModel assignmnet)
LayoutServicegetDefaultPlaceholderValueType in interface LayoutServicepublic String getDisplayName(PlacementModel placementModel)
LayoutServicegetDisplayName in interface LayoutServicepublic GridModel getGrid(CometConfigurationModel cfg, int id)
LayoutServicegetGrid in interface LayoutServicepublic String getPlaceholderSource(PlaceholderModel placeholder)
getPlaceholderSource in interface LayoutServicepublic Map<String,String> getPlaceholderValue(PlaceholderTemplateModel template, ItemModel item)
LayoutServicegetPlaceholderValue in interface LayoutServicetemplate - the placeholder template to get values foritem - the item to read values frompublic String getPreview(PlacementModel placement)
LayoutServicegetPreview in interface LayoutServicepublic List<LayoutTemplateModel> getUnassignedLayoutTemplates(CometConfigurationModel cfg)
LayoutServicegetUnassignedLayoutTemplates in interface LayoutServicepublic Object getValue(PlaceholderModel placeholder, PlacementModel placement)
LayoutServicegetValue in interface LayoutServiceplaceholder - the placeholder which describes the valueplacement - the placement which holds the data itemprotected Object getValue(PlaceholderModel placeholder, PlacementModel placementModel, Item item)
public LayoutTemplateModel loadLayoutTemplate(PlaceholderTemplateModel placeholderTemplate, LayoutTemplate templ)
public PlaceholderTemplateModel loadPlaceholderTemplate(PlaceholderTemplate pt)
protected PlaceholderTemplateModel loadPlaceholderTemplateReferences(PlaceholderTemplateModel me, PlaceholderTemplate orig)
protected List<LayoutTemplate> queryLayoutTemplates(CometConfigurationModel cfg, String type)
cfg - the comet configuration to search withintype - the item type to macthprotected List<PlaceholderTemplate> queryPlaceholderTemplates(CometConfigurationModel cfg, String type, boolean includeSuperType)
cfg - the comet cfgtype - the typeincludeSuperType - whether or not to search for templates matching the type's super typespublic int[] getPageDimensions(PageModel pageModel)
LayoutServicegetPageDimensions in interface LayoutServiceCopyright © 2017 SAP SE. All Rights Reserved.