com.ibm.pim.view
Interface ScreenView


public interface ScreenView

A ScreenView is a component of a View and denotes the particular attribute collections that are in effect on this type of screen when the owning View is selected. It can break these down into separate UI constructs (such as tabs or panels) using ScreenViewFilters

Since:
6.0.0
See Also:
View, ScreenType, ScreenViewFilter

Field Summary
static java.lang.String copyright
           
 
Method Summary
 ScreenViewFilter addFilter(java.lang.String name)
          Add an empty filter with the specified name to the end of the list.
 ScreenViewFilter addFilter(java.lang.String name, int position)
          Add an empty filter with the specified name to the specified location in the list Attribute Collections can be added to the filter via ScreenViewFilter.addAttributeCollection or ScreenViewFilter.setAttributeCollections
 java.util.Collection<AttributeCollection> getAttributeCollections()
          Get all attribute collections on this screen view, editable and viewable
 java.util.Collection<AttributeDefinition> getAttributes()
          Get all viewable and editable attributes from the union of all viewable and editable attribute collections on this screen view.
 java.util.Collection<AttributeCollection> getEditableAttributeCollections()
          Get the editable attribute collections for this screen view
 java.util.Collection<AttributeDefinition> getEditableAttributes()
          Get all editable attributes from the editable attribute collections on this screen view at the present time.
 ScreenViewFilter getFilter(java.lang.String name)
          Retrieve a filter on this screen view by name
 java.util.List<ScreenViewFilter> getFilters()
          Get all view filters currently set against this screen view
 ScreenType getScreenType()
          get the type of screen to which this screen view corresponds
 View getView()
          Get the View to which this ScreenView belongs
 java.util.Collection<AttributeCollection> getViewableAttributeCollections()
          Get the viewable attribute collections for this screen view
 java.util.Collection<AttributeDefinition> getViewableAttributes()
          Get all viewable attributes from the union of all viewable attribute collections on this screen view at the present time.
 void setEditableAttributeCollections(java.util.Collection<AttributeCollection> attributeCollections)
          Set the editable attribute collections for this screen view This will override any existing editable attribute collections that are currently set
 void setFilters(java.util.Collection<ScreenViewFilter> filters)
          Set the filters for this screen view, overwriting any existing filters set for this data view.
 void setViewableAttributeCollections(java.util.Collection<AttributeCollection> attributeCollections)
          Set the viewable attribute collections for this screen view This will override any existing viewable attribute collections that are currently set
 

Field Detail

copyright

static final java.lang.String copyright
See Also:
Constant Field Values
Method Detail

getView

View getView()
Get the View to which this ScreenView belongs

Returns:
the View object
Throws:
PIMInternalException - if an internal error occurs

getViewableAttributeCollections

java.util.Collection<AttributeCollection> getViewableAttributeCollections()
Get the viewable attribute collections for this screen view

Returns:
the viewable attribute collections for this data view. If there are no viewable attribute collections set, an empty Collection will be returned
Throws:
PIMInternalException - if an internal error occurs

getEditableAttributeCollections

java.util.Collection<AttributeCollection> getEditableAttributeCollections()
Get the editable attribute collections for this screen view

Returns:
the editable attribute collections for this screen view. If there are no editable attribute collections, an empty Collection will be returned
Throws:
java.lang.UnsupportedOperationException - if this Screen View is linked to a screen type which does not support Editable Attribute Collections
PIMInternalException - if an internal error occurs

setEditableAttributeCollections

void setEditableAttributeCollections(java.util.Collection<AttributeCollection> attributeCollections)
Set the editable attribute collections for this screen view This will override any existing editable attribute collections that are currently set

Parameters:
attributeCollections - the attribute collections to set
Throws:
java.lang.UnsupportedOperationException - if this Screen View is linked to a screen type which does not support Editable AttributeCollections
PIMInternalException - if an internal error occurs
PIMAuthorizationException - In case of a Catalog View, if the user does not have the equivalent of Permission.CATALOG_EDIT_CATALOG_VIEWS In case of a Hierarchy View, if the user does not have the equivalent of Permission.HIERARCHY_EDIT_HIERARCHY_VIEWS
java.lang.IllegalArgumentException - if any of the input parameters is null

setViewableAttributeCollections

void setViewableAttributeCollections(java.util.Collection<AttributeCollection> attributeCollections)
Set the viewable attribute collections for this screen view This will override any existing viewable attribute collections that are currently set

Parameters:
attributeCollections - the attribute collections to set
Throws:
PIMInternalException - if an internal error occurs
PIMAuthorizationException - In case of a Catalog View, if the user does not have the equivalent of Permission.CATALOG_EDIT_CATALOG_VIEWS In case of a Hierarchy View, if the user does not have the equivalent of Permission.HIERARCHY_EDIT_HIERARCHY_VIEWS
java.lang.IllegalArgumentException - if any of the input parameters is null

getAttributes

java.util.Collection<AttributeDefinition> getAttributes()
Get all viewable and editable attributes from the union of all viewable and editable attribute collections on this screen view. If there are none, an empty Collection will be returned.

Returns:
a Collection of the attribute definitions in all attribute collections on this screen view at the present time. Note that if any of the attribute collections includes dynamic attribute lists from specs, and those specs change in the future, then at that point the list of attributes will no longer be an accurate representation. Similarly, if new attribute collections are added or removed from this screen view, the list of attributes will no longer be an accurate representation
Throws:
PIMInternalException - if an internal error occurs

getViewableAttributes

java.util.Collection<AttributeDefinition> getViewableAttributes()
Get all viewable attributes from the union of all viewable attribute collections on this screen view at the present time. If there are none, an empty Collection will be returned.

Returns:
a Collection of the attribute definitions in all viewable attribute collections on this screen view. Note that if any of the attribute collections includes dynamic attribute lists from specs, and those specs change in the future, then at that point the list of attributes will no longer be an accurate representation. Similarly, if new attribute collections are added or removed from this screen view, the list of attributes will no longer be an accurate representation
Throws:
PIMInternalException - if an internal error occurs

getEditableAttributes

java.util.Collection<AttributeDefinition> getEditableAttributes()
Get all editable attributes from the editable attribute collections on this screen view at the present time. If there are none, an empty Collection will be returned.

Returns:
a Collection of the attribute definitions in all editable attribute collections on this screen view. Note that if any of the attribute collections includes dynamic attribute lists from specs, and those specs change in the future, then at that point the list of attributes will no longer be an accurate representation. Similarly, if new attribute collections are added or removed from this screen view, the list of attributes will no longer be an accurate representation
Throws:
java.lang.UnsupportedOperationException - if this Screen View is linked to a screen type which does not support Editable Attribute Collections
PIMInternalException - if an internal error occurs

getAttributeCollections

java.util.Collection<AttributeCollection> getAttributeCollections()
Get all attribute collections on this screen view, editable and viewable

Returns:
a Collection of all attribute collections on this screen view. If there are none, the collection will be empty.
Throws:
PIMInternalException - if an internal error occurs

getFilter

ScreenViewFilter getFilter(java.lang.String name)
Retrieve a filter on this screen view by name

Parameters:
name - the filter name to return
Returns:
the specified ScreenViewFilter for this screen view. Returns null if a filter with the given name does not exist for this screen view.
Throws:
PIMInternalException - if an internal error occurs
java.lang.IllegalArgumentException - if name is empty

getFilters

java.util.List<ScreenViewFilter> getFilters()
Get all view filters currently set against this screen view

Returns:
a List of filters set against this screen view. If none are set this will return an empty Collection
Throws:
PIMInternalException - if an internal error occurs

addFilter

ScreenViewFilter addFilter(java.lang.String name)
Add an empty filter with the specified name to the end of the list. Attribute Collections can be added to the filter via ScreenViewFilter.addAttributeCollection or ScreenViewFilter.setAttributeCollections

Parameters:
name - the name for the new filter to be added to this screen view. The filter will be added at the end of the current list of filters Changes must be saved via getView().save()
Returns:
the newly created ScreenViewFilter object
Throws:
PIMInternalException - if an internal error occurs, or if a filter with the specified name already exists
PIMAuthorizationException -
In case of a Catalog View, if the user does not have the equivalent of Permission.CATALOG_EDIT_CATALOG_VIEWS
In case of a Hierarchy View, if the user does not have the equivalent of Permission.HIERARCHY_EDIT_HIERARCHY_VIEWS
java.lang.IllegalArgumentException - if name is null or empty

addFilter

ScreenViewFilter addFilter(java.lang.String name,
                           int position)
Add an empty filter with the specified name to the specified location in the list Attribute Collections can be added to the filter via ScreenViewFilter.addAttributeCollection or ScreenViewFilter.setAttributeCollections

Parameters:
name - the name for the new filter to be added to this screen view.
position - an integer representing the position at which to insert the new filter. (0 means the beginning of the list, 1 means between the first and second filters, etc) Changes must be saved via getView().save()
Returns:
the newly created ScreenViewFilter object
Throws:
PIMInternalException - if an internal error occurs, or if a filter with the specified name already exists
PIMAuthorizationException -
In case of a Catalog View, if the user does not have the equivalent of Permission.CATALOG_EDIT_CATALOG_VIEWS
In case of a Hierarchy View, if the user does not have the equivalent of Permission.HIERARCHY_EDIT_HIERARCHY_VIEWS
java.lang.IllegalArgumentException - if the integer is not a valid position for insertion or if name is null or empty

setFilters

void setFilters(java.util.Collection<ScreenViewFilter> filters)
Set the filters for this screen view, overwriting any existing filters set for this data view. This can also be used to reorder the filter list or add/remove filters.

Parameters:
filters - a new Collection of ScreenViewFilters for this screen view
Throws:
PIMInternalException - if an internal error occurs
PIMAuthorizationException -
In case of a Catalog View, if the user does not have the equivalent of Permission.CATALOG_EDIT_CATALOG_VIEWS
In case of a Hierarchy View, if the user does not have the equivalent of Permission.HIERARCHY_EDIT_HIERARCHY_VIEWS
java.lang.IllegalArgumentException - if filters is null

getScreenType

ScreenType getScreenType()
get the type of screen to which this screen view corresponds

Returns:
the type of screen
Throws:
PIMInternalException - if an internal error occurs