Composite Application Services and Data
Types
In this topic, you can find an overview of frequently used services and data types that are used in developing cross applications with CAF. They are delivered with the standard CAF core project.
For more information about the CAF core project, see Projects of Composite Application Services.
Application Service Name |
Description |
ClassificationApplication |
Contains operations to work with classification assignments. You use this service to create and maintain hierarchical folder structures or to assign categories to Business entity. As a result, you can filter objects, for example, in SAP NetWeaver Business Intelligence (BI). |
DocContent |
Contains methods for: ● Uploading and downloading document content ● Operations to lock and unlock a document in KM ● Versioning of documents (create new versions, get version list, and so on)
|
Business Entity Services |
Description |
Persistency |
Category |
You use it to store the data of all hierarchical structures. |
Local Database Persistency |
CategoryAssignment |
You use it to store the assignment of category hierarchies to BO nodes. |
Local Database Persistency |
Discussion |
A discussion is a structured collection of replies from different users to an initial post. To trigger a discussion, enter a post or enter replies to existing discussions. |
KM back-end persistency |
DiscussionRoom |
It allows you to:
● Handle the members list of the discussion and restrict access to discussion only for members in that list ● Hold multiple discussions at the same time |
KM back-end persistency |
Topic |
You use it together with Discussion to indicate the subject for discussion. |
KM back-end persistency |
Pricipal |
You use it together with DiscussionRoom to list the invitees to a discussion. |
Retrieves data from UME |
Document |
You use it to store document header (meta-attributes such as path, title, or description) |
KM back-end persistency |
RelatedObject |
It is located within the business object Document and represents collection of resource identifiers (all KM objects that reference this document). |
Local database persistency |
ExchangeRateService |
Contains an operation that convert value from one currency to another for a particular date. |
None |
UnitConversionSimpleService |
Contains an operation that convert value from one unit of measurement to another. |
None |
UnitOfMeasurementService |
Contains an operation which returns all available units of measurement. |
None |

The above listed services are used in creating entity services. For more information about incorporating these services in your entity service, see Designing Services in CAF Core → Service Modeling →Modeling Entity Services.
For more information about the services used in creating application services, see Services and Concepts → Service Types →Application Services.
Basic Simple Types
Type Name |
Java Type |
Built-In Type |
com.sap.caf.base.base64Binary |
byte[] |
string |
com.sap.caf.base.hexBinary |
byte[] |
string |
com.sap.caf.base.boolean |
boolean |
long |
com.sap.caf.base.byte |
short |
short |
com.sap.caf.base.date |
java.sql.Date |
date |
com.sap.caf.base.decimal |
java.math.BigDecimal |
decimal(18, 17) |
com.sap.caf.base.double |
double |
double |
com.sap.caf.base.float |
float |
float |
com.sap.caf.base.integer |
Int |
Integer |
com.sap.caf.base.bigInteger |
java.math.BigInteger |
decimal(31,0) |
com.sap.caf.base.long |
long |
long |
com.sap.caf.base.short |
short |
short |
com.sap.caf.base.string |
java.lang.String |
string |
com.sap.caf.base.time |
javal.sql.Time |
time |
com.sap.caf.base.timestamp |
java.util.date |
timestamp |
com.sap.caf.base.unsignedByte |
short |
short |
com.sap.caf.base.unsignedInt |
int |
integer |
com.sap.caf.base.unsignedLong |
long |
long |
com.sap.caf.base.unsignedShort |
short |
short |
Type Name |
Description |
CategoryDS |
Represents category as a root folder of a hierarchical structure. Categories are assigned to a business entity type. |
FolderDS |
Represents category as a root folder of a hierarchical structure. Categories are assigned to a business entity type. |
NamesDS |
You can use it when you work with language dependent values or edit categories for a particular locale. |
Quantity |
Represents quantity in a particular unit of measurement. You can use it for unit conversion. |
Amount |
Represents amount of money in particular currency. You can use it for currency conversion. |
DocumentLockInfo |
Represents information for document locking. This type is used by DocContent application service. |
You define entity service attribute data types by selecting from predefined lists delivered with the Composite Application Services (CAS) plug-in to SAP NetWeaver Developer Studio. Core dictionary data types are defined below and delivered with the following constraints, when noted.
Data Types |
Description |
com.sap.caf.core.currency |
Currency code |
com.sap.caf.core.id |
Technical identifier of a business entity |
com.sap.caf.core.longText |
String with maximum length 256 |
com.sap.caf.core.rid |
Resource ID |
com.sap.caf.core.shortText |
String with maximum length 30 |
com.sap.caf.core.unit |
Measurement unit code |
com.sap.caf.core.userId |
Unique ID of a user |
com.sap.caf.core.value |
java.math.BigDecimal, stored as decimal(18, 17) |
com.sap.caf.core.xLongText |
String with no maximum length |

Base data types are reserved for external services only and are not to be used for modeling entity service attributes in CAS.
You can find certain fault types delivered and installed with CAF Core application. They are listed in the table below.
Exception Name |
Java Class Name |
Description |
CAFBaseException |
com.sap.caf.rt.exception.CAFBaseException |
Used by the CAF framework. |
BEException |
com.sap.caf.rt.exception.CAFBEException |
Used by the CAF framework. |
CAFCreateException |
com.sap.caf.rt.exception.CAFCreateException |
Thrown when the creation of a Business entity instance failed. |
CAFDeleteException |
com.sap.caf.rt.exception.CAFDeleteException |
Thrown when the deletion of a Business entity instance failed. |
CAFDataAccessException |
com.sap.caf.rt.exception.CAFDataAccessException |
|
CAFFindException
|
com.sap.caf.rt.exception.CAFFindException |
Thrown when the search of a Business entity instance failed. |
CAFLockException
|
com.sap.caf.rt.exception.CAFLockException |
A base class for CAFOptimisticLockException and CAFPessimisticLockException. Thrown when pessimistic or optimistic locking prevents the business entity service operation from successful execution. |
CAFPermissionException |
com.sap.caf.rt.exception.CAFPermissionException |
Thrown when the user does not have the necessary permissions for the operation. |
CAFRetrieveException |
com.sap.caf.rt.exception.CAFRetrieveException |
Thrown from the read operation when the requested Business entity instance was not found. |
ServiceException |
com.sap.caf.rt.exception.CAFServiceException |
Used by the CAF framework. |
CAFUpdateException |
com.sap.caf.rt.exception.CAFUpdateException |
Thrown when the update of a Business entity instance failed. |
CAFOptimisticLockException
|
com.sap.caf.rt.exception.CAFOptimisticLockException |
Thrown when optimistic locking prevents the Business entity instance from being updated (the instance has been changed in the backend since the last read operation).
|
CAFPessimisticLockException |
com.sap.caf.rt.exception.CAFPessimisticLockException |
Thrown when the Business entity instance is locked pessimistically (using the locking methods in com.sap.caf.rt.bol.IBusinessEntityService) in another thread.
|