|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.sysman.dbTarget.db.changemgr.emo.cpapi.ChangePlanAccess
public class ChangePlanAccess
ChangePlanAccess provides methods that allow a client to access Change Manager Change Plans. To use this class:
login
). This
establishes a persistent session and Change Plan ownership
context for subsequent calls.
getChangePlans
).
createChangePlan
).
getOneChangePlan
). This
returns a ChangePlan object. Methods on that object
let you view, create and modify individual change items
within the Change Plan. (See the ChangeItem
class.)
userActionAllowed
). This call is
provided to allow UI implementors to enable or disable various
user actions.
removeChangePlan
).
logout
).
Field Summary | |
---|---|
static int |
CP_ACTION_ALLOWED
Indicates that an action is allowed. |
static int |
CP_ACTION_NOT_ALLOWED
Indicates that an action is not allowed. |
static int |
CP_ACTION_NOT_APPLICABLE
Indicates that an action is not applicable in the current situation. |
static int |
CP_ADD_CHANGE_ITEM
Indicates an intention to add a change item to a change plan. |
static int |
CP_CREATE_CHANGE_PLAN
Indicates an intention to create a change plan. |
static int |
CP_EDIT_CHANGE_PLAN
Indicates an intention to edit (modify) a change plan. |
static int |
CP_REMOVE_CHANGE_ITEM
Indicates an intention to remove a change item from a change plan. |
static int |
CP_REMOVE_CHANGE_PLAN
Indicates an intention to remove (delete) a change plan. |
static int |
CP_UPDATE_CHANGE_ITEM
Indicates an intention to update a change item in a change plan. |
static int |
CP_VIEW_CHANGE_ITEM
Indicates an intention to view a change item in a change plan. |
static int |
CP_VIEW_CHANGE_PLAN
Indicates an intention to edit (modify) a change plan. |
Constructor Summary | |
---|---|
ChangePlanAccess()
|
Method Summary | |
---|---|
void |
createChangePlan(ChangePlanInfo planInfo)
Creates a new Change Plan. |
ChangePlanInfo[] |
getChangePlans()
Gets a list of existing Change Plans that are visible to the logged-in user. |
ChangePlan |
getOneChangePlan(java.lang.String name,
java.lang.String owner)
Gets a Change Plan. |
boolean |
isConnected()
Indicates whether the ChangePlanAccess is currently connected to the repository. |
static boolean |
isTypeSupported(java.lang.String objType)
Indicates whether an object type is supported in Change Plans. |
boolean |
isValidConnection()
Indicates whether the current connection is a valid Enterprise Manager connection. |
void |
login(java.sql.Connection connection)
Establishes a session in the EM repository. |
void |
login(java.lang.String username,
java.lang.String password,
java.lang.String connectString)
Establishes a session in the EM repository. |
void |
logout()
Terminates the EM repository session. |
void |
removeChangePlan(java.lang.String name,
java.lang.String owner)
Removes a Change Plan from the EM repository. |
void |
setConnection(CMConnection cmConn)
Accepts existing connection for change plan access in case the user is already logged in. |
int |
userActionAllowed(int userAction,
ChangePlanInfo planInfo)
Indicates whether a specified action can be performed by the logged-in user. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CP_ACTION_ALLOWED
public static final int CP_ACTION_NOT_ALLOWED
public static final int CP_ACTION_NOT_APPLICABLE
public static final int CP_CREATE_CHANGE_PLAN
public static final int CP_REMOVE_CHANGE_PLAN
public static final int CP_VIEW_CHANGE_PLAN
public static final int CP_EDIT_CHANGE_PLAN
public static final int CP_ADD_CHANGE_ITEM
public static final int CP_VIEW_CHANGE_ITEM
public static final int CP_REMOVE_CHANGE_ITEM
public static final int CP_UPDATE_CHANGE_ITEM
Constructor Detail |
---|
public ChangePlanAccess()
Method Detail |
---|
public void login(java.sql.Connection connection) throws java.sql.SQLException
connection
- connection to the EM repository
java.sql.SQLException
public void login(java.lang.String username, java.lang.String password, java.lang.String connectString) throws java.sql.SQLException, ChangePlanAccessException
username
- the name of the EM account
provided for Change Plan accesspassword
- the password for the EM accountconnectString
- the connect string for the database
in which the EM repository is located.
java.sql.SQLException
- if the database cannot be accessed via
the connectString.
ChangePlanAccessException
- if the username/password is invalidpublic boolean isValidConnection() throws java.sql.SQLException, ChangePlanAccessException
ChangePlanAccessException
- if the ChangePlanAccess object
is not currently logged in.
java.sql.SQLException
- if an unexpected SQLException occurspublic void logout() throws ChangePlanAccessException, java.sql.SQLException
ChangePlanAccessException
- if the ChangePlanAccess object
is not currently logged in.
java.sql.SQLException
public boolean isConnected()
public ChangePlanInfo[] getChangePlans() throws ChangePlanAccessException, java.sql.SQLException
ChangePlanAccessException
- if the ChangePlanAccess object
is not currently logged in.
java.sql.SQLException
- if an unexpected SQLException occurspublic void createChangePlan(ChangePlanInfo planInfo) throws ChangePlanAccessException, java.sql.SQLException
planInfo
- the information needed to create the
ChangePlan including owner, name,
description
ChangePlanAccessException
- if the ChangePlanAccess object
is not currently logged in,
if the logged-in user does not
have the permission to create the
specified Change Plan, or if a
Change Plan having the same owner and
name already exists.
java.sql.SQLException
- if an unexpected SQLException occurspublic ChangePlan getOneChangePlan(java.lang.String name, java.lang.String owner) throws ChangePlanAccessException, java.sql.SQLException
name
- the name of the Change Plan to getowner
- the owner of the Change Plan to get;
if null, defaults to the logged-in
EM user
ChangePlanAccessException
- if the ChangePlanAccess object
is not currently logged in,
if the logged-in user does not
have the permission to access the
specified Change Plan, or if the
specified Change Plan does not exist.
java.sql.SQLException
- if an unexpected SQLException occurspublic void removeChangePlan(java.lang.String name, java.lang.String owner) throws ChangePlanAccessException, java.sql.SQLException
name
- the name of the Change Plan to removeowner
- the owner of the Change Plan to remove;
if null, defaults to the logged-in
EM user
ChangePlanAccessException
- if the Change Plan does not exist,
or if the logged-in
user does not have permission to remove the
specified Change Plan.
java.sql.SQLException
- if an unexpected SQLException occurspublic int userActionAllowed(int userAction, ChangePlanInfo planInfo) throws ChangePlanAccessException, java.sql.SQLException
userAction
- Specifies the desired action:
planInfo
- Identifies the Change Plan for certain
userActions; ignored for others.
ChangePlanAccessException
- if the ChangePlanAccess object
is not currently logged in.
java.sql.SQLException
- if an unexpected SQLException occurspublic static boolean isTypeSupported(java.lang.String objType)
objType
- The name of an object type as listed
in the OBJECT_TYPE column of DBA_OBJECTS.
public void setConnection(CMConnection cmConn)
cmConn
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |