|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BusinessLayerFactory
Provides methods to create a business layer, its business layer items and views, custom and query script properties, lists of values, parameters, and object formats.
The business layer you create is validated at save time. See RelationalBusinessLayer
.
In this release, you can create the following types of lists of values:
See SlContext.getService(Class)
to get an instance of the factory.
Method Summary | ||
---|---|---|
AggregateIncompatibility |
createAggregateIncompatibility(RelationalBusinessLayer businessLayer)
Creates an aggregate incompatibility and adds it to the given relational business layer. |
|
|
createBlItem(java.lang.Class<T> type,
java.lang.String name,
BlContainer parent)
Creates a business layer item. |
|
BusinessHierarchicalLov |
createBusinessHierarchicalLov(java.lang.String name,
BusinessLayer businessLayer)
Creates a business hierarchical list of values and adds it to the given business layer. |
|
BusinessHierarchicalLovColumn |
createBusinessHierarchicalLovColumn(BusinessHierarchicalLov businessHierarchicalLov,
Dimension dimension)
Creates a column of business hierarchical list of values based on a dimension and adds it to the given list of values. |
|
BusinessLayerView |
createBusinessLayerView(java.lang.String name,
BusinessLayer businessLayer)
Creates a business layer view for the given business layer. |
|
BusinessQueryLov |
createBusinessQueryLov(java.lang.String name,
BusinessLayer businessLayer)
Creates a list of values based on a query built from business objects and adds it to the given business layer. |
|
CustomDateTimeFormat |
createCustomDateTimeFormat(BusinessObject businessObject)
Creates a custom date-time format and adds it to the given business object. |
|
CustomNumberFormat |
createCustomNumberFormat(BusinessObject businessObject)
Creates a custom number format and adds it to the given business object. |
|
CustomProperty |
createCustomProperty(java.lang.String key,
java.lang.String value,
BlItem blItem)
Creates a custom property for the given business layer item. |
|
CustomProperty |
createCustomProperty(java.lang.String key,
java.lang.String value,
BusinessLayer businessLayer)
Creates a custom property for the given business layer. |
|
CustomProperty |
createCustomProperty(java.lang.String key,
java.lang.String value,
Parameter parameter)
Creates a custom property for the given parameter. |
|
DateValue |
createDateValue(java.util.Date value)
Creates a value of type Date that can be used as an answer to a prompt. |
|
HierarchicalValue |
createHierarchicalValue()
Creates a value for an answer to a prompt that accepts hierarchical lists of values. |
|
IntervalAnswer |
createIntervalAnswer()
Creates an answer to a prompt that accepts a set of values between two values. |
|
MultipleValueAnswer |
createMultipleValueAnswer()
Creates an answer to a prompt that accepts multiple values. |
|
NavigationPath |
createNavigationPath(java.lang.String name,
BusinessLayer businessLayer)
Creates a custom navigation path and adds it to the given business layer. |
|
NumericValue |
createNumericValue(java.lang.Double value)
Creates a value of type Numeric that can be used as an answer to a prompt. |
|
Parameter |
createParameter(java.lang.String name,
BusinessLayer businessLayer)
Creates a parameter and adds it to the given business layer. |
|
Parameter |
createParameter(java.lang.String name,
DataFoundation dataFoundation)
Creates a parameter and attaches it to the given data foundation. |
|
PredefinedDateTimeFormat |
createPredefinedDateTimeFormat(BusinessObject businessObject)
Creates a predefined date-time format and adds it to the given business object. |
|
PredefinedNumberFormat |
createPredefinedNumberFormat(BusinessObject businessObject)
Creates a predefined number format and adds it to the given business object. |
|
QueryScriptProperty |
createQueryScriptProperty(java.lang.String key,
java.lang.String value,
BusinessLayer businessLayer)
Creates a custom query script property. |
|
RelationalBusinessLayer |
createRelationalBusinessLayer(java.lang.String name,
java.lang.String datafoundationPath)
Creates a relational business layer linked to a data foundation. |
|
SingleValueAnswer |
createSingleValueAnswer()
Creates an answer to a prompt that accepts a single value. |
|
SQLQueryLov |
createSQLQueryLov(java.lang.String name,
BusinessLayer businessLayer)
Creates an SQL-based list of values and adds it to the given business layer. |
|
StaticLov |
createStaticLov(java.lang.String name,
BusinessLayer businessLayer)
Creates a static list of values and adds it to the given business layer. |
|
StaticLovColumn |
createStaticLovColumn(java.lang.String name,
StaticLov staticLov)
Creates a column for a static list of values and adds it to the given list. |
|
StaticLovRow |
createStaticLovRow(StaticLov staticLov)
Creates a row for a static list of values and adds it to the given list. |
|
StringValue |
createStringValue(java.lang.String value)
Creates a value of type String that can be used as an answer to a prompt. |
Method Detail |
---|
RelationalBusinessLayer createRelationalBusinessLayer(java.lang.String name, java.lang.String datafoundationPath)
For example:
businessLayer = businessLayerFactory.createRelationalBusinessLayer("myBusinessLayer", "dfPath"); ...
name
- The business layer namedatafoundationPath
- The local path to an existing data foundation
RelationalBusinessLayer
object<T extends BlItem> T createBlItem(java.lang.Class<T> type, java.lang.String name, BlContainer parent)
Example:
SlContext context = ...; RelationalBusinessLayer businessLayer = ...; RootFolder rootFolder = businessLayer.getRootFolder(); BusinessLayerFactory businessLayerFactory = context.getService(BusinessLayerFactory.class); Dimension dimension = businessLayerFactory.createBlItem(Dimension.class, "New Dimension", rootFolder); dimension.setSelect("table.column");
type
- One of the following class objects:
name
- The business item nameparent
- The business item that will be the container of the business item to be created.
It must be attached directly or indirectly to a business layer.
See BlContainer.getChildren()
.
CustomProperty createCustomProperty(java.lang.String key, java.lang.String value, BusinessLayer businessLayer)
Example:
customProperty businessLayerFactory.createCustomProperty("MyKey", "MyValue", businessLayer); ...
key
- The key of the custom propertyvalue
- The value of the custom propertybusinessLayer
- The business layer to which the custom property is added
CustomProperty
objectCustomProperty createCustomProperty(java.lang.String key, java.lang.String value, BlItem blItem)
Example:
customProperty businessLayerFactory.createCustomProperty("MyDimKey", "MyDimValue", myDimension); ...
key
- The key of the custom propertyvalue
- The value of the custom propertyblItem
- The business layer item to which the custom property is added
CustomProperty
objectCustomProperty createCustomProperty(java.lang.String key, java.lang.String value, Parameter parameter)
Example:
customProperty businessLayerFactory.createCustomProperty("MyKey", "MyValue", myParameter); ...
key
- The key of the custom propertyvalue
- The value of the custom propertyarameter
- The parameter to which the custom property is added
CustomProperty
objectBusinessLayerView createBusinessLayerView(java.lang.String name, BusinessLayer businessLayer)
Example:
businessLayer = businessLayerFactory.createRelationalBusinessLayer("MyBusinessLayer", "dfPath"); ... BusinessLayerView view = businessLayerFactory.createBusinessLayerView("View", businessLayer); businessLayer.getBusinessLayerViews().add(view);
name
- The name of the business layer viewbusinessLayer
- The business layer to which the business layer view is added
BusinessLayerView
objectBusinessLayer.getBusinessLayerViews()
StaticLov createStaticLov(java.lang.String name, BusinessLayer businessLayer)
Example:
StaticLov staticLov = businessLayerFactory.createStaticLov("StaticLov", businessLayer); staticLov.setDescription("Description of StaticLov");
name
- The name of the list of valuesbusinessLayer
- The business layer
StaticLov
objectLov.setDescription(String)
StaticLovColumn createStaticLovColumn(java.lang.String name, StaticLov staticLov)
Example:
StaticLov staticLov = businessLayerFactory.createStaticLov("StaticLov", businessLayer); staticLov.setDescription("Description of StaticLov"); StaticLovColumn staticLovColumn1 = businessLayerFactory.createStaticLovColumn("Column1", staticLov); staticLovColumn1.setHidden(true); staticLovColumn1.setDataType(LovParameterDataType.NUMERIC); StaticLovColumn staticLovColumn2 = businessLayerFactory.createStaticLovColumn("Column2", staticLov); ...
name
- The column namestaticLov
- The static list of values
StaticLovColumn
objectStaticLovColumn.setHidden(boolean)
,
StaticLovColumn.setDataType(LovParameterDataType)
StaticLovRow createStaticLovRow(StaticLov staticLov)
Example:
StaticLov staticLov = businessLayerFactory.createStaticLov("StaticLov", businessLayer); ... StaticLovColumn staticLovColumn1 = businessLayerFactory.createStaticLovColumn("Column1", staticLov); ... StaticLovRow staticLovRow1 = businessLayerFactory.createStaticLovRow(staticLov); staticLovRow1.getValues().add(businessLayerFactory.createNumericValue(18.9)); staticLovRow1.getValues().add(businessLayerFactory.createStringValue("Value")); staticLovRow1.getValues().add(businessLayerFactory.createDateValue(Date.valueOf("2013-07-14"))); ...
staticLov
- The static list of values
StaticLovRow
objectcreateNumericValue(Double)
,
createStringValue(String)
,
createDateValue(Date)
,
StaticLovRow.getValues()
SQLQueryLov createSQLQueryLov(java.lang.String name, BusinessLayer businessLayer)
Example:
SQLQueryLov sqlQueryLov = businessLayerFactory.createSQLQueryLov("SQLQueryLov", businessLayer); sqlQueryLov.setDescription("Description of SQLQueryLov"); sqlQueryLov.setSQLExpression("SELECT * FROM CUSTORDER"); ...
name
- The name of the list of valuesbusinessLayer
- The business layer
SQLQueryLov
objectLov.setDescription(String)
,
SQLQueryLov.setSQLExpression(String)
BusinessHierarchicalLov createBusinessHierarchicalLov(java.lang.String name, BusinessLayer businessLayer)
Example:
BusinessHierarchicalLov businessHierarchicalLov = businessLayerFactory.createBusinessHierarchicalLov("BusinessHierarchicalLov", businessLayer); businessHierarchicalLov.setDescription("Description of BusinessHierarchicalLov"); ...
name
- The name of the list of valuesbusinessLayer
- The business layer
BusinessHierarchicalLov
objectLov.setDescription(String)
BusinessHierarchicalLovColumn createBusinessHierarchicalLovColumn(BusinessHierarchicalLov businessHierarchicalLov, Dimension dimension)
Example:
BusinessHierarchicalLov businessHierarchicalLov = businessLayerFactory.createBusinessHierarchicalLov("BusinessHierarchicalLov", businessLayer); businessHierarchicalLov.setDescription("Description of BusinessHierarchicalLov"); ... businessLayerFactory.createBusinessHierarchicalLovColumn(businessHierarchicalLov, dimension);
businessHierarchicalLov
- The list of valuesdimension
- The dimension
BusinessHierarchicalLov
objectLov.setDescription(String)
BusinessQueryLov createBusinessQueryLov(java.lang.String name, BusinessLayer businessLayer)
Example:
BusinessQueryLov businessQueryLov = businessLayerFactory.createBusinessQueryLov("BusinessQueryLov", businessLayer); businessQueryLov.setDescription("Description of BusinessQueryLov"); ...
name
- The name of the list of valuesbusinessLayer
- The business layer
BusinessQueryLov
objectLov.setDescription(String)
Parameter createParameter(java.lang.String name, DataFoundation dataFoundation)
Example:
Parameter parameter = businessLayerFactory.createParameter("prompt", dataFoundation); parameter.setUserPrompted(true); parameter.setPromptText(parameter.getName()); parameter.setDataType(LovParameterDataType.STRING); ... parameter.setAssociatedLov(staticLov.getColumns().get(1));
name
- The parameter namedataFoundation
- The data foundation
Parameter
objectParameter.setUserPrompted(boolean)
,
Parameter.setPromptText(String)
,
Parameter.setDataType(LovParameterDataType)
,
Parameter.setAssociatedLov(Object)
,
StaticLov.getColumns()
SingleValueAnswer createSingleValueAnswer()
SingleValueAnswer
objectMultipleValueAnswer createMultipleValueAnswer()
MultipleValueAnswer
objectIntervalAnswer createIntervalAnswer()
Example:
... IntervalAnswer answer = businessLayerFactory.createIntervalAnswer(); answer.setLowValue(businessLayerFactory.createStringValue("value1")); answer.setHighValue(businessLayerFactory.createStringValue("value2"));
IntervalAnswer
objectcreateStringValue(String)
,
IntervalAnswer.setLowValue(TypedValue)
,
IntervalAnswer.setHighValue(TypedValue)
StringValue createStringValue(java.lang.String value)
value
- The answer value
StringValue
objectDateValue createDateValue(java.util.Date value)
value
- The answer value
DateValue
objectNumericValue createNumericValue(java.lang.Double value)
value
- The answer value
NumericValue
objectHierarchicalValue createHierarchicalValue()
HierarchicalValue
objectParameter createParameter(java.lang.String name, BusinessLayer businessLayer)
Example:
Parameter parameter = businessLayerFactory.createParameter("prompt", businessLayer); parameter.setUserPrompted(true); parameter.setPromptText(parameter.getName()); parameter.setDataType(LovParameterDataType.STRING); ... parameter.setAssociatedLov(staticLov.getColumns().get(1));
name
- The parameter namebusinessLayer
- The business layer to which the parameter is added
Parameter
objectParameter.setUserPrompted(boolean)
,
Parameter.setPromptText(String)
,
Parameter.setDataType(LovParameterDataType)
,
Parameter.setAssociatedLov(Object)
,
StaticLov.getColumns()
AggregateIncompatibility createAggregateIncompatibility(RelationalBusinessLayer businessLayer)
Example:
AggregateIncompatibility aggregateIncompatibility = businessLayerFactory.createAggregateIncompatibility(businessLayer); aggregateIncompatibility.setTableName(dataFoundationService.getTableFullName(table));
businessLayer
- The business layer to which the incompatibility is added
AggregateIncompatibility
objectNavigationPath createNavigationPath(java.lang.String name, BusinessLayer businessLayer)
Example:
NavigationPath navigationPath = businessLayerFactory.createNavigationPath("NavigationPath", businessLayer); navigationPath.setDescription("My description of NavigationPath"); Dimension dimension = (Dimension) businessLayerService.getBlItem(businessLayer, "Dimperiod\\Date", true); navigationPath.getDimensions().add(dimension);
name
- The name of the navigation pathbusinessLayer
- The business layer to which the navigation path is added
NavigationPath
objectPredefinedDateTimeFormat createPredefinedDateTimeFormat(BusinessObject businessObject)
Example:
PredefinedDateTimeFormat dateTimeFormat = businessLayerFactory.createPredefinedDateTimeFormat(businessObject); dateTimeFormat.setFormat(PredefinedDateTimeFormatTypes.ShortDate););
businessObject
- The business object to which the date format is set
PredefinedDateTimeFormat
objectCustomDateTimeFormat createCustomDateTimeFormat(BusinessObject businessObject)
Example:
CustomDateTimeFormat dateTimeFormat = businessLayerFactory.createCustomDateTimeFormat(businessObject); dateTimeFormat.setDateTimeFormat().setFormat("mm'/'yyyy"); dateTimeFormat.setDateTimeFormat().setColor(FormatColor.RED); dateTimeFormat.setUndefinedFormat().setFormat("Date error");
businessObject
- The business object to which the date format is set
CustomDateTimeFormat
objectPredefinedNumberFormat createPredefinedNumberFormat(BusinessObject businessObject)
Example:
PredefinedNumberFormat numberFormat = businessLayerFactory.createPredefinedNumberFormat(businessObject); numberFormat.setFormat(PredefinedNumberFormatTypes.Boolean);
businessObject
- The business object to which the number format is set
PredefinedNumberFormat
objectCustomNumberFormat createCustomNumberFormat(BusinessObject businessObject)
Example:
CustomNumberFormat numberFormat = businessLayerFactory.createCustomNumberFormat(businessObject); numberFormat.getPositiveFormat().setFormat("-#"); numberFormat.getNegativeFormat().setFormat("-#"); numberFormat.getNegativeFormat().setColor(FormatColor.RED); numberFormat.getZeroFormat().setFormat("-#"); numberFormat.getUndefinedFormat().setFormat("Number error");
businessObject
- The business object to which the number format is set
CustomNumberFormat
objectQueryScriptProperty createQueryScriptProperty(java.lang.String key, java.lang.String value, BusinessLayer businessLayer)
Example:
queryScriptProperty businessLayerFactory.createQueryScriptProperty("MyKey", "MyValue"); ...
key
- The key of the query script propertyvalue
- The value of the query script propertybusinessLayer
- The business layer to which the custom query script property is added
QueryScriptProperty
object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |