|
Project: stp | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectcom.ibm.rational.stp.client.samples.Browser
public class Browser
This is a SWING application that reads and displays the properties of a resource using the generic Resource/Property interfaces of the CM API. Starting from the name or type of a resource, a user can read and display resource properties, following references from one resource to the next.
The user can start browsing either by entering the object selector for the resource to be viewed or the user can select a resource type and ask the API for all known folders containing that resource type.
In the latter case, the list of folders is displayed by
Browser.showResourceList
. By selecting an
entry in the display for a Resource, ResourceList or Property.List value, the
user can traverse to that object or list of objects and display them.
In the former case, the user types in the object selector for a specific
resource he is interested in, such as a specific record. All properties of
this record are then displayed by Browser.showResource
The Property.List property Record.ALL_FIELD_VALUES
contains all the schema-defined fields of the record and could be selected to
view those fields.
If a resource has content, that data can be displayed using
BrowserDataModel.showContent()
.
Field Summary | |
---|---|
private static String |
CLEAR_CASE_WORKSPACES
Drop-down entry for requesting local ClearCase views |
private static String |
CLEAR_QUEST_DB_SETS
Drop-down entry for requesting ClearQuest connections |
(package private) static Class<?> |
g_operationsClass
The class to use for Operations if supported by the application using the Browser class. |
private static com.ibm.rational.wvcm.stp.StpProvider |
g_provider
The Provider instance used by all instances of the Browser in a process |
(package private) static javax.wvcm.PropertyRequestItem.PropertyRequest |
META_PROPS
Meta-properties to be displayed for each property Also the properties requested for property-valued properties |
private static javax.wvcm.PropertyRequestItem.PropertyRequest |
PROPS
Properties to be displayed for elements of a ResourceList Also the properties requested for resource-valued properties. |
private static com.ibm.rational.wvcm.stp.StpProperty.MetaPropertyName<Object> |
VALUE_AS_OBJECT
|
Constructor Summary | |
---|---|
Browser()
|
Method Summary | |
---|---|
(package private) static Object |
exceptionImage(Throwable ex,
Object obj)
Generates a short string to identify a given throwable |
private static BrowserDataModel.Operations |
getOperations(com.ibm.rational.wvcm.stp.StpResource res)
If the g_operationsClass variable is set, returns a new instance of that class initialized with the given Resource proxy. |
(package private) static boolean |
getUrl(String defaultURL)
|
static void |
main(String[] args)
Starts browsing at a user-supplied resource location or in the folders designated for a user-supplied type of resource. |
(package private) static javax.swing.JFrame |
showPropertyList(String title,
com.ibm.rational.wvcm.stp.StpResource resource,
javax.wvcm.PropertyNameList.PropertyName<com.ibm.rational.wvcm.stp.StpProperty.List<com.ibm.rational.wvcm.stp.StpProperty<?>>> property,
javax.wvcm.PropertyRequestItem.NestedPropertyName<?>[] metaProperties,
boolean validOnly)
Retrieves the value of a Property.List-valued property from a given resource and displays the results in a table. |
(package private) static javax.swing.JFrame |
showResource(String title,
com.ibm.rational.wvcm.stp.StpResource res,
javax.wvcm.PropertyRequestItem.NestedPropertyName<?>[] metaProperties,
boolean validOnly)
Retrieves all properties of a given resource and displays them in a table. |
(package private) static javax.swing.JFrame |
showResourceList(String title,
javax.wvcm.ResourceList<? extends com.ibm.rational.wvcm.stp.StpResource> resources,
javax.wvcm.PropertyRequestItem.NestedPropertyName<?>[] properties,
boolean validOnly)
Displays the elements of a ResourceList in a table. |
(package private) static void |
showRoot(String name)
Displays a list of folders in which are found resources of a specified type or a resource at a given location. |
(package private) static Object |
typeImage(Object obj)
Generates the unqualified name of the type of a given object |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final com.ibm.rational.wvcm.stp.StpProperty.MetaPropertyName<Object> VALUE_AS_OBJECT
private static final javax.wvcm.PropertyRequestItem.PropertyRequest PROPS
static final javax.wvcm.PropertyRequestItem.PropertyRequest META_PROPS
private static final String CLEAR_QUEST_DB_SETS
private static final String CLEAR_CASE_WORKSPACES
static Class<?> g_operationsClass
CcBrowser#main(String[])
private static com.ibm.rational.wvcm.stp.StpProvider g_provider
Constructor Detail |
---|
public Browser()
Method Detail |
---|
static void showRoot(String name)
name
- Either a String specifying the type of resource for which a
folder list is to be generated or a String containing the
location of the resource to be displayed. Must not be null.static javax.swing.JFrame showResourceList(String title, javax.wvcm.ResourceList<? extends com.ibm.rational.wvcm.stp.StpResource> resources, javax.wvcm.PropertyRequestItem.NestedPropertyName<?>[] properties, boolean validOnly)
title
- The title for the window in which the resources are displayed.resources
- The ResoureList containing the resources to be displayed.properties
- A PropertyName array containing the PropertyName's for the
properties to be displayed for each Resource. These properties
should be defined in the proxies in the ResourceList.
static javax.swing.JFrame showResource(String title, com.ibm.rational.wvcm.stp.StpResource res, javax.wvcm.PropertyRequestItem.NestedPropertyName<?>[] metaProperties, boolean validOnly) throws javax.wvcm.WvcmException
title
- The title for the window in which the resource is displayed.res
- A Resource proxy for the resource to be displayed.metaProperties
- A MetaPropertyName[] containing the meta-properties to be
displayed for each property of the resource.
javax.wvcm.WvcmException
- if resource denoted by the given Resource proxy can not be
read.static javax.swing.JFrame showPropertyList(String title, com.ibm.rational.wvcm.stp.StpResource resource, javax.wvcm.PropertyNameList.PropertyName<com.ibm.rational.wvcm.stp.StpProperty.List<com.ibm.rational.wvcm.stp.StpProperty<?>>> property, javax.wvcm.PropertyRequestItem.NestedPropertyName<?>[] metaProperties, boolean validOnly) throws javax.wvcm.WvcmException
title
- The title for the window in which the property list is
displayedresource
- A proxy for the Resource whose properties are to be displayed.property
- A PropertyName specifying the Property.List-valued property of
the resource that is to be retrieved and displayed.metaProperties
- The meta-properties of each Property on the list that are to
be retrieved and displayed.
javax.wvcm.WvcmException
- If the specified resource or property cannot be retrieved
from the repository.public static void main(String[] args) throws Exception
args
- Not used in this application
Exception
static boolean getUrl(String defaultURL)
static Object exceptionImage(Throwable ex, Object obj)
ex
- A Throwable that is to be identified.obj
- The object that promulgated the exception.
static Object typeImage(Object obj)
obj
- The object whose value is to be displayed. May be null.
private static BrowserDataModel.Operations getOperations(com.ibm.rational.wvcm.stp.StpResource res)
res
- A Resource proxy. Must not be null.
|
Generated Thu 21-Nov-2013 02:35 AM | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |