📄 servicetag.java
字号:
/* * ServiceTag.java * * Created on July 31, 2003, 11:10 AM */package gov.nist.struts.webapp.upload;/** * Class representing a service in a xml mapping file * All services of the users are stored in a xml mapping file * if the server is shutdown we can retrieve easily * all the services and their state. * @author DERUELLE Jean */public class ServiceTag { /**the main class' fully qualified name of the service*/ private String mainClass = null; /**the name of the file which has been uplaoded (either a jar file or .class file)*/ private String fileName = null; /**lag to know if the RewriterProcessor must * rewrite the bytecode before executing the service or if it has already been rewritten*/ private boolean toRewrite = false; /** * The type of service uploaded (Actually only support Java or SLEE) */ protected String serviceType=null; /** * Creates a new instance of ServiceTag */ public ServiceTag() { } /** * Creates a new instance of ServiceTag * @param mainClass - the main class' fully qualified name of the service * @param fileName - the name of the file which has been uplaoded (either a jar file or .class file) * @param toRewrite - flag to know if the RewriterProcessor must * rewrite the bytecode before executing the service or if it has already been rewritten */ public ServiceTag( String mainClass, String fileName, String serviceType, boolean toRewrite) { this.mainClass=mainClass; this.fileName=fileName; this.toRewrite=toRewrite; this.serviceType=serviceType; } /** * Retrieve the uploaded file name of the service * @return the uploaded file name of the service */ public String getFileName() { return fileName; } /** * Set the uploaded file name of the service * @param fileName - the uploaded file name of the service */ public void setFileName(String fileName) { this.fileName=fileName; } /** * Retrieve the main class' fully qualified name of the service * @return the main class' fully qualified name of the service */ public String getMainClass() { return mainClass; } /** * Set the main class' fully qualified name of the service * @param mainClass - the main class' fully qualified name of the service */ public void setMainClass(String mainClass) { this.mainClass=mainClass; } /** * Retrieve the flag to know if the RewriterProcessor must * rewrite the bytecode before executing the service or if it has already been rewritten * @return flag to know if the RewriterProcessor must * rewrite the bytecode before executing the service or if it has already been rewritten */ public boolean getToRewrite() { return toRewrite; } /** * Set the flag to know if the RewriterProcessor must * rewrite the bytecode before executing the service or if it has already been rewritten * @param toRewrite - the flag to know if the RewriterProcessor must * rewrite the bytecode before executing the service or if it has already been rewritten */ public void setToRewrite(boolean toRewrite) { this.toRewrite=toRewrite; } /** * Retrieve the type of service which is gonna be uploaded * @return the type of service which is gonna be uploaded */ public String getServiceType() { return serviceType; } /** * Set the type of service which is gonna be uploaded * @param serviceType - the type of service which is gonna be uploaded */ public void setServiceType(String serviceType) { this.serviceType = serviceType; } /** * Get XML String representation of the service * @return the XML String representation of the service */ public String toXMLString(){ return "<service Main-Class=\""+mainClass+ "\" fileName=\""+fileName+ "\" serviceType=\""+serviceType+ "\" toRewrite=\""+String.valueOf(toRewrite)+"\" />"; } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -