Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Team Productivity Center
12c (12.1.2)
E23194-01


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

Nested Class Summary
static class ViewManager.TpcEntity
           
static class ViewManager.TpcEntityScope
           

 

Constructor Summary
ViewManager()
           

 

Method Summary
abstract  java.lang.Object createTpcEntity(RenderingContext rcontext, java.lang.String entityName, ViewManager.TpcEntity entityType, ViewManager.TpcEntityScope entityScope, java.lang.Object data)
          Create a tpc entity (Such as a tpc query or workitem template) from TPC server.
abstract  boolean deleteTpcEntity(RenderingContext rcontext, ViewManager.TpcEntity entityType, ViewManager.TpcEntityScope entityScope, java.lang.Object entityObject)
          Update a tpc entity (Such as a tpc query or workitem template) from TPC server.
abstract  java.lang.Object editTpcEntity(RenderingContext rcontext, ViewManager.TpcEntity entityType, ViewManager.TpcEntityScope entityScope, java.lang.Object entityObject)
          Update a tpc entity (Such as a tpc query or workitem template) from TPC server.
abstract  WorkItemConnector getCurrentConnector(RenderingContext rcontext)
           
abstract  java.util.Map getCurrentConnectorContext(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  WorkItemDef getCurrentWorkItemDef(RenderingContext rcontext)
           
abstract  java.lang.String getCurrentWorkItemType(RenderingContext rcontext)
           
abstract  AlmELContext getELContext(RenderingContext rcontext)
          Deprecated. 
abstract  AlmELContext getELContext(RenderingContext rcontext, AlmComponent component)
           
abstract  javax.swing.JFrame getIDEMain()
           
static ViewManager getInstance()
           
abstract  java.lang.String getResource(RenderingContext rcontext, java.lang.String key)
           
abstract  java.lang.Object getTpcEntity(RenderingContext rcontext, java.lang.String entityName, ViewManager.TpcEntity entityType, ViewManager.TpcEntityScope entityScope)
          Retrieve a tpc entity (Such as a tpc query or workitem template) from TPC server.
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)
          Refresh the workitem detail section of current page.
abstract  java.awt.Container rendererTPCPage(java.net.URL url, java.lang.String rootTagName, java.util.Map params)
          URL the page url, format is "alm:/repositoryName/pagerelpath.tpcx", and the real ui page(pagerelpath.xml) is put under META-INF/pages directory in the corresponding connector by default.
static void setInstance(ViewManager vmgr)
           
abstract  boolean validateTpcEntityName(RenderingContext rcontext, java.lang.String entityName, ViewManager.TpcEntity entityType, ViewManager.TpcEntityScope entityScope)
          Validate whether the given name for a tpc entity for current user in current team and repository is valid or not

 

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

@Deprecated
public abstract AlmELContext getELContext(RenderingContext rcontext)
Deprecated. 
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. This method is deprecated, please use getELContext(RenderingContext, AlmComponent).

getELContext

public abstract AlmELContext getELContext(RenderingContext rcontext,
                                          AlmComponent component)
Parameters:
rcontext - rcontext The renderingContext Object for current page.
component -
Returns:
The ELContext object
Throws:
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. Through the connector object we can directly
operate connector specfic data in the connector specific UI controller code, like the UI managed bean.

getCurrentConnectorContext

public abstract java.util.Map getCurrentConnectorContext(RenderingContext rcontext)
Parameters:
rcontext - The renderingContext Object for current page.
Returns:
the current workitem connector context map. Througj the connector context map we can directly
access states stored in the connector context map.

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

getCurrentWorkItemDef

public abstract WorkItemDef getCurrentWorkItemDef(RenderingContext rcontext)
Parameters:
rcontext -
Returns:
the current workitem defintion 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 -

getResource

public abstract java.lang.String getResource(RenderingContext rcontext,
                                             java.lang.String key)
Parameters:
rcontext - rcontext The renderingContext Object for current page.
key - the resource key defined in the uiresource xml file.
Returns:
the resource string for the resource with key defined in the resource file.

For backward compatibility, it will return in following order:

  • If it is defined in the model metadata resource file, return it first (backward compatibility), if not,
  • if it is in the model metadata resource file(registered in tpc-confgi.xml(the standard way), if not,
  • If it is defined in the ui metadata resource file, return it(backward compatibility)

validateTpcEntityName

public abstract boolean validateTpcEntityName(RenderingContext rcontext,
                                              java.lang.String entityName,
                                              ViewManager.TpcEntity entityType,
                                              ViewManager.TpcEntityScope entityScope)
Validate whether the given name for a tpc entity for current user in current team and repository is valid or not
Parameters:
rcontext - The RenderingContext for current TPC page
entityName - The name of the entity (query or workitem template)
entityType - Value of the entity type
entityScope - Value of The entity scope
Returns:
true if the given name is vaid, false if not
Throws:

getTpcEntity

public abstract java.lang.Object getTpcEntity(RenderingContext rcontext,
                                              java.lang.String entityName,
                                              ViewManager.TpcEntity entityType,
                                              ViewManager.TpcEntityScope entityScope)
Retrieve a tpc entity (Such as a tpc query or workitem template) from TPC server.
Parameters:
rcontext -
entityName -
entityType -
entityScope -
Returns:
Throws:

createTpcEntity

public abstract java.lang.Object createTpcEntity(RenderingContext rcontext,
                                                 java.lang.String entityName,
                                                 ViewManager.TpcEntity entityType,
                                                 ViewManager.TpcEntityScope entityScope,
                                                 java.lang.Object data)
Create a tpc entity (Such as a tpc query or workitem template) from TPC server.
Parameters:
rcontext - the RenderingContext Object for current page
entityName - the TPC entity name (for query or template)
entityType - the TPC entity type (TpcEntity.QUERY or TpcEntity.TEMPLATE)
entityScope - the TPC entity scope (TpcEntityScope.TEAM or TpcEntityScope.USER)
data - the input data object for creating the TPC entity object. For query,it is a WorkItemQuerySet object; for template, it is a WorkItem object.
Returns:
the created TPC new entity object.For query,it is a WorkItemQuerySet Object; for template, it is a WorkItem object.
Throws:

editTpcEntity

public abstract java.lang.Object editTpcEntity(RenderingContext rcontext,
                                               ViewManager.TpcEntity entityType,
                                               ViewManager.TpcEntityScope entityScope,
                                               java.lang.Object entityObject)
Update a tpc entity (Such as a tpc query or workitem template) from TPC server.
Parameters:
rcontext - the RenderingContext Object for current page
entityType - the TPC entity type (TpcEntity.QUERY or TpcEntity.TEMPLATE)
entityScope - the TPC entity scope (TpcEntityScope.TEAM or TpcEntityScope.USER)
entityObject - the TPC entity object to be updated. For query,it is a WorkItemQuerySet object; for template, it is a WorkItem object.
Returns:
the updated TPC new entity object.For query,it is a WorkItemQuerySet Object; for template, it is a WorkItem object.
Throws:

deleteTpcEntity

public abstract boolean deleteTpcEntity(RenderingContext rcontext,
                                        ViewManager.TpcEntity entityType,
                                        ViewManager.TpcEntityScope entityScope,
                                        java.lang.Object entityObject)
Update a tpc entity (Such as a tpc query or workitem template) from TPC server.
Parameters:
rcontext - the RenderingContext Object for current page
entityType - the TPC entity type (TpcEntity.QUERY or TpcEntity.TEMPLATE)
entityScope - the TPC entity scope (TpcEntityScope.TEAM or TpcEntityScope.USER)
entityObject - the TPC entity object to be updated. For query,it is a WorkItemQuerySet object; for template, it is a WorkItem object.
Returns:
the updated TPC new entity object.For query,it is a WorkItemQuerySet Object; for template, it is a WorkItem object.
Throws:

refreshWorkItemDetailUI

public abstract void refreshWorkItemDetailUI(RenderingContext rcontext)
Refresh the workitem detail section of current page.
Parameters:
rcontext -
Throws:

rendererTPCPage

public abstract java.awt.Container rendererTPCPage(java.net.URL url,
                                                   java.lang.String rootTagName,
                                                   java.util.Map params)
URL the page url, format is "alm:/repositoryName/pagerelpath.tpcx", and the real ui page(pagerelpath.xml) is put under META-INF/pages directory in the corresponding connector by default. params the params passed in for the page with url.

setInstance

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

Note: this API is used internal only.


Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Team Productivity Center
12c (12.1.2)
E23194-01


Copyright © 2009,2013, Oracle. All rights reserved.