com.sap.sl.sdk.authoring.businesslayer
Interface BusinessLayerService


public interface BusinessLayerService

Provides services for business layer objects.


Method Summary
 IStatus addCoreUniverses(java.lang.String blPath, java.util.List<java.lang.String> unxIdentifiers)
          Adds core universes to a linked universe.
 void detectLovColumns(BusinessQueryLov businessQueryLov)
          Creates the columns of the list of values from the query specification on which the list of values is based.
 void detectLovColumns(SQLQueryLov sqlQueryLov)
          Creates the columns of the list of values from the SQL expression on which the list of values is based.
 BlItem getBlItem(BusinessLayer businessLayer, java.lang.String path, boolean failed)
          Returns a business item from its full path.
 java.lang.String getBlItemPath(BlItem item)
          Generates the full path of a business item in the CMS repository.
 java.util.List<java.lang.String> getImplicitTables(BlItem blItem)
          Returns the list of implicit tables of a business item.
 IStatus includeCoreUniverses(java.lang.String blPath, java.util.List<java.lang.String> unxIdentifiers)
          Integrates core universe components into a linked universe (folders, objects, tables, joins, views, and so on).
 IStatus refreshUniverseReferences(java.lang.String blPath)
          Updates the paths or names of the core universes used in a linked universe.
 IStatus removeCoreUniverses(java.lang.String blPath, java.util.List<java.lang.String> unxIdentifiers)
          Removes core universes from a linked universe.
 IStatus synchronizeCoreUniverses(java.lang.String blPath, java.util.List<java.lang.String> unxIdentifiers)
          Synchronizes core universe components of a linked universe with their latest versions in the CMS repository (folders, objects, tables, joins, views, and so on).
 IStatus validateBusinessFilterExpression(java.lang.String expression)
          Validates the expression of a business filter.
 IStatus validateBusinessQueryLovExpression(java.lang.String expression)
          Validates the business query of a list of values.
 

Method Detail

getImplicitTables

java.util.List<java.lang.String> getImplicitTables(BlItem blItem)
Returns the list of implicit tables of a business item.

It contains the tables on which the business item is based. It means that implicit tables are those of the SQL expression attached to a business item. For example, the "Product Id" dimension, whose SELECT is "PRODUCT.PRODUCT_ID", has the table "PRODUCT" as implicit table. The list cannot be modified.

The tables of the list belong to the business layer persisted physically on the machine (.blx file). Implicit tables do not comprise extra tables. If an implicit table is added as an extra table to the business item, then the table is ignored and removed from the list of extra tables at save time.

Parameters:
blItem - The business item
Returns:
A List containing the names of the implicit tables
Since:
14.1.2

detectLovColumns

void detectLovColumns(SQLQueryLov sqlQueryLov)
Creates the columns of the list of values from the SQL expression on which the list of values is based.

This method detects the columns from the SQL expression and then creates the columns of the SQLQueryLov object. The columns cannot be edited (adding, modifying, removing).

After the expression is edited, this method needs to be used so that columns can be computed. When the business layer is saved and loaded, the columns are computed automatically.

Example:

 SQLQueryLov sqlQueryLov = businessLayerFactory.createSQLQueryLov("SQLQueryLov", businessLayer);
 sqlQueryLov.setDescription("Description of SQLQueryLov");
 sqlQueryLov.setSQLExpression("SELECT * FROM CUSTORDER");
 ...
 BusinessLayerService businessLayerService = context.getService(BusinessLayerService.class);
 businessLayerService.detectLovColumns(sqlQueryLov);
 

Parameters:
sqlQueryLov - The list of values attached to a data foundation
Since:
14.1.3
See Also:
BusinessLayerFactory.createSQLQueryLov(String, BusinessLayer), Lov.setDescription(String), SQLQueryLov.setSQLExpression(String), SlContext.getService(Class)

detectLovColumns

void detectLovColumns(BusinessQueryLov businessQueryLov)
Creates the columns of the list of values from the query specification on which the list of values is based.

This method detects the columns from the query specification and then creates the columns of the BusinessQueryLov object. The columns cannot be edited (adding, modifying, removing).

After the expression is edited, this method needs to be used so that columns can be computed. When the business layer is saved and loaded, the columns are computed automatically.

Example:

 BusinessQueryLov businessQueryLov = businessLayerFactory.createBusinessQueryLov("BusinessQueryLov", businessLayer);
 businessQueryLov.setDescription("Description of BusinessQueryLov");
 businessQueryLov.setExpression("...");
 ...
 BusinessLayerService businessLayerService = context.getService(BusinessLayerService.class);
 businessLayerService.detectLovColumns(businessQueryLov);
 

Parameters:
businessQueryLov - The list of values attached to a business layer
Since:
14.2.3
See Also:
BusinessLayerFactory.createBusinessQueryLov(String, BusinessLayer), Lov.setDescription(String), BusinessQueryLov.setExpression(String), SlContext.getService(Class)

getBlItemPath

java.lang.String getBlItemPath(BlItem item)
Generates the full path of a business item in the CMS repository.

The full path is based on the non-localized name of the business item.

Full paths adhere to the following rules:

Examples:

Parameters:
item - The business item
Returns:
A string that represents the full path
Since:
14.1.5
See Also:
getBlItem(BusinessLayer, String, boolean)

getBlItem

BlItem getBlItem(BusinessLayer businessLayer,
                 java.lang.String path,
                 boolean failed)
Returns a business item from its full path.

Parameters:
businessLayer - A business layer
path - The item full path
failed - If true, an exception is raised (item not found)
Returns:
A BlItem object, or null if item is not found and failed set to false
Since:
14.1.5
See Also:
getBlItemPath(BlItem)

addCoreUniverses

IStatus addCoreUniverses(java.lang.String blPath,
                         java.util.List<java.lang.String> unxIdentifiers)
Adds core universes to a linked universe.

Parameters:
blPath - The path of the local business layer with a secured connection, for example C:\BusinessLayers\myProject.blx
unxIdentifiers - Identifiers of the core universes stored in the CMS repository. They can be the following:
  • A list of strings that represent the paths of the universes in the CMS repository that you want to retrieve from the Universes root folder. See CmsResourceService.UNIVERSES_ROOT.

    Example: /Universes/myCmsFolder/MyUniverse.unx

  • A list of strings that represent the unique identifiers of the universes in the CMS repository

    Example: AUkhFsg72ntHpql8Izl9pv0

Returns:
An IStatus object
Since:
14.2.3
See Also:
removeCoreUniverses(String blPath, List< String > unxIdentifiers)

removeCoreUniverses

IStatus removeCoreUniverses(java.lang.String blPath,
                            java.util.List<java.lang.String> unxIdentifiers)
Removes core universes from a linked universe.

Parameters:
blPath - The path of the local business layer with a secured connection, for example C:\BusinessLayers\myProject.blx
unxIdentifiers - Identifiers of the core universes stored in the CMS repository. They can be the following:
  • A list of strings that represent the paths of the universes in the CMS repository that you want to retrieve from the Universes root folder. See CmsResourceService.UNIVERSES_ROOT.

    Example: /Universes/myCmsFolder/MyUniverse.unx

  • A list of strings that represent the unique identifiers of the universes in the CMS repository

    Example: AUkhFsg72ntHpql8Izl9pv0

Returns:
An IStatus object
Since:
14.2.3
See Also:
addCoreUniverses(String blPath, List< String > unxIdentifiers)

includeCoreUniverses

IStatus includeCoreUniverses(java.lang.String blPath,
                             java.util.List<java.lang.String> unxIdentifiers)
Integrates core universe components into a linked universe (folders, objects, tables, joins, views, and so on).

The components of the core universes are copied to the business layer and the underlying data foundation. They become editable in the linked universe.

The links to the core universes are broken. The core universes are removed from the list of core universes.

Parameters:
blPath - The path of the local business layer with a secured connection, for example C:\BusinessLayers\myProject.blx
unxIdentifiers - Identifiers of the core universes stored in the CMS repository. They can be the following:
  • A list of strings that represent the paths of the universes in the CMS repository that you want to retrieve from the Universes root folder. See CmsResourceService.UNIVERSES_ROOT.

    Example: /Universes/myCmsFolder/MyUniverse.unx

  • A list of strings that represent the unique identifiers of the universes in the CMS repository

    Example: AUkhFsg72ntHpql8Izl9pv0

Returns:
An IStatus object
Since:
14.2.3

synchronizeCoreUniverses

IStatus synchronizeCoreUniverses(java.lang.String blPath,
                                 java.util.List<java.lang.String> unxIdentifiers)
Synchronizes core universe components of a linked universe with their latest versions in the CMS repository (folders, objects, tables, joins, views, and so on).

Synchronizing means updating, adding, or removing core universe components from the local, linked business layer.

The core universes are synchronized if their revision numbers have been modified, that is, if new revisions have been published.

If the core universes have been moved or renamed in the CMS repository, run refreshUniverseReferences(String) before you synchronize them.

Parameters:
blPath - The path of the local business layer with a secured connection, for example C:\BusinessLayers\myProject.blx
unxIdentifiers - Identifiers of the core universes stored in the CMS repository. They can be the following:
  • A list of strings that represent the paths of the universes in the CMS repository that you want to retrieve from the Universes root folder. See CmsResourceService.UNIVERSES_ROOT.

    Example: /Universes/myCmsFolder/MyUniverse.unx

  • A list of strings that represent the unique identifiers of the universes in the CMS repository

    Example: AUkhFsg72ntHpql8Izl9pv0

Returns:
An IStatus object
Since:
14.2.3
See Also:
refreshUniverseReferences(String)

refreshUniverseReferences

IStatus refreshUniverseReferences(java.lang.String blPath)
Updates the paths or names of the core universes used in a linked universe.

Use this method if core universes have been moved or renamed.

Parameters:
blPath - The path of the local business layer with a secured connection, for example C:\BusinessLayers\myProject.blx
Returns:
An IStatus object
Since:
14.2.3

validateBusinessFilterExpression

IStatus validateBusinessFilterExpression(java.lang.String expression)
Validates the expression of a business filter.

Use this method to check the XML query against its XSD.

You can also validate the expression through its business fiter by using BusinessFilter.validateExpression().

Parameters:
expression - The expression of the business filter
Returns:
An IStatus object
Since:
14.2.3

validateBusinessQueryLovExpression

IStatus validateBusinessQueryLovExpression(java.lang.String expression)
Validates the business query of a list of values.

Use this method to check the XML expression against its XSD.

You can also validate the expression through its list of values by using BusinessQueryLov.validateExpression().

Parameters:
expression - The expression of the list of values
Returns:
An IStatus object
Since:
14.2.3
See Also:
BusinessQueryLov


© Copyright 2016 SAP SE or an SAP affiliate company. All rights reserved.