📄 ejbremotemanager.java
字号:
/* * Copyright(C) 2008, NTT AT Co., Ltd. * Project: AWGStar * * Notes: * N/A * * Record of change: * Date Version Name Content * 2008/12/15 1.0 TuanNA First create */package jp.co.ntt.awgview.server.ejb;import java.rmi.RemoteException;import java.util.ArrayList;import javax.ejb.EJBObject;import jp.co.ntt.awgview.server.dao.JResult;import jp.co.ntt.awgview.server.vo.BlockVO;import jp.co.ntt.awgview.server.vo.NodeHelper;import jp.co.ntt.awgview.server.vo.NodeVO;import jp.co.ntt.awgview.server.vo.OperationVO;import jp.co.ntt.awgview.server.vo.PackageTypeVO;import jp.co.ntt.awgview.server.vo.PackageVO;import jp.co.ntt.awgview.server.vo.PortVO;import jp.co.ntt.awgview.server.vo.TrapVO;import jp.co.ntt.awgview.server.vo.UserVO;import jp.co.ntt.awgview.server.vo.ConnectorVO.PPConnection;import jp.co.ntt.awgview.server.vo.ConnectorVO.PackageConnection;/** * Class name : EJBRemoteManager <BR> * * Package : jp.co.ntt.awgview.server.ejb <BR> * * Description: The remote interface defines the business methods that a remote client can invoke * * @author : AI&T * @version : 1.0 */ public interface EJBRemoteManager extends EJBObject { /** * Only for testing EJB connection * @return String * @throws RemoteException */ public String ping() throws RemoteException; /** * Create one connection to the database * @return JResult * @throws RemoteException * @throws Exception */ public JResult open() throws RemoteException, Exception;; /** * Close the current connection * @return boolean * @throws RemoteException * @throws Exception */ public boolean close() throws RemoteException, Exception;; /** * Delete object (node, block ...) and all related data from the database * @param objectType * Specify a constant corresponding with object, such as: * DBConstants.NODE_OBJECT for Node object ... * @param objectID * Object's ID * @return JResult object. Check method isSucceeded() of this is true for success, otherwise false. */ public JResult deleteObject(int objectType, long objectID) throws RemoteException, Exception; /** * add an object into database * * @param object * Type of object is valid consists of NodeVO, BlockVO PortVO, * UserVO, TrapVO, OperationVO, PackageConnection and * PPConnection * @return a JResult object. Check method isSucceeded() true if success. * @throws Exception if error occurs */ public JResult addObject2DB(Object object) throws RemoteException, Exception; /** * add new one package into database * @param object * @return a JResult object contains a PackageVO (consists of list ports), * use method getObjectData() of JResult to get this. * @throws Exception * throws a exception if one unknown error is occurred. */ public JResult addPackage2DB(PackageVO object) throws RemoteException, Exception; /** * add a list of package-package connections into database * * @param lstLogicalConn * list of package-package connections * @return a JResult object. Check method isSucceeded() true if success. * @throws Exception * throws a exception if an error occurs. */ public JResult addLogicalConnection2DB(ArrayList<PackageConnection> lstLogicalConn) throws RemoteException, Exception; /** * Update object data in database * * @param object * Type of object is valid consists of NodeVO, BlockVO PortVO, * UserVO, PackageConnection and PPConnection (not for Trap and * Operation) * @return a JResult object. Check method isSucceeded() true if success. * @throws Exception * throws a exception if an error occurs. */ public JResult updateObjectSeparator2DB(Object object) throws RemoteException, Exception; /** * Update the position and dimension of node, block and package * * @param nodeHelper * NodeHelper object contains new position of node, block and * package * @return a JResult object. Check method isSucceeded() true if success. * @throws Exception * throws a exception if an error occurs. */ public JResult updateObjectPosition2DB(NodeHelper nodeHelper) throws RemoteException, Exception; /** * Update for only alarm field of function block object * * @param id * Block ID * @param value * Value of alarm * @return JResult */ public JResult updateBlockAlarm(long id, int value) throws RemoteException, Exception; /** * Update alarm corresponding with each window view * @param id * Package's ID * @param wview * Specify value Constants.DIAGRAM_VIEW if want to update * for window diagram or Constants.PACKAGE_IMPL_VIEW for * Package implement window * * @param value * Value of alarm level, this will be added immediately into database * @return JResult object. Check method isSucceeded() true if success, otherwise false */ public JResult updatePackageAlarm(long id, int wview, int value) throws RemoteException, Exception; /** * Turn off trap alarm corresponding with each window view * @param tvo * TrapVO object * @param wview * Specify value Constants.DIAGRAM_VIEW if want to update * for window diagram or Constants.PACKAGE_IMPL_VIEW for * Package implement window * * @param value * Value of alarm level, this will be added immediately into database * @return JResult object. Check method isSucceeded() true if success, otherwise false */ public JResult turnOffTrapAlarm(TrapVO tvo, int wview, int value) throws RemoteException, Exception; /** * Find one object with it's ID. This method only detects that one object is existed or not * @param objectType * Specify a constant corresponding with object, such as: * DBConstants.NODE_OBJECT for Node object ... * @param objectID * Specify a number >0 is object's ID * * @return JResult object. Check JResult.getValue()>0 if object is found, * -1 if an error occurred, and equal 0 if object not found */ public JResult findObject(int objectType, int objectID) throws RemoteException, Exception; /** * Find object with condition specified * @param objectType * @param condition * @return JResult object. Check JResult.getValue()>0 if object is found, * -1 if an error occurred, and equal 0 if object not found */ public JResult findObject(int objectType, String condition) throws RemoteException, Exception; /** * Build a tree object data with root is NodeHelper object. * Order parent-child as follows: * NodeHelper -> NodeVO -> BlockVO -> PackageVO -> PortVO * @return NodeHelper object * @throws Exception * throw Exception if an error occurs */ public NodeHelper getObjectTree() throws RemoteException, Exception; /** * Load all node from database * * @return List of node objects * contained in one ArrayList<NodeVO> object * @throws Exception * throws a exception if an error occurs. */ public ArrayList<NodeVO> loadNodes() throws RemoteException, Exception; /** * Load all block from database * * @return List of block objects contained in one ArrayList<BlockVO> object *@throws Exception * throws a exception if an error occurs. */ public ArrayList<BlockVO> loadBlocks() throws RemoteException, Exception; /** * Get Alarm info of block and packages child * * @param blockID * Block's ID * @return null if an error occurred or no block found, otherwise BlockVO object */ public BlockVO getBlockAlarmInfo(long blockID) throws RemoteException, Exception; /** * Load all package from database * * @return List of package objects contained in one ArrayList<PackageVO> object * @throws Exception * throws a exception if an error occurs. */ public ArrayList<PackageVO> loadPackages() throws RemoteException, Exception; /** * Load all port from database * * @return List of port objects contained in one ArrayList<PortVO> object * @throws Exception * throws a exception if an error occurs. */ public ArrayList<PortVO> loadPorts() throws RemoteException, Exception; /** * Get list of package-package connection (without port info) with a specified condition * * @return List of user objects contained in one ArrayList<PackageConnection> object * @throws Exception * throws a exception if an error occurs. */ public ArrayList<PackageConnection> loadPackageConnection() throws RemoteException, Exception; /** * Load all type of package from database and contains into one the list * object * @return ArrayList<PackageTypeVO> object * @throws Exception * throws a exception if an error occurs. */ public ArrayList<PackageTypeVO> loadPackageTypes() throws RemoteException, Exception; /** * Load package-port connection (package-package connection contains port info) * from database and contains into one the ArrayList<PPConnection> list object * * @return ArrayList<PPConnection> object * @throws Exception * throws a exception if an error occurs. */ public ArrayList<PPConnection> loadPPConnection() throws RemoteException, Exception; /** * Load all user in database (root account is not involved) and contains into one the list object * @return list of user objects contained in one ArrayList<UserVO> object * @throws Exception * throws a exception if an error occurs. */ public ArrayList<UserVO> loadUsers() throws RemoteException, Exception; /** * Get trap history by filter records from database by combine 6 parameters together * @param startTimeStamp * @param endTimeStamp * startTimeStamp/endTimeStamp is a long number, this number long can get by * convert DateTime type like "2009-01-01 12:30:59". Specify one or both is 0 * if do not want to filter the record result according the time * @param blockName * Name of function block. Set null if want to ignore the block name condition * @param alarmType * Name of trap type. Set null if want to ignore the trap type condition * @param orderIncrease * Sort the result according order increase or decrease by time. Set true for order increase, * otherwise false * @return list TrapVO object contained in ArrayList<TrapVO> object * @throws Exception if any error occurs */ public ArrayList<TrapVO> loadTrapHistory(long startTimeStamp , long endTimeStamp, String blockName, String alarmType , boolean orderIncrease) throws RemoteException, Exception; /** * Get trap history on trap view table * together * @param blockIP * IP address of function block. Set null if want to ignore the block * name condition * @return list TrapVO object contained in ArrayList<TrapVO> object * @throws Exception * if any error occurs */ public ArrayList<TrapVO> getTrapOnView(String blockIP) throws RemoteException, Exception; /** * Reset all parameters value for new get trap process * @throws RemoteException * @throws Exception */ public void resetGetTraps() throws RemoteException, Exception; /** * Reset all parameters value for new get user log process * @throws RemoteException * @throws Exception */ public void resetGetLogs() throws RemoteException, Exception; /** * Get user's log * @param orderIncrease * Sort the result according order increase or decrease by time. Set true for order increase, * otherwise false * @return list OperationVO object contained in ArrayList<OperationVO> object * @throws Exception if any error occurs */ public ArrayList<OperationVO> loadUserLog(boolean orderIncrease) throws RemoteException,Exception; /** * Login into server using user name and password * @param userName * @param password * @param userIP * Current not used, so set to null * @return JResult object. Check method isSucceeded() of this for true if successful, * otherwise false * @throws RemoteException * @throws Exception * throws Exception if any error occurs */ public JResult login(String userName, String password,String userIP)throws RemoteException, Exception; public JResult logout(String userIP) throws RemoteException, Exception; /** * Delete user from database who specified by user name * @param userName * @return JResult object. Check method isSucceeded() true if successful, otherwise false * @throws RemoteException * @throws Exception */ public JResult deleteUser(String userName) throws RemoteException, Exception; /** * This method used only for client. Client will call this to notify to * user checker to keep alive timeout */ public void sendLivingSign()throws RemoteException; /** * Load all alarm type from server * @return ArrayList<String> * @throws RemoteException */ public ArrayList<String> loadAlarmType() throws RemoteException;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -