All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Foundation |
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES

Note:
  Extension of the classes in this package is prohibited unless otherwise documented. Similarly, extension or implementation of the interfaces in this package is prohibited except as documented.

    @CodeSet(value="sas.platform")
    @SASScope(value="ALL")

## Package com.sas.services.information.metadata.favorites

Manages favorites folders and their contents.

See:
Description

Interface Summary
FavoritesContainer | Base interface used for any favorites container object, such as a FavoritesFolder or a FavoritesGroup.
FavoritesFolder | Interface representing the FavoritesFolder public object.
FavoritesGroup | Interface representing the FavoritesGroup public object.

Class Summary
FavoritesFactory | Factory class used for creating new favorites folders.

## Package com.sas.services.information.metadata.favorites Description

Manages favorites folders and their contents.

## Overview

Favorites folders are a new object type added to SAS 9.3 to save a list of favorite objects. A favorites folder enables users to collect objects of interest into a common view or maybe be used by an application to implement features like favorites or history.

The API supports the following capabilities:

- Creation of new favorites folders
- Creation and retrieval of application specific favorites folders to support favorites and history features
- Listing contents
- Adding and removing favorites
- Creating and removing subgroups, typically used for organizing a collection of favorites (known as "favorites groups")
- Setting the maximum capacity of the favorites folder, used by a History feature (i.e. store only the last 10 viewed objects)

## Usage

The `FavoritesFactory` should be used to create new favorites folders and favorites groups, or to retrieve an application specific favorites folders.

#### Example - Creating a favorites folder

Create a new favorites folder under the user's My Folder location.

      SessionContextInterface session;  //where "session" is a valid session context instance
      ServerInterface server; //where "server" is a valid server instance

      FolderInterface myFolder = server.getHomeFolder(null, UserFolderType.FOLDERTYPE_MYFOLDER, null);
      FavoritesFactory factory = FavoritesFactory.getInstance(session);
      FavoritesFolder favorites = factory.createFavoritesFolder("Favorites", myFolder);
      if (favorites != null)
      {
         //persist the changes to the server
         favorites.update();
      }

#### Example - Creating a favorites group

Under the favorites folder just created, create a new subgroup named "Reports".

      FavoritesGroup group = factory.createFavoritesGroup("Reports", favorites);
      if (group != null)
      {
         //persist the changes to the server
         group.update();
      }

Since:
  9.3

Note:
  Extension of the classes in this package is prohibited unless otherwise documented. Similarly, extension or implementation of the interfaces in this package is prohibited except as documented.

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Foundation |
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES

Copyright © 2009 SAS Institute Inc. All Rights Reserved.