gboat2.admin.osgi.action
类 BundlesAction

java.lang.Object
  继承者 com.opensymphony.xwork2.ActionSupport
      继承者 gboat2.admin.osgi.action.BundlesAction
所有已实现的接口:
com.opensymphony.xwork2.Action, com.opensymphony.xwork2.LocaleProvider, com.opensymphony.xwork2.TextProvider, com.opensymphony.xwork2.Validateable, com.opensymphony.xwork2.ValidationAware, Serializable, org.apache.struts2.util.ServletContextAware

public class BundlesAction
extends com.opensymphony.xwork2.ActionSupport
implements org.apache.struts2.util.ServletContextAware

管理 Bundle 的 Action

从以下版本开始:
1.0
另请参见:
序列化表格

字段摘要
static String BACKUP_BUNDLES_LOCATION
          bundle备份目录
static String BUNDLE_LOCATION
          bundle存放目录
static String BUSINESS_LEVEL
          业务 Bundle 的级别
static String CLASS_LOCATION
          class 文件存放目录
static String FIVE_PATH
           
static String FOUR_PATH
           
static String THREE_PATH
           
static String TWO_PATH
           
static String WEB_APP_ROOT
          获得 webapp 的根目录
 
从类 com.opensymphony.xwork2.ActionSupport 继承的字段
LOG
 
从接口 com.opensymphony.xwork2.Action 继承的字段
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
构造方法摘要
BundlesAction()
           
 
方法摘要
 String displayProperty(Object obj)
           
 org.osgi.framework.Bundle getBundle()
          通过 Bundle 的 ID 获取对应的 Bundle 实例
 String getBundleFlag()
           
 String getBundlePath()
           
 Collection<org.osgi.framework.Bundle> getBundles()
          根据条件查询 bundle:全部,系统,业务
 String getBundleState(org.osgi.framework.Bundle bundle)
          获取 Bundle 的状态字符串
 String getCurrentLevel()
           
 String getFailureString()
           
 ArrayList<String> getHeaderKeys()
           
 String getId()
           
 String getLevel()
           
 String getMessage()
           
 Object getModules()
          获取指定 Bundle 下的所有 module
 String getNoData()
           
 Object getOperations()
          获取指定 Bundle 下的所有 operation
 String getOutput()
           
 List<com.opensymphony.xwork2.config.entities.PackageConfig> getPackages()
          获取指定 Bundle 下 Struts.xml 配置文件中的的所有 package
 javax.servlet.http.HttpServletRequest getRequest()
           
 String index()
           
 String install()
           
 boolean isAllowedAction(org.osgi.framework.Bundle bundle, String val)
          判断 Bundle 是否可以执行指定的操作
 boolean isFailure()
           
 boolean isStrutsEnabled(org.osgi.framework.Bundle bundle)
          检查 Bundle 是否为 Struts Bundle
 String refresh()
          通过命令来实现更新操作,直接点击 bundle 进行刷新操作
 String refreshWithPara(org.osgi.framework.Bundle bundle)
          通过命令来实现更新操作
 void setBundleAccessor(org.apache.struts2.osgi.BundleAccessor bundleAccessor)
           
 void setBundleFlag(String bundleFlag)
           
 void setBundlePath(String bundlePath)
           
 void setConfiguration(com.opensymphony.xwork2.config.Configuration configuration)
           
 void setCurrentLevel(String currentLevel)
           
 void setFailure(boolean failure)
           
 void setFailureString(String failureString)
           
 void setId(String id)
           
 void setLevel(String level)
           
 void setMessage(String message)
           
 void setRequest(javax.servlet.http.HttpServletRequest request)
           
 void setServletContext(javax.servlet.ServletContext servletContext)
           
 String start()
          启动 Bundle
 String stop()
          停止 Bundle
 String update()
          更新 Bundle 的状态
 String upload()
          添加或者更新bundle前,上传 Bundle 的 jar 包
 String view()
           
 
从类 com.opensymphony.xwork2.ActionSupport 继承的方法
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, doDefault, execute, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getFormatted, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, validate
 
从类 java.lang.Object 继承的方法
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

WEB_APP_ROOT

public static final String WEB_APP_ROOT
获得 webapp 的根目录


CLASS_LOCATION

public static final String CLASS_LOCATION
class 文件存放目录

另请参见:
常量字段值

BUNDLE_LOCATION

public static final String BUNDLE_LOCATION
bundle存放目录

另请参见:
常量字段值

BACKUP_BUNDLES_LOCATION

public static final String BACKUP_BUNDLES_LOCATION
bundle备份目录

另请参见:
常量字段值

