!--a11y-->
Global Services for the Framework 
Global services provide essential functions for the framework. The following section briefly describes the purpose of the following services:
· Application Log
· Cache
· Mime Handler
· Notificator
· Object Type Handler
· Application Properties
· Publishing Pipeline
· Relation Service
· Scheduler Service
· System Landscape
· Task Queue Service
· URI Mapper
· URL Generator
The service provides logging functions for services and applications using the Knowledge Management framework.
The cache service creates and manages caches that speed up the access to resources. Features of the service allow you to define the properties of a cache, to add or remove entries from it or to access information about it.
The cache service operates with pointers. When an object is added to the cache, a pointer referencing the object is set. The object itself resides in memory. Setting the pointer protects the object against the garbage collection mechanism that deletes any objects from memory that are not referenced by a pointer. If the garbage collector registers that a pointer to an object exists, it does not delete the object from memory.
For more information, see the Javadocpackage com.sapportals.wcm.service.cache
The service provides information about the mime type of a resource’s content. Mime types are mapped to file extensions and associated with icons. The information is contained in the IMime object. It is the task of the mime handler IMimeHandlerService to return the IMime object for a given RID, using the RID’s extension. Typically, applications need to know which mime type is associated with a particular resource, RID or file extension and which icon must be used to represent the mime type. For example, when an application presents a list of files to a user, it needs to know which icon must be displayed for each file type and can ask the mime handler to supply this information.

The extension .GIF is mapped to the MIME type image/gif and
the icon image.gif
stored in /etc/public/mimes/images. The extenstion.HTML is
mapped to the MIME type text/htmland the icon html.gif.
The mime handler is sometimes required to translate file endings into mime types. For example, when the Netscape browser is used, it only recognizes mime types and not file extensions. For this reason, a file can only be opened with the Netscape browser if its extension has been translated into a mime type with the help of the mime handler service.
The service offers applications and KM components a mechanism for sending notifications to recipients via email or SMS. In addition it provides support for compiling the contents and layout of notifications.
Notifications are predefined forms that an
application sends to users. For example, the subscription service uses
notifications to inform users that a document has changed. To use the service,
an application creates its own notifications either by implementing the
INotification
interface or by extending AbstractNotification,
which already includes property-based handling of XML/XSLT.
The application provides the properties that represent the data that is sent.
The XML files represent the language-specific texts that are included in the
notification. The XSLT specifies how the properties and the content of the XML
are merged to build the content for a certain output channel, for example, for
an email message. The notification is sent with the INotificatorService’s send() method.
For more information, see the Javadoc package com.sapportals.wcm.service.notificator
The
service defines IActions for
resources. The actions are selected using a combination of RIDs (using
wildcards) and the resource type. A developer specifies the IActions in
an .oth XML file
that is stored in the /etc/oth directory, together with the selection criteria. Each XML file
specifies an IObjectTypeHandler. An application can retrieve the IActions by
getting the appropriate IObjectTypeHandlers, which match the specified criteria, using the
IObjectTypeHandlerService’s
getObjectTypeHandler()methods.
For example, the action inbox uses the IActions, to determine the available actions for the several types of action inbox items.
Fro more information, see the package com.sapportals.wcm.service.objecttypehandler
The service enables applications to store information related to resources as properties on the database. The application properties are different to system or custom properties. They simply represent a container for any type of information which is related to a resource and is written to a table of the database. A common use is to store user-specific information for a resource.
For more information, see the package. com.sapportals.wcm.repository.service.appproperties
The service provides the technical infrastructure that enables the transformation of resource content from one format to another or from one layout to another. When a filter has been defined for a particular file extension, mime type or folder, it is the pipeline that actually executes the transformation process specified by the filter.
The IPipelineService enables the transformation with the help of:
a object.RequestData back to a specific output format, for example, back
to a stream. In addition, the IXsltPipelineService also offers convenient methods for the creation of a pipeline that processes XML with XSLT.
For more information, see the Javadoc package description com.sapportals.wcm.service.notificator
The IRelationService stores relations between repository framework objects. Relations belong to a relation type that defines the type of objects are related to each other, and the roles of the source and target in the relation. For example, the relation type attachments links two resources, where document is the source to which the target is attached.
The
operands are represented as IRelationOperands, and their type as
IRelationOperandType. Currently supported types are
IResourceOperandType, which represents resources as operands and
IStringOperandType, represent non-resource objects that are identified
by a unique key. A tuple expressing a relationship like document A is attached to
document B is
represented as an IRelation
object.
The relation service offers methods for the fast retrieval of relations associated with a resource or an object ID. It also manages the relations when they are affected by operations performed on resources. For example, when a resource is deleted, existing relations are automatically deleted.
The service manages the execution of tasks for applications. An application can register a task with the scheduler and specify a time when it must be executed. The scheduler then ensures that the task is started at the right time and monitors its execution.
The service is particularly useful for tasks that have to be performed regularly. For example, the subscription service uses the scheduler to ensure that directories containing relevant documents are crawled at regular intervals.
An application or extension has to define its own scheduler tasks so that they can be configured to run at a certain time. The ISchedulerService supports ISchedulerTasks that represent tasks that can be executed periodically. The ISchedulerService’s method createSchedulerEntry()creates a task that has to be re-registered at the next start-up. An implementation of an ISchedulerTask is instantiated by the scheduler when the repository framework starts up. The run() method is then called periodically, as specified by its ISchedulerTimeTable.
For more information, see ee the Javadoc package description com.sapportals.wcm.service.scheduler for:
This enables applications to store and manage information about systems and the credentials required to log on to these systems. In the KM environment, a system is a server that needs to be accessed because data is stored there. For example, if resources are stored in a WebDAV, Lotus Notes and Exchange server then each of these is a system with certain attributes and each of these can have its own access policy that states requirements that have to be fulfilled before a user is granted access. In the following, these access requirements are referred to as credentials. It is the task of the system landscape service to store the credentials and information about the corresponding systems.
Credentials are defined and stored for a particular system type. They specify information that is required to permit access to a system type. Typically, access is restricted to persons who are correctly authenticated, that is persons whose user and password prove that they are allowed to access the system. However, these requirements can be extended to include further data like the specification of a start directory, the use of a particular access protocol or information about the logon mode. The system landscape service therefore enables the definition of individual access requirements that go beyond authentication with user and password.
For more information, see the Javadoc package com.sapportals.wcm.service.landscape
The task queue service allows components to place tasks in a task queue. Other components, which are responsible for processing the tasks, execute them.
The service is mainly intended for a cluster environment where several instances of Knowledge Management run on different machines. The task queue is located on a single machine, but with the help of the scheduler service, the tasks are executed by components on different machines. The scheduler directs the tasks to a specific Knowledge Management instance and thus enables the distribution of the system load.
See the Javadoc package description com.sapportals.wcm.service.scheduler for technical details.
Resources are identified and accessed on the basis of their RIDs. However, sometimes the RID alone is not sufficient to uniquely identify a resource. For example, if a resource is moved, or renamed, then the RID changes. An application that has stored the original RID may no longer be able to identify and access the resource. For this reason, the URI mapper service maps a RID to a unique ID This ID does not change even if the resource is moved or renamed. Applications can always use it to uniquely identify a resource.
The service offers the following methods:
)retrieves the ID that is mapped to specified RID. If
no mapping exists, The RID is mapped to a new unique ID.The service uses the event mechanism
to update the mapping when a resource is moved or renamed. It also deletes the
mapping if the resource is deleted. An application can only retrieve the
unique ID of a deleted resource if it registers itself for the
PRE_DELETE and DELETE events. It can then remove references to the unique
ID of the deleted resource.
For more information, see the package com.sapportals.wcm.service.urimapper
An application that needs the HTTP URL of a resource in the portal, for example, because it wants to send an e-mail that includes a link to a specific resource, can use the IURLGeneratorService. The service provides methods to create URLs for resources and to build valid URLs from partial information known to calling objects. It uses information from the configuration of the running Knowledge Management system to create complete URLs that point to web pages and can, for example, be included in pages or emails.
For more information, see Javadoc package com.sapportals.wcm.service.urlgenerator