Oracle Fusion Middleware Java API Reference for Oracle Team Productivity Center
11g Release 2 (11.1.2.1.0)
E17494-02

oracle.alm.view.application
Class ViewManager

java.lang.Object
  extended by oracle.alm.view.application.ViewManager

public abstract class ViewManager
extends java.lang.Object

The ViewManager is a singleton class exposing TPC client related service to connector writer. Connector writer can utilize these API to do corresponding customized UI controller work during the connector implementation. For example connector writer can use it in a customized listener code to access current IDE, current connector, and performing ui actions like (OpenWorkItemInEditor()). etc.

For more details on how to use the ViewManager, please refer to TPC connector implementation guideline.

Since:
11.1.1.2.0

Constructor Summary
ViewManager()
           
 
Method Summary
abstract  WorkItemConnector getCurrentConnector(RenderingContext rcontext)
           
abstract  java.net.URL getCurrentPageURL(RenderingContext rcontext)
           
abstract  java.lang.String getCurrentWIRepositoryId(RenderingContext rcontext)
           
abstract  java.lang.String getCurrentWIRepositoryName(RenderingContext rcontext)
           
abstract  WorkItem getCurrentWorkItem(RenderingContext rcontext)
           
abstract  java.lang.String getCurrentWorkItemType(RenderingContext rcontext)
           
abstract  AlmELContext getELContext(RenderingContext rcontext)
           
abstract  javax.swing.JFrame getIDEMain()
           
static ViewManager getInstance()
           
abstract  boolean isCurrentEditorDirty(RenderingContext rcontext)
           
abstract  void markCurrentEditorDirty(RenderingContext rcontext, boolean dirty)
           
abstract  void OpenPageInEditor(java.net.URL url)
           
abstract  void OpenPageInEditor(java.net.URL url, java.util.Map params)
           
abstract  void OpenTPCPageInEditor(java.lang.String relpath)
           
abstract  void OpenWorkItemInEditor(WorkItem item, java.lang.String wiType, java.lang.String repName, java.lang.String reposId)
           
abstract  void refreshWorkItemDetailUI(RenderingContext rcontext)
           
static void setInstance(ViewManager vmgr)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewManager

public ViewManager()
Method Detail

getInstance

public static ViewManager getInstance()

getELContext

public abstract AlmELContext getELContext(RenderingContext rcontext)
Parameters:
rcontext - The renderingContext Object for current page.

Returns:
The ELContext object. The ELContext object can be used by any AlmComponent to access rendering states of current page in the connector specific UI controller code, like the UI managed bean.

getIDEMain

public abstract javax.swing.JFrame getIDEMain()
Returns:
the Main window of the corresponding IDE for TPC client.

getCurrentConnector

public abstract WorkItemConnector getCurrentConnector(RenderingContext rcontext)
Parameters:
rcontext - The renderingContext Object for current page.

Returns:
the current workitem connector object. Throw the connector object we can directly
operate connector specfic data in the connector specific UI controller code, like the UI managed bean.

getCurrentWIRepositoryName

public abstract java.lang.String getCurrentWIRepositoryName(RenderingContext rcontext)
Parameters:
rcontext - the RenderingContext object for current page.
Returns:
the repository id for the current connector repository

getCurrentWIRepositoryId

public abstract java.lang.String getCurrentWIRepositoryId(RenderingContext rcontext)
Parameters:
rcontext - The RenderingContext obejct for current page.
Returns:
the current connector repository ID.

getCurrentPageURL

public abstract java.net.URL getCurrentPageURL(RenderingContext rcontext)
Parameters:
rcontext - The renderingContext Object for current page.

Returns:
the URL for the current page. the current page URL can be used in the connector specific UI
controller code, like the UI managed bean.

isCurrentEditorDirty

public abstract boolean isCurrentEditorDirty(RenderingContext rcontext)
Parameters:
rcontext - The renderingContext Object for current page.

Returns:
true if the current editor node is dirty, false if not.

markCurrentEditorDirty

public abstract void markCurrentEditorDirty(RenderingContext rcontext,
                                            boolean dirty)
Parameters:
rcontext - The renderingContext Object for current page.

dirty - The dirty status to be assigned to current editor node.

OpenTPCPageInEditor

public abstract void OpenTPCPageInEditor(java.lang.String relpath)
Parameters:
relpath - the TPC page relative path in current connector META-INF/pages directory.

This API will open the page with the specific page path. The page path can be in following format:
"/path/pagename.tpcx?name=value&...." "/repostName/witype/wiid.wid"
That means corresponding page xml will be put under the current fold path under the META-INF directory in current connector.


OpenPageInEditor

public abstract void OpenPageInEditor(java.net.URL url)
Parameters:
url - The URL object

This API will open the page with the specific URL object in an editor tab in the corresponding IDE that the TPC client installed.
The URL can be in any of following format:
"alm:/repositoryName/workitemType/workitemId.wid"; "alm:/repositoryName/pagerelpath.tpcx" or "alm:/pagerelpath.tpcx?repository=repsName"
All above URL will be result opening the page in a TPC editor node

It also support the default browser opening an URL starting with "http" and "ftp", it will launch the default browser on the TPC client to open it.


OpenPageInEditor

public abstract void OpenPageInEditor(java.net.URL url,
                                      java.util.Map params)
Parameters:
url - The URL object

params - Extra params to be passed to current page, these params will be stored in the RenderingContext object of current page during the page rendering process.
For URL support, please see doc for above OpenPageInEditor(URL url)

getCurrentWorkItemType

public abstract java.lang.String getCurrentWorkItemType(RenderingContext rcontext)
Parameters:
rcontext - The renderingContext Object for current page.

Returns:
the current workitem type.

getCurrentWorkItem

public abstract WorkItem getCurrentWorkItem(RenderingContext rcontext)
Parameters:
rcontext - The renderingContext Object for current page.

Returns:
return the current workitem object

OpenWorkItemInEditor

public abstract void OpenWorkItemInEditor(WorkItem item,
                                          java.lang.String wiType,
                                          java.lang.String repName,
                                          java.lang.String reposId)
Parameters:
item -
wiType -
repName -
reposId -

refreshWorkItemDetailUI

public abstract void refreshWorkItemDetailUI(RenderingContext rcontext)

setInstance

public static void setInstance(ViewManager vmgr)
Parameters:
vmgr - Set the thread local ViewManager object.

Note: this API is used internal only.


Oracle Fusion Middleware Java API Reference for Oracle Team Productivity Center
11g Release 2 (11.1.2.1.0)
E17494-02

Copyright © 1998,2011, Oracle. All rights reserved.