BUSINESS_LEVEL

public static final String BUSINESS_LEVEL
业务 Bundle 的级别

另请参见:
常量字段值

FIVE_PATH

public static final String FIVE_PATH
另请参见:
常量字段值

FOUR_PATH

public static final String FOUR_PATH
另请参见:
常量字段值

THREE_PATH

public static final String THREE_PATH
另请参见:
常量字段值

TWO_PATH

public static final String TWO_PATH
另请参见:
常量字段值
构造方法详细信息

BundlesAction

public BundlesAction()
方法详细信息

setConfiguration

public void setConfiguration(com.opensymphony.xwork2.config.Configuration configuration)

setBundleAccessor

public void setBundleAccessor(org.apache.struts2.osgi.BundleAccessor bundleAccessor)

setServletContext

public void setServletContext(javax.servlet.ServletContext servletContext)
指定者:
接口 org.apache.struts2.util.ServletContextAware 中的 setServletContext

getFailureString

public String getFailureString()

setFailureString

public void setFailureString(String failureString)

isFailure

public boolean isFailure()

setFailure

public void setFailure(boolean failure)

getCurrentLevel

public String getCurrentLevel()

setCurrentLevel

public void setCurrentLevel(String currentLevel)

getLevel

public String getLevel()

setLevel

public void setLevel(String level)

getMessage

public String getMessage()

setMessage

public void setMessage(String message)

getRequest

public javax.servlet.http.HttpServletRequest getRequest()

setRequest

public void setRequest(javax.servlet.http.HttpServletRequest request)

getBundlePath

public String getBundlePath()

setBundlePath

public void setBundlePath(String bundlePath)

getOutput

public String getOutput()

getBundleFlag

public String getBundleFlag()

setBundleFlag

public void setBundleFlag(String bundleFlag)

getId

public String getId()

setId

public void setId(String id)

index

public String index()

view

public String view()

install

public String install()

start

public String start()
             throws org.osgi.framework.BundleException
启动 Bundle

返回:
抛出:
org.osgi.framework.BundleException - 启动失败时抛出此异常

stop

public String stop()
            throws org.osgi.framework.BundleException
停止 Bundle

返回:
抛出:
org.osgi.framework.BundleException - 停止 Bundle 发生异常时,抛出此异常

refresh

public String refresh()
               throws org.osgi.framework.BundleException
通过命令来实现更新操作,直接点击 bundle 进行刷新操作

返回:
抛出:
org.osgi.framework.BundleException

refreshWithPara

public String refreshWithPara(org.osgi.framework.Bundle bundle)
                       throws org.osgi.framework.BundleException
通过命令来实现更新操作

返回:
抛出:
org.osgi.framework.BundleException

update

public String update()
              throws org.osgi.framework.BundleException
更新 Bundle 的状态

返回:
抛出:
org.osgi.framework.BundleException

isStrutsEnabled

public boolean isStrutsEnabled(org.osgi.framework.Bundle bundle)
检查 Bundle 是否为 Struts Bundle

参数:
bundle -
返回:

getBundle

public org.osgi.framework.Bundle getBundle()
通过 Bundle 的 ID 获取对应的 Bundle 实例

返回:

getPackages

public List<com.opensymphony.xwork2.config.entities.PackageConfig> getPackages()
获取指定 Bundle 下 Struts.xml 配置文件中的的所有 package

返回:

getNoData

public String getNoData()

getModules

public Object getModules()
获取指定 Bundle 下的所有 module

返回:
抛出:
NoSuchMethodException
SecurityException

getOperations

public Object getOperations()
获取指定 Bundle 下的所有 operation

返回:

getHeaderKeys

public ArrayList<String> getHeaderKeys()
返回:
Bundle 的头信息的所有 key

getBundles

public Collection<org.osgi.framework.Bundle> getBundles()
根据条件查询 bundle:全部,系统,业务

返回:

upload

public String upload()
添加或者更新bundle前,上传 Bundle 的 jar 包

返回:

displayProperty

public String displayProperty(Object obj)

getBundleState

public String getBundleState(org.osgi.framework.Bundle bundle)
获取 Bundle 的状态字符串

参数:
bundle -
返回:

isAllowedAction

public boolean isAllowedAction(org.osgi.framework.Bundle bundle,
                               String val)
判断 Bundle 是否可以执行指定的操作

参数:
bundle - 要进行操作的 Bundle
val - 要进行操作的命令,如:start、stop、update 等
返回:
可以执行指定的操作,则返回 true,反之则返回 false


Copyright © 2014 广联达软件股份有限公司(Glodon Software Co., Ltd.). All rights reserved.