org.palo.api.ext.favoriteviews
Interface FavoriteView

All Superinterfaces:
FavoriteViewObject, NamedEntity
All Known Implementing Classes:
FavoriteViewImpl

public interface FavoriteView
extends FavoriteViewObject

A FavoriteView is an object which links a CubeView with a connection and a new name, which can be determined by the user. FavoriteViews are always stored in a FavoriteViewsFolder, which provides a container for all saved favorite views. Please note that favorite views are saved for each connection, so each favorite view can represent a view from any database of that connection. In order to create a FavoriteView object, please use the FavoriteViewFactory. In order to create a new favorite view with the name TestFavoriteView, representing the CubeView, cubeView, you would use: FavoriteView favoriteView = FavoriteViewFactory.getInstance(). createFavoriteView("TestFavoriteView", cubeView); When creating the favorite view, you can also specify an optional third argument giving the position of the new favorite view realtive to its parent. For example, if the parent of the favorite view (a favorite view folder) has five children, you can insert a new view at any position from 0 to 5 (sic!). The new child will be inserted after the specified number and thus, "5" is valid in this case to append the new favorite view at the end of its parent's children.

Version:
$Id: FavoriteView.html,v 1.10 2009/07/09 11:01:47 ArndHouben Exp $

Method Summary
 CubeView getCubeView()
          Returns the CubeView that is attached to this favorite view.
 int getPosition()
          Returns the position of this favorite view in relation to its parent.
 void setName(java.lang.String newName)
          Sets a new name for this favorite view.
 void setPosition(int newPosition)
          Sets a new position for this favorite view.
 
Methods inherited from interface org.palo.api.ext.favoriteviews.FavoriteViewObject
getConnection
 
Methods inherited from interface org.palo.api.NamedEntity
getName
 

Method Detail

setName

void setName(java.lang.String newName)
Sets a new name for this favorite view. The name of the cube view attached to this favorite view is not changed.

Parameters:
newName - the new name for this favorite view.

getPosition

int getPosition()
Returns the position of this favorite view in relation to its parent. The position can be used to represent the favorite view tree in any GUI. With help of the position index, you can create an arbitrary ordering of the tree's elements.

Returns:
the position of this favorite view in relation to its parent.

setPosition

void setPosition(int newPosition)
Sets a new position for this favorite view. The position can be used to represent the favorite view tree in any GUI. With help of the position index, you can create an arbitrary ordering of the tree's elements.

Parameters:
newPosition - the new position for this favorite view.

getCubeView

CubeView getCubeView()
Returns the CubeView that is attached to this favorite view.

Returns:
the cube view that is attached to this favorite view or null if the view does not (or no longer) exist.