API... 4 Class Cache... 6 Class ConnectionPool... 11 Class DataBind... 23 Class Log... 27 Class Mail... 31 Class Module... 38 Class Monitor... 50 Class Service... 55 Class Viewer... 59 Class Servlet...... 67 API... 80 Class Program... 82 Class Publisher... 88 Class Scheduler... 92 Class TaskHolidayInfo... 139 Class TaskHolidayGroupInfo... 143 API... 147 Interface Repository... 148 Class RepositoryEX... 197... 222 FORCS Co., LTD 1
OZ API Developer's Guide (for Java) API... 229 OZLauncherDll... 230 RDB Store DataAction... 232 RDB Store DataAction... 233 RDB Store DataAction... 234 User Data Store... 236 UDS... 237 User Security Logic... 238 USL... 239 USL... 241 USL... 244 User Defined Log... 255 UDL... 256 UDL... 257 UDL... 271... 303... 304... 304 2 FORCS Co., LTD
C... 306 SchedulerCom... 323 FORCS Co., LTD 3
OZ API Developer's Guide (for Java) API Class Cache Class ConnectionPool Class DataBind Class Log Class Mail Class Module Class Monitor Class Service Class Viewer Class Servlet 4 FORCS Co., LTD
API. API. Cache Connection Pool DataBind Log Mail Module Monitor Service Viewer Servlet.. Pool JDBC/ODBC,..,,....,,,.,. OZD. API. ozsfw50.jar log4.jar Scheduler server. Server Log. (API classpath "log4.jar" ) FORCS Co., LTD 5
OZ API Developer's Guide (for Java) Constructor Summary Cache(String ip, int port, String id, String pw, boolean bautologin, boolean useusl) Cache(String url, String id, String pw, boolean bautologin, boolean useusl) Method Summary SortProperties getcacheconfiguration() void setcacheconfiguration(sortproperties p) Constructor Detail //Daemon - TCP Server public Cache(String ip, int port, String id, String pw, boolean bautologin, boolean useusl) //Servlet - HTTP Server public Cache(String url, String id, String pw, boolean bautologin, boolean useusl) url ip port id Servlet URL ex) String url = "http://127.0.0.1/oz/server"; Daemon IP ex) String ip = "127.0.0.1"; Daemon ex) int port = 8003; ex) String id = "admin"; 6 FORCS Co., LTD
pw bautologin useusl ex) String pw = "admin"; ex) boolean bautologin = true; USL ex) boolean useusl = false; Method Detail getcacheconfiguration public SortProperties getcacheconfiguration() throws OZCPException. "SortProperties" key. setcacheconfiguration public void setcacheconfiguration(sortproperties p) throws OZCPException. "SortProperties" key. p Class OZCPException(oz.framework.cp.OZCPException) API Exception. API OZCPException. - getmessage public String getmessage(). FORCS Co., LTD 7
OZ API Developer's Guide (for Java) geterrorcode public int geterrorcode(). SortProperties(oz.util.SortProperties.java) getcacheconfiguration(), setcacheconfiguration(). - getproperty / get public synchronized String getproperty(string key) public synchronized Object get(string key) key. setproperty / put public synchronized Object setproperty(string key, String value) public synchronized Object put(object key, Object value) key (value). - Key getproperty() setproperty() key. Key Value Active CACHE_FILE_PATH "true" "false" ex) p.setproperty("datamodule.active", "false"); ex) p.setproperty("cache_file_path","%oz_home%/cach e"); DM_CACHE_FILE_P ATH Data Module ex) p.setproperty("dm_cache_file_path","%oz_home%/ cache_dm/"); 8 FORCS Co., LTD
memorycachevalid Time diskcachevalidtime (:) ex) p.setproperty("datamodule.memorycachevalidtime", "100"); (:) ex) p.setproperty("datamodule.diskcachevalidtime","100"); FreeMemoryPercent age ex) p.setproperty("datamodule.freememorypercentage", "20"); : " cachemngr.properties". Sample : CacheSample.java package sample; import oz.framework.api.cache; import org.apache.log4j.*; import oz.util.sortproperties; public class CacheSample { public static void main(string[] args) { //. BasicConfigurator.configure(); // OZServer Info. //* // Daemon String IP = "127.0.0.1"; // IP int PORT = 8003; // TCP /*/ // Servlet String URL = "http://www.oz.com/oz/server"; //Servlet URL /**/ // User Info. String ID = "admin"; //default String PWD = "admin"; //default Cache cache = null; try { FORCS Co., LTD 9
OZ API Developer's Guide (for Java) //* // Daemon cache = new Cache(IP, PORT, ID, PWD, false, false); /*/ // Servlet cache = new Cache(URL, ID, PWD, false, false); /**/ SortProperties p = new SortProperties(); /*/ // (setcacheconfiguration) p.setproperty("cache_file_path", "%OZ_HOME%/cache"); // p.setproperty("dm_cache_file_path", "%OZ_HOME%/cache_dm"); // DataModule p.setproperty("datamodule.active", "true"); // p.setproperty("datamodule.memorycachevalidtime", "1000"); // p.setproperty("datamodule.diskcachevalidtime", "1000"); // p.setproperty("datamodule.freememorypercentage", "21"); // cache.setcacheconfiguration(p); /*/ // (getcacheconfiguration) p = cache.getcacheconfiguration(); /**/ p.list(system.out); catch(exception e) { e.printstacktrace(); 10 FORCS Co., LTD
Constructor Summary ConnectionPool(String ip, int port, String id, String pw, boolean bautologin, boolean useusl) ConnectionPool(String url, String id, String pw, boolean bautologin, boolean useusl) Method Summary void addpool(connectionpoolinfo pool) void removepool(string pool) ConnectionPoolInfo[] getpoolinfolist() ConnectionPoolStatus[] getpoolstatuslist() ConnectionPoolInfo getpoolinfo(string alias) void save() Constructor Detail //Daemon - TCP Server public ConnectionPool(String ip, int port, String id, String pw, boolean bautologin, boolean useusl) //Servlet - HTTP Server public ConnectionPool(String url, String id, String pw, boolean bautologin, boolean useusl) url ip Servlet URL ex) String url = "http://127.0.0.1/oz/server"; Daemon IP ex) String ip = "127.0.0.1"; FORCS Co., LTD 11
OZ API Developer's Guide (for Java) port id pw bautologin useusl Daemon ex) int port = 8003; ex) String id = "admin"; ex) String pw = "admin"; ex) boolean bautologin = true; USL ex) boolean useusl = false; Method Detail addpool public void addpool(connectionpoolinfo pool) throws OZCPException ConnectionPool. ConnectionPool "ConnectionPoolInfo". pool ConnectionPool ConnectionPoolInfo removepool public void removepool(string pool) throws OZCPException ConnectionPool. pool ConnectionPool getpoolinfolist public ConnectionPoolInfo[] getpoolinfolist() throws OZCPException ConnectionPool ConnectionPoolInfo. getpoolstatuslist public ConnectionPoolStatus[] getpoolstatuslist() throws OZCPException 12 FORCS Co., LTD
ConnectionPool. getpoolinfo public ConnectionPoolInfo getpoolinfo(string alias) throws OZCPException ConnectionPool ConnectionPoolInfo. alias ConnectionPool save public void save() throws OZCPException ConnectionPool. Class ConnectionPoolInfo(oz.framework.db.ConnectionPoolInfo.class). - getalias public String getalias() Pool alias. setalias public void setalias(string _alias) Pool alias. _alias Alias getvendor public String getvendor() Pool Vendor. setvendor public void setvendor(string vendorname) FORCS Co., LTD 13
OZ API Developer's Guide (for Java) Pool DB Vendor. vendorname DB Vendor getdriver public String getdriver() Pool Driver. ) oracle.jdbc.driver.oracledriver setdriver public void setdriver(string _driver) Pool Driver. _driver Driver geturl public String geturl() Pool URL. seturl public void seturl(string _url) Pool URL. _url URL getinitconns public int getinitconns() Pool. setinitconns public void setinitconns(int _initconns) Pool _initconns getmaxconns public int getmaxconns() 14 FORCS Co., LTD
Pool. setmaxconns public void setmaxconns(int _maxconns) Pool _maxconns gettimeout public int gettimeout() timeout. ( : sec) settimeout public void settimeout(int _timeout) timeout. _timeout timeout getdoconnectioncheck public boolean getdoconnectioncheck() setdoconnectioncheck public void setdoconnectioncheck(boolean _check). _check gettestquerystring public String gettestquerystring(). settestquerystring public void settestquerystring(string _testquery). _testquery FORCS Co., LTD 15
OZ API Developer's Guide (for Java) getinitsqls public String getinitsqls() Pool. setinitsqls public void setinitsqls(string _initquery) Pool. _initquery Init getclosesqls public String getclosesqls() close free. setclosesqls public void setclosesqls(string _closequery) close free. _closequery Close getsessionquery public String getsessionquery() session. setsessionquery public void setsessionquery(string _sessionquery) session. _sessionquery Session getautocommit public String getautocommit() AutoCommit. setautocommit 16 FORCS Co., LTD
public void setautocommit(string _commit) AutoCommit. _commit AutoCommit : "true", "false". getproperties public Properties getproperties() Properties. setproperties public void setproperties(properties _props) Propeties. ) ConnectionPoolInfo cpi = new ConnectionPoolInfo();... Driver driver = loaddriver(cpi.getdriver()); Connection conn = driver.connect(cpi.geturl(), cpi.getproperties()); _props properties getkey public String getkey() Pool unique Key. connection pool key unique. dbconfig.xml Vendor Items Key. setkey public void setkey(string _key) unique Key. dbconfig.xml Vendor Items Key. _key key getitems public HashMap getitems() dbconfig.xml Vendor Items key, Value. FORCS Co., LTD 17
OZ API Developer's Guide (for Java) setitems public void setitems(string _map) dbconfig.xml Vendor Items key value. ) HashMap infos = new HashMap(); infos.put("serveraddress", "127.0.0.1"); infos.put("portno", "1433"); infos.put("dbname", "master"); infos.put("user", "sa"); infos.put("password", "1588"); poolinfo.setitems(infos); _map key getdecodecharset public void getdecodecharset() ConnectionPool. setdecodecharset public void setdecodecharset(string decode) ConnectionPool. decode ConnectionPool getencodecharset public String getencodecharset() ConnectionPool. setencodecharset public void setencodecharset(string encode) ConnectionPool. encode ConnectionPool ConnectionPoolStatus(oz.framework.db.ConnectionPoolStatus.class) ConnectionPool. - public final static int OK = 1; 18 FORCS Co., LTD
ConnectionPool.. 1-1 -2 OK ConnectionPool DRIVER_ERROR ConnectionPool JDBC CONNECTION_ERROR ConnectionPool DBMS public final static int DRIVER_ERROR = -1; public final static int CONNECTION_ERROR = -2; - getstatusstring public String getstatusstring(). STATUS 1 OK, STATUS -1 Fail to load or register JDBC driver Fail to make initial connection getstatus public int getstatus(). STATUS. getfreeconnectioncount public int getfreeconnectioncount(). getcheckedoutconnectioncount public int getcheckedoutconnectioncount() Checked out. FORCS Co., LTD 19
OZ API Developer's Guide (for Java) geterrormessage public String geterrormessage() Pool Error Message. Sample : ConnectionPoolSample.java package sample; import java.util.hashmap; import oz.framework.api.connectionpool; import oz.framework.db.connectionpoolinfo; import oz.framework.db.connectionpoolstatus; import org.apache.log4j.*; public class ConnectionPoolSample { public static void main(string[] args) { //. BasicConfigurator.configure(); // OZServer Info. //* // Daemon String IP = "127.0.0.1"; // IP int PORT = 8003; // TCP /*/ // Servlet String URL = "http://www.oz.com/oz/server"; //Servlet URL /**/ // User Info. String ID = "admin";//default String PWD = "admin";//default ConnectionPool conpool = null; try { //* // Daemon conpool = new ConnectionPool(IP, PORT, ID, PWD, false, false); /*/ // Servlet conpool = new ConnectionPool(URL, ID, PWD, false, false); 20 FORCS Co., LTD
/**/ // (addpool) ConnectionPoolInfo poolinfo = new ConnectionPoolInfo(); poolinfo.setalias("forcs"); // poolinfo.setvendor("mssql"); // ( MSSQL) //. // map dbconfig.xml db jdbc url HashMap infos = new HashMap(); infos.put("serveraddress", "127.0.0.1"); infos.put("portno", "1433"); infos.put("dbname", "master"); infos.put("user", "sa"); infos.put("password", "1588"); poolinfo.setitems(infos); poolinfo.setmaxconns(20); // poolinfo.setinitconns(1); // // //poolinfo.setencodecharset("8859_1"); //poolinfo.setdecodecharset("ksc5601"); conpool.addpool(poolinfo); // (removepool) String conpoolname = "forcs"; // conpool.removepool(conpoolname); // ConnectionPoolStatus (getpoolstatuslist) ConnectionPoolStatus[] poolstatuslist=conpool.getpoolstatuslist(); for (int i = 0; i < poolstatuslist.length; i++) { ConnectionPoolStatus cps = poolstatuslist[i]; ()); // System.out.println(i); System.out.println("Statusstring=" + cps. getstatusstring // System.out.println("free=" + new Integer(cps.getFreeConnectionCount())); // System.out.println("checkedout=" + new Integer(cps.getCheckedOutConnectionCount())); System.out.println(); FORCS Co., LTD 21
OZ API Developer's Guide (for Java) // (save) conpool.save(); catch(exception e) { e.printstacktrace(); 22 FORCS Co., LTD
Constructor Summary DataBind(String ip, int port, String id, String pw, boolean bautologin, boolean useusl) DataBind(String url, String id, String pw, boolean bautologin, boolean useusl) Method Summary void setdatabindconfigration(sortproperties config) SortProperties getdatabindconfigration() Constructor Detail //Daemon - TCP Server public DataBind(String ip, int port, String id, String pw, boolean bautologin, boolean useusl) //Servlet - HTTP Server public DataBind(String url, String id, String pw, boolean bautologin, boolean useusl) url ip port id Servlet URL ex) String url = "http://127.0.0.1/oz/server"; Daemon IP ex) String ip = "127.0.0.1"; Daemon ex) int port = 8003; ex) String id = "admin"; FORCS Co., LTD 23
OZ API Developer's Guide (for Java) pw bautologin useusl ex) String pw = "admin"; ex) boolean bautologin = true; USL ex) boolean useusl = false; Method Detail setdatabindconfigration public void setdatabindconfigration(sortproperties config) throws OZCPException DataBind, "databind.properties". config DataBind getdatabindconfigration public SortProperties getdatabindconfigration() throws OZCPException DataBind, "databind.properties". - Key setdatabindconfigration() getdatabindconfigration() key. Key Value ConcurrentFetch Size FetchType "Concurrent" Stream. byte, 4096, 256. :,. 24 FORCS Co., LTD
ConcurrentFirstR ow FetchType "Concurrent"., 0. : 0. Sample : DataBindSample.java package sample; import oz.framework.api.databind; import org.apache.log4j.*; import oz.util.sortproperties; public class DataBindSample { public static void main(string[] args) { //. BasicConfigurator.configure(); // OZServer Info. String IP = "127.0.0.1"; // IP int PORT = 8003; // TCP // User Info. String ID = "admin"; //default String PWD = "admin"; //default DataBind databind = null; try { databind = new DataBind(IP, PORT, ID, PWD, false, false); SortProperties p = new SortProperties(); // (setdatabindconfiguration) //Stream p.setproperty("concurrentfetchsize", "4096"); // row p.setproperty("concurrentfirstrow", "0"); databind.setdatabindconfiguration(p); // (getdatabindconfiguration) p = databind.getdatabindconfigration(); java.util.vector vec = p.propertynames(); for(int i=0; i<vec.size(); i++) { FORCS Co., LTD 25
OZ API Developer's Guide (for Java) String name = (String)vec.elementAt(i); System.out.println(name + "=" + p.getproperty(name)); catch (Exception e) { e.printstacktrace(); 26 FORCS Co., LTD
Constructor Summary Log(String ip, int port, String id, String pw, boolean bautologin, boolean useusl) Log(String url, String id, String pw, boolean bautologin, boolean useusl) Method Summary String getconfiguration() byte[] downloadlog() void downloadlog(string filename) void setconfiguration(string logs) void setpriority(string p) Constructor Detail //Daemon - TCP Server public Log(String ip, int port, String id, String pw, boolean bautologin, boolean useusl) //Servlet - HTTP Server public Log(String url, String id, String pw, boolean bautologin, boolean useusl) url ip port Servlet URL ex) String url = "http://127.0.0.1/oz/server"; Daemon IP ex) String ip = "127.0.0.1"; Daemon ex) int port = 8003; FORCS Co., LTD 27
OZ API Developer's Guide (for Java) id pw bautologin useusl ex) String id = "admin"; ex) String pw = "admin"; ex) boolean bautologin = true; USL ex) boolean useusl = false; Method Detail getconfigure public String getconfigure() throws OZCPException. downloadlog public byte[] downloadlog() throws OZCPException. downloadlog public void downloadlog(string filename) throws OZCPException, IOException. filename setconfigure public void setconfigure(string logs) throws OZCPException. logs, "key=value" ex) String logs="priority=debug" ex) String logs="console.layout=%r[%t]%p%c{1%x-%m%n 28 FORCS Co., LTD
setpriority public void setpriority(string p) throws OZCPException.(INFO, DEBUG, ERROR) p Sample : LogSample.java package sample; import oz.framework.api.log; import org.apache.log4j.*; public class LogSample { public static void main(string[] args) { //. BasicConfigurator.configure(); // OZServer Info. // Daemon String IP = "127.0.0.1"; // IP int PORT = 8003; // TCP // Servlet String URL = "http://www.oz.com/oz/server"; //Servlet URL // User Info. String ID = "admin"; //default String PWD = "admin"; //default Log log = null; try { // Daemon log = new Log(IP, PORT, ID, PWD, false, false); // Servlet //log = new Log(URL, ID, PWD, false, false); //comment // (getconfigure) String conf = null; conf = log.getconfigure(); System.out.println(conf); // (setconfigure, setproirity) String logs = "Priority=INFO"; //log.setconfigure(logs); log.setpriority("debug"); // (downloadlog) byte b[] = log.downloadlog(); String filename = "server.log"; //. FORCS Co., LTD 29
OZ API Developer's Guide (for Java) log.downloadlog(filename); catch(exception e) { e.printstacktrace(); 30 FORCS Co., LTD
Constructor Summary Mail(String ip, int port, String id, String pw, boolean bautologin, boolean useusl) Mail(String url, String id, String pw, boolean bautologin, boolean useusl) Method Summary void addalias(string aliasname, SortProperties p) throws OZCPException SortProperties getaliasconfig(string aliasname) throws OZCPException String[] getmailaliasnames() void modifyalias(string aliasname, String newaliasname, SortProperties p) throws OZCPException void removealias(string aliasname) throws OZCPException void send(string aliasname, String from, String fromusername, String to, String cc, String bcc, String subject, String context, boolean ishtml, String localfilefullpath, String filename) throws OZCPException boolean sendsync(string aliasname, String from, String fromusername, String to, String cc, String bcc, String subject, String context, boolean ishtml, String localfilefullpath, String filename) throws OZCPException Constructor Detail //Daemon - TCP Server public Mail(String ip, int port, String id, String pw, boolean bautologin, boolean useusl) //Servlet - HTTP Server public Mail(String url, String id, String pw, boolean bautologin, boolean useusl) FORCS Co., LTD 31
OZ API Developer's Guide (for Java) url ip port id pw bautologin useusl Servlet URL ex) String url = "http://127.0.0.1/oz/server"; Daemon IP ex) String ip = "127.0.0.1"; Daemon ex) int port = 8003; ex) String id = "admin"; ex) String pw = "admin"; ex) boolean bautologin = true; USL ex) boolean useusl = false; Method Detail addalias public void addalias(string aliasname, SortProperties p) throws OZCPException. aliasname p key "Option". getaliasconfig public SortProperties getaliasconfig(string aliasname) throws OZCPException. aliasname getmailaliasnames 32 FORCS Co., LTD
public String[] getmailaliasnames() mail.properties. : active. modifyalias public void modifyalias(string aliasname, String newaliasname, SortProperties p) throws OZCPException. aliasname newaliasname p key "Option". removealias public void removealias(string aliasname) throws OZCPException. aliasname send public void send(string aliasname, String from, String fromusername, String to, String cc, String bcc, String subject, String context, boolean ishtml, String localfilefullpath, String filename) throws OZCPException. aliasname from fromusername to null "" cc null "", "," ";" FORCS Co., LTD 33
OZ API Developer's Guide (for Java) bcc subject context ishtml localfilefullpath filename null "", "," ";" HTML " " : " ". sendsync public boolean sendsync(string aliasname, String from, String fromusername, String to, String cc, String bcc, String subject, String context, boolean ishtml, String localfilefullpath, String filename) throws OZCPException. aliasname from fromusername to cc bcc subject context ishtml null "" null "", "," ";" null "", "," ";" HTML localfilefullpath 34 FORCS Co., LTD
filename " " : " ". Option Key Value active fromsend tosend SMTPServer SMTPServerPort SMTPUserID SMTPUserPassword SMTPUserID_encrypted SMTPUserPassword_en crypted true/false SMTP URL SMTP SMTP ID SMTP ID SMTP ID SMTP ID ex) setproperty("active", "true") ex) setproperty("fromsend", "mail@forcs.com") ex) setproperty("tosend", "mail@forcs.com") SMTP URL ex) setproperty("smtpserver", "mail.forcs.com") SMTP ex) setproperty("smtpserverport", "25") SMTP ID ex) setproperty("smtpuserid", "UserID") SMTP ID ex) setproperty("smtpuserpassword", "Password") SMTP ID ex) setproperty("smtpuserid_encrypted", "ScPdRcRgFgHdEbJaJbPcFc") SMTP ex) setproperty("smtpuserpassword_encrypted", "ScPdRcRgFgEbGaDbKbFbMaIbPa") FORCS Co., LTD 35
OZ API Developer's Guide (for Java) EnableSSL SendRetryCount true/false SSL ex) setproperty("enablessl", "true") ex) setproperty("sendretrycount", "3") SendRetryPeriodTime PrefixSubjectMessage ( : ) ex) setproperty("sendretryperiodtime", "10") ex) setproperty("prefixsubjectmessage", "[Forcs]") Sample : MailSample.java package sample; import oz.framework.api.mail; import oz.util.sortproperties; public class MailSample { public static void main(string[] args) throws Exception { Mail mail = new Mail("127.0.0.1", 8003, "admin", "admin", true, false); SortProperties props = new SortProperties(); props.setproperty("active", "true"); props.setproperty("fromsend", "forcs@forcs.com"); props.setproperty("tosend", "oz@forcs.com"); props.setproperty("smtpserver", "smtp.gmail.com"); props.setproperty("smtpserverport", "465"); props.setproperty("smtpuserid", "forcs@forcs.com"); props.setproperty("smtpuserpassword", "UserPassword"); props.setproperty("enablessl", "true"); mail.addalias("forcs", props); mail.sendsync("forcs", "forcs@forcs.com", "User Name", "oz@gmail.com", null, null, "Mail Subject", "Mail Contextt", false, "d:\\parameter_test.ozd", "test.ozd"); props = mail.getaliasconfig("forcs"); mail.modifyalias("forcs", "forcs2", props); 36 FORCS Co., LTD
mail.addalias("forcs", props); mail.addalias("forcs4", props); mail.addalias("forcs3", props); mail.removealias("forcs3"); String[] names = mail.getmailaliasnames(); for(int i = 0; i < names.length; i++) { SortProperties aliasprops = mail.getaliasconfig(names[i]); java.util.iterator propnames = aliasprops.propertynames().iterator(); while (propnames.hasnext()) { String propname = (String) propnames.next(); System.out.println(propName + "=" + aliasprops.getproperty(propname)); FORCS Co., LTD 37
OZ API Developer's Guide (for Java) Constructor Summary Module(String ip, int port, String id, String pw, boolean bautologin, boolean useusl) Module(String url, String id, String pw, boolean bautologin, boolean useusl) Method Summary Inputstring getozd(string item, String category, String[] urls) InputStream getozu(string item, String category, String[] urls) void addodiparameter(string odiname, String key, String value) void addodiparameter(string odiname, String item, String category, Hashtable paramhash) void addparameter(string key, String value) void addapplicationparameter(string key, String value) void registodipath (String odiname, String path) void saveozd(string filename, String item, String category, String[] urls) void saveozu(string filename, String item, String category, String[] urls) public IReportInfo addreport(string itemname, String categoryname) throws OZCPException public IReportInfo addreport(string itemname, String categoryname, String displayname) throws OZCPException public InputStream getozd() throws OZCPException public void saveozd(string filename) throws OZCPException public void setmemoallowed(boolean allowed) public void setpassword(string password) 38 FORCS Co., LTD
Constructor Detail //Daemon - TCP Server public Module(String ip, int port, String id, String pw, boolean bautologin, boolean useusl) //Servlet - HTTP Server public Module(String url, String id, String pw, boolean bautologin, boolean useusl) url ip port id pw bautologin useusl Servlet URL ex) String url = "http://127.0.0.1/oz/server"; Daemon IP ex) String ip = "127.0.0.1"; Daemon ex) int port = 8003; ex) String id = "admin"; ex) String pw = "admin"; ex) boolean bautologin = true; USL ex) boolean useusl = false; Method Detail getozd public InputStream getozd(string item, String category, String[] urls) throws OZCPException FORCS Co., LTD 39
OZ API Developer's Guide (for Java) OZD, OZD urls. : API serverdmtype serverdmtype DM_TYPE="Memory", FetchType="Batch".. item category urls ( OZR ) OZD URL getozu public InputStream getozu(string item, String category, String[] urls) throws OZCPException SDM OZU. : API DM_TYPE="Momory", FetchType="Batch".. : "FetchUnit" "DM_PER_DATAMODULE". item category urls ( OZA ) OZU URL addodiparameter public void addodiparameter(string odiname, String key, String value) SDM ODI ODI. ODI ODI. odiname ODI key value ODI ODI 40 FORCS Co., LTD
addodiparameter public void addodiparameter(string odiname, String item, String category, Hashtable paramhash) throws IllegalException SDM ODI ODI. ODI ODI. ODI SDM SDM. odiname item category paramhash ODI ODI ODI Key, Value Hashtable : OZU paramhash OZU addodiparameter() paramhash null addapplicationparameter(key,value) ODI. ex) addapplicationparameter module.addapplicationparameter("odi.odinames", "sample"); module.addapplicationparameter("odi.sample.pcount", "1"); module.addapplicationparameter("odi.sample.args1", "deptid=501"); addparameter public void addparameter(string key, String value) SDM.. key value setmemoallowed public void setmemoallowed(boolean allowed). allowed setpassword FORCS Co., LTD 41
OZ API Developer's Guide (for Java) public void setpassword(string password). password addapplicationparameter public void addapplicationparameter(string key, String value) SDM. ODI ODI ODI. key ODI value ODI registodipath public void registodipath (String odiname, String path) throws IllegalException OZD ODI. odiname path ODI ODI saveozd public void saveozd(string filename, String item, String category, String[] urls) throws OZCPException OZD. : API DM_TYPE="Momory", FetchType="Batch".. filename item category Urls OZD (.ozr) (.ozr) OZD URL saveozu 42 FORCS Co., LTD
public void saveozu(string filename, String item, String category, String[] urls) throws OZCPException OZU. : API DM_TYPE="Momory", FetchType="Batch".. : "FetchUnit" "DM_PER_DATAMODULE". filename item category Urls OZU (.oza) (.oza) OZU URL addreport public IReportInfo addreport(string itemname, String categoryname) throws OZCPException OZD. itemname categoryname public IReportInfo addreport(string itemname, String categoryname, String displayname) throws OZCPException OZD. itemname categoryname displayname getozd public InputStream getozd() throws OZCPException OZD. saveozd public void saveozd(string filename) throws OZCPException FORCS Co., LTD 43
OZ API Developer's Guide (for Java) OZD OZD. filename Interface IReportInfo(oz.framework.api.IReportInfo) OZD. getitemname public String getitemname(). getcategoryname public String getcategoryname(). addurl public void addurl(string[] urls) URL. urls URL public void addurl(string url) URL. url URL addparameter public void addparameter(string key, String value). key value addodiparameter public void addodiparameter(string odiname, String key, String value) 44 FORCS Co., LTD
ODI. odiname key value ODI ODI ODI addproperties public void addproperties(string key, String value). key value key "Option". addframeworkurl public void addframeworkurl(string fxname, String url, String charset) FX URL. fxname url charset FX URL URL null. base64( ), base64/ksc5601 base64/utf-8 ksc5601 utf-8 base64. Sample : ModuleSample.java package sample; import java.io.*; import oz.framework.api.module; import org.apache.log4j.*; public class ModuleSample { FORCS Co., LTD 45
OZ API Developer's Guide (for Java) public static void main(string[] args) { //. BasicConfigurator.configure(); url); // OZServer Info. //* // Daemon String IP = "127.0.0.1"; // IP int PORT = 8003; // TCP /**/ // User Info. String ID = "admin"; //default String PWD = "admin"; //default Module module = null; InputStream stream = null; try { //* // Daemon module = new Module(IP, PORT, ID, PWD, false, false); // ---------------------------------------------------------------- // OZD // set form parameters module.addparameter("formparam1", "ABCD1"); module.addparameter("formparam2", "EFGH2"); // set odi parameters module.addodiparameter("parameter_test", "odiparam1", "IJKL1"); module.addodiparameter("parameter_test", "odiparam2", "LMNO2"); module.setpassword("1234"); module.setmemoallowed(true); String[] url = new String[0]; module.saveozd("c:/parameter_test.ozd", "parameter_test.ozr", "/", catch(exception e) { e.printstacktrace(); Sample : ModuleOZUSample.java package sample; import oz.framework.api.module; import org.apache.log4j.*; 46 FORCS Co., LTD
public class ModuleOZUSample{ public static void main(string[] args){ //. BasicConfigurator.configure(); // OZServer Info. String IP = "127.0.0.1"; // IP int PORT = 8003; // TCP // User Info. String ID = "admin"; //default String PWD = "admin"; //default Module module = null; try{ module = new Module(IP, PORT, ID, PWD, false, /*usl*/ false); //ozu module.addapplicationparameter("odi.fetchunit", "DM_PER_DATAMODULE"); module.addapplicationparameter("odi.odinames", "parameter_test"); module.addapplicationparameter("odi.parameter_test.pcount", "2"); module.addapplicationparameter("odi.parameter_test.args1", "odiparam1=abcd"); module.addapplicationparameter("odi.parameter_test.args2", "odiparam2=1234"); String[] urls = new String[0]; null); module.addodiparameter("parameter_test", "parameter_test.odi", "/", //ozu, oza,, URL module.saveozu("c:/parameter_test.ozu", "parameter_test.oza", "/", urls); catch(exception e){ e.printstacktrace(); Sample : MultiReportSample.java package sample; import org.apache.log4j.*; FORCS Co., LTD 47
OZ API Developer's Guide (for Java) import oz.framework.api.*; public class MultiReportSample{ public static void main(string[] args) throws Exception{ BasicConfigurator.configure(); false); Module maker = new Module("127.0.0.1", 8003, "admin", "admin", true, String[] urls = new String[0]; oz.framework.api.ireportinfo reportinfo = maker.addreport("parameter_test.ozr", "/", "Report1"); reportinfo.addurl(urls); reportinfo.addodiparameter("parameter_test.odi", "odiparam1", "form number 11"); reportinfo.addodiparameter("parameter_test.odi", "odiparam2", "form number 12"); reportinfo.addparameter("formparam1", "form parameters 11"); reportinfo.addparameter("formparam2", "form parameters 12"); reportinfo = maker.addreport("parameter_test.ozr", "/", "Report2"); reportinfo.addurl(urls); reportinfo.addodiparameter("parameter_test.odi", "odiparam1", "form number 21"); reportinfo.addodiparameter("parameter_test.odi", "odiparam2", "form number 22"); reportinfo.addparameter("formparam1", "form parameters 21"); reportinfo.addparameter("formparam2", "form parameters 22"); reportinfo = maker.addreport("parameter_test.ozr", "/", "Report3"); reportinfo.addurl(urls); reportinfo.addodiparameter("parameter_test.odi", "odiparam1", "form number 31"); reportinfo.addodiparameter("parameter_test.odi", "odiparam2", "form number 32"); reportinfo.addparameter("formparam1", "form parameters 31"); reportinfo.addparameter("formparam2", "form parameters 32"); maker.saveozd("c:\\multireport.ozd"); 48 FORCS Co., LTD
UseOzdParameterSample.java package sample; import oz.framework.api.*; public class UseOzdParameterSample { public static void main(string[] args) throws Exception{ oz.framework.api.module module = new oz.framework.api.module("127.0.0.1",8003, "admin", "admin"); oz.framework.api.ireportinfo reportinfo = module.addreport("parameter_test.ozr", "/", "1page"); reportinfo.addodiparameter("parameter_test", "odiparam1", "A1"); reportinfo.addodiparameter("parameter_test", "odiparam2", "B2"); reportinfo.addparameter("formparam1","c3"); reportinfo.addparameter("formparam2","d4"); reportinfo.addproperties("use_ozd_parameter", "false"); reportinfo = module.addreport("parameter_test.ozr", "/", "2page"); reportinfo.addodiparameter("parameter_test", "odiparam1", "E5"); reportinfo.addodiparameter("parameter_test", "odiparam2", "F6"); reportinfo.addparameter("formparam1","g7"); reportinfo.addparameter("formparam2","h8"); reportinfo.addproperties("use_ozd_parameter", "false"); module.saveozd("c:/daemon_api_ozd.ozd"); System.out.println("ok"); FORCS Co., LTD 49
OZ API Developer's Guide (for Java) Constructor Summary Monitor(String ip, int port, String id, String pw, boolean bautologin, boolean useusl) Monitor (String url, String id, String pw, boolean bautologin, boolean useusl) Method Summary Versions getversions() MemoryStatus getmemoryinfo() byte[] downloadmonitorlog() void downloadmonitorlog(string filename) Constructor Detail //Daemon - TCP Server public Monitor(String ip, int port, String id, String pw, boolean bautologin, boolean useusl) //Servlet - HTTP Server public Monitor(String url, String id, String pw, boolean bautologin, boolean useusl) url ip port Servlet URL ex) String url = "http://127.0.0.1/oz/server"; Daemon IP ex) String ip = "127.0.0.1"; Daemon ex) int port = 8003; 50 FORCS Co., LTD
id pw bautologin useusl ex) String id = "admin"; ex) String pw = "admin"; ex) boolean bautologin = true; USL ex) boolean useusl = false; Method Detail getversions public Versions getversions() throws OZCPException. getmemoryinfo public MemoryStatus getmemoryinfo() throws OZCPException (,, ). downloadmonitorlog rototype public byte[] downloadmonitorlog() throws OZCPException. downloadmonitorlog(string filename) public void downloadmonitorlog(string filename) throws OZCPException, IOException filename. FORCS Co., LTD 51
OZ API Developer's Guide (for Java) Class MemoryStatus(oz.server.monitor.MemoryStatus) Server System. - public static void garbagecollect() : garbage collection public long gettotalmemory() : VM public long getfreememory() : VM Free Versions(oz.server.monitor.Versions) Server Server System. - public String osname : Server OS public String osversion : Server OS public String javavendor : Server JVM public String javaversion : Server JVM Version public String OZServerVersion : public String CPRelease : OZ Common Protocol public int CPProtocol : OZ Common Protocol public String DMRelease : OZ Data Module public int DMStreaming : OZ Data Module Streaming Sample : MonitorSample.java package sample; import oz.framework.api.monitor; import oz.server.monitor.versions; import oz.server.monitor.memorystatus; import org.apache.log4j.*; public class MonitorSample { public static void main(string[] args) { //. BasicConfigurator.configure(); // OZServer Info. 52 FORCS Co., LTD
//* // Daemon String IP = "127.0.0.1"; // IP int PORT = 8003; // TCP /*/ // Servlet String URL = "http://www.oz.com/oz/server"; //Servlet URL /**/ // User Info. String ID = "admin"; //default String PWD = "admin"; //default Monitor monitor = null; try { //* // Daemon monitor = new Monitor(IP, PORT, ID, PWD, false, false); /*/ // Servlet monitor = new Monitor(URL, ID, PWD, false, false); /**/ // (getserverinformation) Versions v = monitor.getversions(); v._printout(); // (getserverstatus) MemoryStatus ms = monitor.getmemoryinfo(); // = - long usedmemory = ms.gettotalmemory() - ms.getfreemememoy(); // System.out.println("Total Memory="+ms.getTotalMemory()); System.out.println("Used Memory="+usedMemory); System.out.println("Free Memory="+ms.getFreeMememoy()); System.out.println(""); //. byte [] logbytes = monitor.downloadmonitorlog(); //. String logfilename = "monitor.log"; monitor.downloadmonitorlog(logfilename); catch(exception e) { FORCS Co., LTD 53
OZ API Developer's Guide (for Java) e.printstacktrace(); 54 FORCS Co., LTD
Constructor Summary Service(String ip, int port, String id, String pw, boolean bautologin, boolean useusl) Service(String url, String id, String pw, boolean bautologin, boolean useusl) Method Summary void garbagecollect() void stop(boolean check) void restart() boolean ping() int gethandlercount() Constructor Detail //Daemon - TCP Server public Service(String ip, int port, String id, String pw, boolean bautologin, boolean useusl) //Servlet - HTTP Server public Service(String url, String id, String pw, boolean bautologin, boolean useusl) url ip Servlet URL ex) String url = "http://127.0.0.1/oz/server"; Daemon IP ex) String ip = "127.0.0.1"; FORCS Co., LTD 55
OZ API Developer's Guide (for Java) port id pw bautologin useusl Daemon ex) int port = 8003; ex) String id = "admin"; ex) String pw = "admin"; ex) boolean bautologin = true; USL ex) boolean useusl = false; Method Detail garbagecollect public void garbagecollect() throws OZCPException JVM garbage collection. stop public void stop(boolean check) throws OZCPException. check true : false : restart public void restart() throws OZCPException. ping public boolean ping(). 56 FORCS Co., LTD
gethandlercount public int gethandlercount(). Sample : ServiceSample.java package sample; import oz.framework.api.service; import org.apache.log4j.*; public class ServiceSample { public static void main(string[] args) { //. BasicConfigurator.configure(); // OZServer Info. // * // Daemon String IP = "127.0.0.1"; // IP int PORT = 8003; // TCP String URL = "http://localhost:8080/ozservlet/server"; /******************************************************************** *** * / // Servlet String URL = "http://www.oz.com/oz/server"; //Servlet * URL / **********************************************************************/ false); // User Info. String ID = "admin"; // default String PWD = "admin"; // default Service service = null; try { // * // Daemon service = new Service(IP, PORT, ID, PWD, false, //service = new Service(URL, ID, PWD, false, false); FORCS Co., LTD 57
OZ API Developer's Guide (for Java) /***************************************************************** false, false); / * / // Servlet service = new Service(URL, ID, PWD, ******************************************************************/ // ping boolean isalive = service.ping(); // if(isalive == true) { System.out.println("Server is Running"); // System.out.println(service.getHandlerCount()); // garbagecollection (garbagecollects) service.garbagecollect(); // (restart) // service.restart(); // (serverstop) boolean check = true;// service.stop(check); stoped"); //. isalive = true; while (isalive) { isalive = service.ping(); if(isalive == false) { System.out.println("Server is // else { System.out.println("Server is dead"); catch (Exception e) { e.printstacktrace(); 58 FORCS Co., LTD
Constructor Summary Viewer(String ip, int port, String id, String pw, boolean bautologin, boolean useusl) Viewer(String url, String id, String pw, boolean bautologin, boolean useusl) Method Summary byte[] getbytearrayform(string reportname, String categoryname) InputStram getform(string reportname, String CategoryName, boolean iscompress) Parameter[] getuserparameterswithdefaultvalue(string itemname, int itemtype, String categoryname) HCDataModule gethcusdm(string filename, String categoryname) HCDataModule getdatamodule(inputstream sdminput) HCDataModule getdatamodule(string odiname, String CategoryName, Parameter[] parameters, boolean docompress, boolean forcerefresh) HCDataModule getdatamodule(string odiname, String categoryname, Parameter[] parameters, boolean docompress, boolean forcerefresh, String[] invaliddataset, MaxRowsOfSet[] maxrows) HCDataModule getdatamodule(string odiname, String categoryname, Parameter[] parameters, boolean docompress, boolean forcerefresh, boolean ispushserver) Constructor Detail FORCS Co., LTD 59
OZ API Developer's Guide (for Java) //Daemon - TCP Server public Viewer(String ip, int port, String id, String pw, boolean bautologin, boolean useusl) //Servlet - HTTP Server public Viewer(String url, String id, String pw, boolean bautologin, boolean useusl) url ip port id pw bautologin useusl Servlet URL ex) String url = "http://127.0.0.1/oz/server"; Daemon IP ex) String ip = "127.0.0.1"; Daemon ex) int port = 8003; ex) String id = "admin"; ex) String pw = "admin"; ex) boolean bautologin = true; USL ex) boolean useusl = false; Method Detail getbytearrayform public byte[] getbytearrayform(string reportname, String categoryname) throws OZCPException. reportname categoryname getform public InputStream getform(string reportname, String categoryname, boolean iscompress) throws OZCPException 60 FORCS Co., LTD
. reportname categoryname iscompress getuserparameterswithdefaultvalue public Parameter[] getuserparameterswithdefaultvalue(string itemname, int itemtype, String categoryname) throws OZCPException. itemname itemtype (OZR : 20001 / ODI : 10000) categoryname iscompress gethcusdm public HCDataModule gethcusdm(string filename, String categoryname) throws OZCPException SDM. filename categoryname getdatamodule public HCDataModule getdatamodule(inputstream sdminput) throws OZCPException SDM. FETCH (batch), DataModule 2.5 Normal. sdminput SDM getdatamodule FORCS Co., LTD 61
OZ API Developer's Guide (for Java) public HCDataModule getdatamodule(string odiname, String categoryname, Parameter[] parameters, boolean docompress,boolean forcerefresh) throws OZCPException public HCDataModule getdatamodule(string odiname, String categoryname, Parameter[] parameters, boolean docompress, boolean forcerefresh, String[] invaliddataset, MaxRowsOfSet[] maxrows) throws OZCPException public HCDataModule getdatamodule(string odiname, String categoryname, Parameter[] parameters, boolean docompress, boolean forcerefresh, boolean ispushserver) throws OZCPException. odiname categoryname parameters docompress forcerefresh ispushserver invaliddataset maxrows Class Parameter(oz.dm.Parameter). - public String name : public String value : MaxRowsOfSet (oz.dm. MaxRowsOfSet). - SetSetName public void SetSetName(String v) 62 FORCS Co., LTD
. GetSetName public String GetSetName(). SetMaxRow public void SetMaxRow(int v). GetMaxRow public int GetMaxRow(). HCDataModule(oz.dm.hc.HCDataModule) HCDataSet. HCDataSet BCDataSet OZ DataModule Streaming. - public final static String PARAMETERSET_NAME = "OZParam"; : - getdatasetnames public String[] getdatasetnames(). getdatasets public HCDataSet[] getdatasets(string name)... (length) 0. name FORCS Co., LTD 63
OZ API Developer's Guide (for Java) PrintInfo public void PrintInfo(PrintStream out) PrintStream. out PrintStream HCDataSet(oz.dm.hc) HCDataSet OZ DataModule Streaming.. - final public static int BYTEARRAY_DATA_SET = 0x1; final public static int UTF_DATA_SET = 0x2; final public static String BYTEARRAY_PROTOCOL_NAME = "ByteArraySet"; final public static String UTF_PROTOCOL_NAME = "UTFSet"; - getresultset public ResultSet getresultset(). Sample : ViewerSample.java package sample; import oz.framework.api.viewer; import oz.dm.parameter; import oz.dm.hc.hcdatamodule; import oz.dm.maxrowsofset; import java.io.*; import org.apache.log4j.*; public class ViewerSample { public static void main(string[] args) { //. BasicConfigurator.configure(); // OZServer Info. 64 FORCS Co., LTD
//* // Daemon String IP = "127.0.0.1"; // IP int PORT = 8003; // TCP /*/ // Servlet String URL = "http://www.oz.com/oz/server"; //Servlet URL /**/ // User Info. String ID = "admin"; //default String PWD = "admin"; //default Viewer viewer = null; try { //* // Daemon viewer = new Viewer(IP, PORT, ID, PWD, false, false); /*/ // Servlet viewer = new Viewer(URL, ID, PWD, false, false); /**/ int ODI_FILE_TYPE = 10000; // ODI int OZR_FILE_TYPE = 20001; // OZR String ozrname = "parameter_test.ozr"; String odiname = "parameter_test.odi"; //ODI String sdmname = "parameter_test.sdm"; String categoryname = "/"; // Parameter[] param = new Parameter[0]; // boolean force = false; // boolean compress = false; // DM String[] invalidset = new String[0]; // MaxRowsOfSet[] mx = new MaxRowsOfSet[0]; // categoryname); // SDM (gethcusdm) HCDataModule usdm = viewer.gethcusdm(sdmname, categoryname); //. (getbytearrayform) byte[] formbytes = viewer.getbytearrayform(ozrname, compress); // (getform) InputStream in = viewer.getform(ozrname, categoryname, FORCS Co., LTD 65
OZ API Developer's Guide (for Java) // //(getuserparameterswithdefaultvalue) param = viewer.getuserparameterswithdefaultvalue(odiname, ODI_FILE_TYPE, categoryname); // Input Stream SDM (getdatamodule) HCDataModule sdm = viewer.getdatamodule( new FileInputStream(sdmName)); // (getdatamodules) HCDataModule dmodule = viewer.getdatamodule( odiname, categoryname, param, compress, force); mx); // (getdatamodules) HCDataModule dmodule2 = viewer.getdatamodule( odiname, categoryname, param,compress, force, invalidset, catch (Exception e) { e.printstacktrace(); 66 FORCS Co., LTD
Method Summary InputStream getozd(string item, String category, Hashtable formparam, Hashtable odiparam, boolean memoallowed, String password, String id, String pw, HttpServletRequest request) InputStream getozd(string item, String category, String serverdmtype, Hashtable formparam, Hashtable odiparam, Hashtable odipath, boolean memoallowed, String password, String id, String pwd, HttpServletRequest request) InputStream getozd(string[] item, String[] category, Hashtable[] formparam, Hashtable[] odiparam, String id, String pwd, HttpServletRequest request, String[] displayname, String[][] urls, Hashtable[] options) throws Exception InputStream getozd(string[] item, String[] category, Hashtable[] formparam, Hashtable[] odiparam, boolean memoallowed, String password, String id, String pwd, HttpServletRequest request, String[] displayname, String[][] urls, Hashtable[] options) throws Exception InputStream getozd(string[] item, String[] category, String serverdmtype, Hashtable[] formparam, Hashtable[] odiparam, boolean memoallowed, String password, String id, String pwd, HttpServletRequest request, String[] displayname, String[][] urls, Hashtable[] options) throws Exception InputStream getozd(string[] item, String[] category, String serverdmtype, Hashtable[] formparam, Hashtable[] odiparam, Hashtable[] odipaths, boolean memoallowed, String password, String id, String pwd, HttpServletRequest request, String[] displayname, String[][] urls, Hashtable[] options, Hashtable[] fxurls) throws Exception InputStream getozdwithsdm(string item, String category, Hashtable sdm, Hashtable formparam, boolean memoallowed, String password, String id, String pwd, HttpServletRequest request) getozdwithsdm(string item, String category, Hashtable sdm, Hashtable FORCS Co., LTD 67
OZ API Developer's Guide (for Java) formparam, boolean memoallowed, String password, String id, String pwd, HttpServletRequest request) Method Detail getozd public final InputStream getozd(string item, String category, Hashtable formparam, Hashtable odiparam, boolean memoallowed, String password, String id, String pwd, HttpServletRequest request) throws Exception public final InputStream getozd(string item, String category, String serverdmtype, Hashtable formparam, Hashtable odiparam, Hashtable odipath, boolean memoallowed, String password, String id, String pwd, HttpServletRequest request) public final InputStream getozd(string[] item, String[] category, Hashtable[] formparam, Hashtable[] odiparam, String id, String pwd, HttpServletRequest request, String[] displayname, String[][] urls, Hashtable[] options) throws Exception public final InputStream getozd(string[] item, String[] category, Hashtable[] formparam, Hashtable[] odiparam, boolean memoallowed, String password, String id, String pwd, HttpServletRequest request, String[] displayname, String[][] urls, Hashtable[] options) throws Exception public final InputStream getozd(string[] item, String[] category, String serverdmtype, Hashtable[] formparam, Hashtable[] odiparam, boolean memoallowed, String password, String id, String pwd, HttpServletRequest request, String[] displayname, String[][] urls, Hashtable[] options) throws Exception public final InputStream getozd(string[] item, String[] category, String serverdmtype, Hashtable[] formparam, Hashtable[] odiparam, Hashtable[] odipaths, boolean memoallowed, String password, String id, String pwd, HttpServletRequest request, String[] displayname, String[][] 68 FORCS Co., LTD
urls, Hashtable[] options, Hashtable[] fxurls) throws Exception OZD, OZD.,. : API serverdmtype serverdmtype DM_TYPE="Memory", FetchType="Batch".. item ( OZR ) category urls serverdmtype formparam odiparam odipath memoallowed password id pwd request displayname urls options OZD URL Memory File ( :Memory) : Hashtable (String), (string ). ODI : ODI Hashtable ODI(String), (Hashtable), Hashtable (String), (String). ODI OZD OZD HttpServletRequest URL OZD key "Option". FORCS Co., LTD 69
OZ API Developer's Guide (for Java) fxurls FX URL URL. fxurl fxname value String url, String[] String[0]= URL, String[1]=. ex) Hashtable[] fxurls = new Hashtable[2]; fxurls[0] = new Hashtable(); String[] url = new String[2]; url[0] = "http://127.0.0.1:8080/ozcar.jsp?param1= "; url[1] = "base64/ksc5601"; fxurls[0].put("sample",url); getozdwithsdm public final InputStream getozdwithsdm(string item, String category, Hashtable sdm, Hashtable formparam, boolean memoallowed, String password, String id, String pwd, HttpServletRequest request) throws Exception SDM OZD.,. - Servlet API SDM "SDM gzip Base64 Encode Encode URI". - SDM "Base64 Decode ungzip SDM ". - getozdwithsdm doget dopost dopost getozdwithsdm. item category sdm formparam memoallowed ( OZR ) OZD SDM : Hashtable (String), (string ). OZD 70 FORCS Co., LTD
password id pwd request OZD HttpServletRequest Sample : RequestOZDSample.java package sample; import javax.servlet.http.httpservletrequest; import javax.servlet.http.httpservletresponse; import javax.servlet.servletconfig; import oz.server.ozservlet; import javax.servlet.servletexception; import java.io.*; import java.util.*; import oz.framework.cp.io.ozdataoutputstream; public class RequestOZDSample extends OZServlet { private static final int PROTOCOL_VER = 2005; private static final String _ROOT_PATH = "D:/"; private byte[] _buf = new byte[1024]; public void init(servletconfig config) throws ServletException { super.init(config); public void doget(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException { dopost(request, response); public void dopost(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException { try { System.out.println("Start to get OZD"); long _JOB_ID = System.currentTimeMillis(); String tempozdfile = _ROOT_PATH + "sample" + _JOB_ID + ".ozd"; String tempwmfile = _ROOT_PATH + "sample" + _JOB_ID + ".mtx"; // Make OZD makeozd(tempozdfile, request); FORCS Co., LTD 71
OZ API Developer's Guide (for Java) catch(exception e) { ByteArrayOutputStream bout = new ByteArrayOutputStream(); e.printstacktrace(new PrintStream(bout)); bout.flush(); byte[] b = bout.tobytearray(); String error = new String(bout.toByteArray()); bout.close(); System.out.println(error); PrintWriter writer = response.getwriter(); writer.println("requestozdsample : Error"); writer.println(); writer.println(error); writer.flush(); private void writefile(string filename, OZDataOutputStream out) throws IOException { BufferedInputStream bin = null; try { ByteArrayOutputStream bout = new ByteArrayOutputStream(); int len; bin = new BufferedInputStream(new FileInputStream(filename)); while((len = bin.read(_buf)) >= 0) { bout.write(_buf, 0, len); bout.flush(); byte[] buf = bout.tobytearray(); bout.close(); out.writeint(buf.length); out.write(buf,0,buf.length); finally { if(bin!= null) { try { bin.close(); catch(exception ex) { private void makeozd(string filename, HttpServletRequest request) { throws Exception 72 FORCS Co., LTD
InputStream stream = null; try { // Info. String _ITEM = "parameter_test.ozr"; String _CATEGORY = "/"; boolean _MEMOALLOW = true; String _PASSWORD = "1234"; String _UID = "admin"; String _PWD = "admin"; //Form parameter Hashtable _FORM_PARAM = new Hashtable(); _FORM_PARAM.put("formparam1", "FORM 1"); _FORM_PARAM.put("formparam2", "FORM 2"); //ODI parameter Hashtable _ODI_PARAM = new Hashtable(); Hashtable _odi_param = new Hashtable(); _odi_param.put("odiparam1", "ODI 1"); _odi_param.put("odiparam2", "ODI 2"); _ODI_PARAM.put("parameter_test", _odi_param); // call make ozd stream = getozd(_item, _CATEGORY, _FORM_PARAM, _ODI_PARAM, _MEMOALLOW, _PASSWORD, _UID, _PWD, request); //ODI parameter //Hashtable _ODI_PARAM = new Hashtable(); //Hashtable _ODI_PARAM = new Hashtable(); //Hashtable _ODI_PATH = new Hashtable(); //_ODI _PARAM.put("odiparam1", "ODI 1"); //_ODI _PARAM.put("odiparam2", "ODI 2"); //_ODI_PARAM.put("parameter_test", _odi_param); //_ODI_PATH.put("parameter_test", "/test/parameter_test.odi"); //call make ozd //stream = getozd(_item, _CATEGORY, // _FORM_PARAM, _ODI_PARAM, _ODI_PATH, _MEMOALLOW, // _PASSWORD, _UID, _PWD, request); FileOutputStream out = new FileOutputStream(filename); copy(stream, out); out.flush(); out.close(); catch(exception e) { e.printstacktrace(); throw e; finally { if(stream!= null) { try { FORCS Co., LTD 73
OZ API Developer's Guide (for Java) stream.close(); catch(exception e) { // Util method public static int copy(inputstream is, OutputStream os) throws IOException { byte[] buf = new byte[1024]; int rt = 0; int len; while((len = is.read(buf)) >= 0) { os.write(buf, 0, len); rt += len; return rt; Sample : RequestMultiOZDSample.java package oz.server; import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; public class RequestMultiOZDSample extends OZServlet { public String getservletname() { return "[ RequestMultiOZDSample ]"; public void init(servletconfig config) throws ServletException { public void doget(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException { makeozd(request); 74 FORCS Co., LTD
public void dopost(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException { makeozd(request); private void makeozd(httpservletrequest request) throws ServletException, IOException { InputStream stream = null; try { // int size = 2; String[] item = new String[size]; String[] category = new String[size]; Hashtable[] formparam = new Hashtable[size]; Hashtable[] odiparams = new Hashtable[size]; boolean memoallowed = false; String ozdpassword = ""; String serverid = "admin"; String serverpwd = "admin"; String[] displayname = new String[size]; String[][] urls = { {"http://localhost:8080/tomcat.gif", "ozp:///req/b.gif", {"http://localhost:8080/tomcat.gif", "ozp:///req/b.gif" ; Hashtable[] options = new Hashtable[size]; for(int i=0; i<size; i++) { item[i] = "parameter_test.ozr"; category[i] = "/"; formparam[i] = new Hashtable(); formparam[i].put("formparam1", "FORM1="+i); formparam[i].put("formparam2", "FORM2="+i); Hashtable odiparam = new Hashtable(); FORCS Co., LTD 75
OZ API Developer's Guide (for Java) odiparam.put("odiparam1", "ODIPARAM1=odi"+i); odiparam.put("odiparam2", "ODIPARAM2=odi"+i); odiparams[i] = new Hashtable(); odiparams[i].put("parameter_test",odiparam); displayname[i] = (i+1)+"="+item[i]; options[i] = new Hashtable(); if (i == 0) options[i].put("use_ozd_parameter", "true"); else options[i].put("use_ozd_parameter", "false"); stream = getozd(item, category, formparam, odiparams, memoallowed, ozdpassword, serverid, serverpwd, request, displayname, urls, options); byte[] ozd = getbytes(stream); FileOutputStream out = new FileOutputStream("D:/MultiImage.ozd"); out.write(ozd, 0, ozd.length); out.flush(); out.close(); catch(exception e) { e.printstacktrace(); throw new ServletException(makeStackTrace(e)); finally { if(stream!= null) { try { stream.close(); catch(exception e) { private byte[] getbytes(inputstream is) { BufferedInputStream bis = new BufferedInputStream(is); int totalread = 0; 76 FORCS Co., LTD
int bytesread = 0; byte[] buffer = new byte[10000]; byte[] ret = new byte[0]; byte[] tempbuff; try { while((bytesread = bis.read(buffer)) >=0) { totalread += bytesread; tempbuff = new byte[totalread]; if(ret.length > 0 ) { System.arraycopy(ret, 0, tempbuff, 0, ret.length); if(bytesread > 0) { System.arraycopy(buffer, 0, tempbuff, ret.length, bytesread); ret = tempbuff; bis.close(); catch(exception e) { return null; return ret; private String makestacktrace(throwable t) throws IOException { ByteArrayOutputStream bout = new ByteArrayOutputStream(); t.printstacktrace(new PrintStream(bout)); bout.flush(); byte[] b = bout.tobytearray(); String error = new String(bout.toByteArray()); return getservletname() + "\n" + error; Sample : OZOZDMakerServlet.java package sample; import java.io.*; FORCS Co., LTD 77
OZ API Developer's Guide (for Java) import java.io.ioexception; import java.util.hashtable; import javax.servlet.*; import javax.servlet.http.*; import oz.server.ozservlet; public class OZOZDMakerServlet extends OZServlet { private static final long serialversionuid = 1L; public void init(servletconfig config) throws ServletException{ super.init(config); public void doget(httpservletrequest req, HttpServletResponse res) throws ServletException, IOException { dopost(req, res); public void dopost(httpservletrequest req, HttpServletResponse res) throws ServletException, IOException { //getozdwithsdm. String inoutpath = "D:\\ServerRepository\\"; String ozrname = "SDM_OZD_MAKE_TEST.ozr"; String category = "/"; boolean ismemo = false; String reportpassword = null; String serverid = "admin"; String serverpwd = "admin"; Hashtable param = new Hashtable(); param.put("param1", "OZ PARAMETER ONE"); param.put("param2", "OZ PARAMETER TWO"); Hashtable sdm = new Hashtable(); FileInputStream fis1 = new FileInputStream(inOutPath + "SDM_OZD_MAKE_TEST.sdm"); FileInputStream fis2 = new FileInputStream(inOutPath + "SDM_OZD_MAKE_TEST1.sdm"); sdm.put("sdm_ozd_make_test", fis1); sdm.put("sdm_ozd_make_test1", fis2); InputStream is = null; FileOutputStream fos = null; try { //getozdwithsdm SDM. is = getozdwithsdm(ozrname, category, sdm, param, 78 FORCS Co., LTD
"RESULT.ozd"); ismemo, reportpassword, serverid, serverpwd, req); fos = new FileOutputStream(inOutPath + byte[] buffer = new byte[1024]; int len = 0; while((len = is.read(buffer)) > 0) { fos.write(buffer, 0, len); catch(exception e) { e.printstacktrace(); finally { if(fos!= null) { fos.close(); if(is!= null) { is.close(); fis1.close(); fis2.close(); public void detroy() { super.destroy(); FORCS Co., LTD 79
OZ API Developer's Guide (for Java) API Class Program Class Publisher Class Scheduler Class TaskHolidayInfo Class TaskHolidayGroupInfo 80 FORCS Co., LTD
API. API. Program Publisher Scheduler TaskHolidayInfo TaskHolidayGroupInfo..... API. ozsfw50.jar log4.jar Scheduler server. Server Log. (API classpath "log4.jar" ) FORCS Co., LTD 81
OZ API Developer's Guide (for Java) Constructor Summary Program(String ip, int port) Method Summary void createfolder(serverinfo s, String folder) byte[] downloadfile(serverinfo s, String file) FileInfo[] getexternalprogramlist(serverinfo s, String folder) void removefiles(serverinfo s, String folder, String[] files) void removefolder(serverinfo s, String folder, boolean isall) void uploadfile(serverinfo s, String file, byte[] b) Constructor Detail public Program(String ip, int port) ip port IP ex) String ip = "127.0.0.1"; (:9521) ex) int port = 9521; Method Detail createfolder public void createfolder(serverinfo s, String folder). s 82 FORCS Co., LTD
folder downloadfile public byte[] downloadfile(serverinfo s, String file). s file getexternalprogramlist public FileInfo[] getexternalprogramlist(serverinfo s, String folder). s folder removefiles public void removefiles(serverinfo s, String folder, String[] files). s folder files removefolder public void removefolder(serverinfo s, String folder, boolean isall). s folder isall true : ( ) false : ( ) uploadfile FORCS Co., LTD 83
OZ API Developer's Guide (for Java) public void uploadfile(serverinfo s, String file, byte[] b) (). s file b Class SchedulerException(oz.scheduler.SchedulerException) Exception. ServerInfo(oz.scheduler.ServerInfo). - setisdaemon public final void setisdaemon(boolean isdaemon). isdaemon Daemon true : Daemon false : Servlet setip public final void setip(string ip) IP. Server Daemon. ip IP setportno public final void setportno(int portno) Port. Server Daemon. portno Port 84 FORCS Co., LTD
seturl public final void seturl(string url) throws IllegalException URL. Server Servlet. url URL URL, 'http://'. setid public final void setid(string id) ID. id ID setpwd public final void setpwd(string pwd). pwd FileInfo(oz.scheduler.FileInfo.class) (/,,, ). - public boolean isdirectory : () public String name : public long size : public long lastmodified :, 1970 1 1 00:00:00 GMT Sample : ProgramSample.java package sample; import oz.scheduler.serverinfo; import oz.scheduler.fileinfo; FORCS Co., LTD 85
OZ API Developer's Guide (for Java) import oz.framework.api.program; import org.apache.log4j.*; public class ProgramSample { public static void main(string[] args) { //. BasicConfigurator.configure(); // String IP = "127.0.0.1"; // IP int PORT = 9521; // TCP Program program = null; try { program = new Program(IP, PORT); // ServerInfo serverinfo = new ServerInfo(); serverinfo.setid("admin"); // serverinfo.setpwd("admin"); // serverinfo.setip(ip); //OZ Server IP. daemon serverinfo.setisdaemon(true); //OZ Server daemon, servlet serverinfo.setportno(8003); /* OZ Server Port.daemon * s.seturl(null);//oz Server URL. * URL, //'http://' *. Server Servlet Type.*/ // (createfolder) String foldername = "testfolder"; // program.createfolder(serverinfo, foldername); // (uploadfile) String filename = "testprogram.bat"; // byte [] filebytes = filename.getbytes(); program.uploadfile(serverinfo, foldername+"/"+filename, filebytes); // (downloadfile) String downfilename = "testprogram.bat";// byte bytesarray[] = program.downloadfile(serverinfo, foldername+"/"+downfilename); // (getexternalprogramlist) FileInfo fileinfo[] = program.getexternalprogramlist(serverinfo, foldername); for(int i=0;i<fileinfo.length;i++){ 86 FORCS Co., LTD
FileInfo fi = fileinfo[i]; System.out.println(i); System.out.println(" isdirectory " + fi.isdirectory); System.out.println(" name " + fi.name); System.out.println(" size " + fi.size); System.out.println(" lastmodified " + fi.lastmodified); System.out.println(); // (removefiles) // () String. String file1 = "testprogram.bat"; String file2 = "testprogram2.bat"; String [] files = new String[]{file1 ; //. program.removefiles(serverinfo, foldername, files); // (removefolder) boolean isall = true; // String foldernametoremove = "testfolder"; //. program.removefolder(serverinfo, foldernametoremove, isall); catch(exception e) { e.printstacktrace(); FORCS Co., LTD 87
OZ API Developer's Guide (for Java) Constructor Summary Publisher(String ip, int port) Method Summary void createfolder(serverinfo s, String folder) byte[] downloadfile(serverinfo s, String file) FileInfo[] getpublishedfiles(serverinfo s, String folder) void removefiles(serverinfo s, String folder, String[] files) void removefolder(serverinfo s, String folder, boolean isall) Constructor Detail public Publisher(String ip, int port) ip port IP ex) String ip = "127.0.0.1"; (:9521) ex) int port = 9521; Method Detail createfolder public void createfolder(serverinfo s, String folder). s folder 88 FORCS Co., LTD
downloadfile public byte[] downloadfile(serverinfo s, String file). s file getpublishedfiles public FileInfo[] getpublishedfiles(serverinfo s, String folder). s folder removefiles public void removefiles(serverinfo s, String folder, String[] files). s folder fiels removefolder public void removefolder(serverinfo s, String folder, boolean isall). s folder isall true : ( ) false : ( ) Class FORCS Co., LTD 89
OZ API Developer's Guide (for Java) ServerInfo(oz.scheduler.ServerInfo) Program class " class". FileInfo(oz. scheduler.fileinfo.class) Program class " class". Sample : PublisherSample.java package sample; import oz.framework.api.publisher; import oz.scheduler.fileinfo; import oz.scheduler.serverinfo; import org.apache.log4j.*; public class PublisherSample { public static void main(string[] args) { //. BasicConfigurator.configure(); // String IP = "127.0.0.1"; // IP int PORT = 9521; // TCP Publisher publisher = null; try { publisher = new Publisher(IP, PORT); // ServerInfo serverinfo = new ServerInfo(); serverinfo.setid("admin"); // serverinfo.setpwd("admin"); // serverinfo.setip(ip); //OZ Server IP. daemon serverinfo.setisdaemon(true); //OZ Server.daemon, servlet serverinfo.setportno(8003); /* OZ Server Port.daemon * s.seturl(null);//oz Server URL. * URL, //'http://' *. Server Servlet Type.*/ // (createfolder) 90 FORCS Co., LTD
String foldername = "excel"; // //publisher.createfolder(serverinfo, foldername); // (downloadfile) String filename = "customer.xls"; // byte bytesarray[] = publisher.downloadfile(serverinfo, filename); // (getpublishedfiles) FileInfo fileinfolist[] = publisher.getpublishedfiles(serverinfo, foldername); for(int i=0; i<fileinfolist.length; i++) { FileInfo fi = fileinfolist[i]; System.out.println(i); System.out.println(" isdirectory="+fi.isdirectory); System.out.println(" name="+fi.name); System.out.println(" size="+fi.size); System.out.println(" lastmodified="+fi.lastmodified); System.out.println(); // (removefiles) // () String. // customer.xls orderinfo.xls String file1 = "customer.xls"; String file2 = "orderinfo.xls"; String testfoldername = "excel"; String [] filestoremove = new String[]{file1, file2; // publisher.removefiles(serverinfo, testfoldername, filestoremove); // boolean isall = true;// String foldernametoremove = "excel";//.. publisher.removefolder(serverinfo, foldernametoremove, isall); catch(exception e) { FORCS Co., LTD 91
OZ API Developer's Guide (for Java) Constructor Summary scheduler(string ip, int port) Method Summary String createtask(serverinfo s, NameValueCollection configmap, NameValueCollection exportmap) Vector gettask(serverinfo s) public TaskResult[] gettaskresult(serverinfo s, String from, String to, String taskid) SortProperties[] gettaskproperties(serverinfo info, String taskid) void removetask(serverinfo s, String task) String modifytask(serverinfo s, String taskid, SortProperties p, SortProperties exportmap) boolean taskpause(serverinfo s, String task) boolean taskresume(serverinfo s, String task) void stop(serverinfo s, boolean waittask) public boolean export(serverinfo s, SortProperties configmap, SortProperties exportmap) boolean makepdf(serverinfo s, SortProperties configmap, SortProperties exportmap) public boolean print(serverinfo s, SortProperties configmap, SortProperties printmap) SortProperties getconfiguration(serverinfo s) void modifyconfiguration(serverinfo s, SortProperties configmap, SortProperties exportmap) boolean ping() String[] getozslist(string path) void ozsverconv(string oldpath, String newpath) 92 FORCS Co., LTD
boolean addtaskholidayinfo(taskholidayinfo value) boolean modifytaskholidayinfo(string old_key, TaskHolidayInfo new_value) boolean deletetaskholidayinfo(string key) boolean deletetaskholidayinfo(string[] keys) boolean addtaskholidaygroupinfo(taskholidaygroupinfo value) boolean modifytaskholidaygroupinfo(string old_key, TaskHolidayInfo new_value) boolean deletetaskholidaygroupinfo(string key) OZMap gettaskholidayinfolist() OZMap gettaskholidaygroupinfolist() void savetaskholiday() DirectExportResult directexport(serverinfo s, SortProperties configmap, SortProperties exportmap) throws SchedulerException DirectPrintResult directprint(serverinfo s, SortProperties configmap, SortProperties printmap) throws SchedulerException Constructor Detail ppublic scheduler(string ip, int port) ip port IP ex) String ip = "127.0.0.1"; (:9521) ex) int port = 9521; Method Detail createtask public String createtask(serverinfo s, NameValueCollection configmap, NameValueCollection exportmap) FORCS Co., LTD 93
OZ API Developer's Guide (for Java) ID. : CreateTask Thread param. s configmap exportmap key "Option". key "Option". gettask public Vector gettask(serverinfo s). s gettaskresult public TaskResult[] gettaskresult(serverinfo s, String from, String to, String taskid). s from to taskid gettaskproperties public SortProperties[] gettaskproperties(serverinfo s, String taskid) (configmap) (exportmap). s taskid 94 FORCS Co., LTD
removetask public void removetask(serverinfo s, String taskid). s taskid modifytask public String modifytask(serverinfo s, String taskid, SortProperties configmap, SortProperties exportmap). s taskid configmap exportmap key "Option". key "Option". taskpause public boolean taskpause(serverinfo s, String taskid). s taskid taskresume public boolean taskresume(serverinfo s, String taskid). s taskid stop public void stop(serverinfo s, boolean waittaskid) FORCS Co., LTD 95
OZ API Developer's Guide (for Java). s waittaskid export public boolean export(serverinfo s, SortProperties configmap, SortProperties exportmap). : "ViewType=None". :.pdf,.ozd,.html,.jpg,.xls,.doc,.svg,.txt,.ppt,.tif, csv. s configmap exportmap key "Option". key "Option". : export API COM ASP "Appendix 1. SchedulerCOM ". makepdf public boolean makepdf(serverinfo s, SortProperties configmap, SortProperties exportmap) PDF. : "ViewType=None". s configmap key "Option". creattask() PDF. 96 FORCS Co., LTD
exportmap PDF key "Option". creattask() PDF. : makepdf API COM ASP "Appendix 1. SchedulerCOM ". print public boolean print(serverinfo s, SortProperties configmap, SortProperties printmap). ( ) : "task_type=viewertag". "ViewType=None". s configmap printmap key "Option". key "Option"., print.mode = silent. print API, print API. print API. viewer.allowmultiframe=true viewer.mode=print viewer.printcommand=true viewer.showerrormessage=false viewer.useprogressbar=false print.ingnoreerror=false FORCS Co., LTD 97
OZ API Developer's Guide (for Java) print.mode=silent export.confirmsave=false export.format="" information.debug=debug getconfiguration public SortProperties getconfiguration(serverinfo s). s modifyconfiguration public void modifyconfiguration(serverinfo s, SortProperties configmap). s configmap key "Option". ping public boolean ping(). getozslist public String[] getozslist(string path) OZS. (path OZS, path OZS..) path OZS : OZS /%SCH_HOME%/[path]/. path sample /%SCH_HOME%/sample/ OZS. 98 FORCS Co., LTD
ozsverconv public void ozsverconv(string oldpath, String newpath) 2.5 OZS. oldpath newpath OZS : /%SCH_HOME%/[oldPath]/. OZS : /%SCH_HOME%/[newPath]/ newpath oldpath. addtaskholidayinfo public boolean addtaskholidayinfo(taskholidayinfo value). value modifytaskholidayinfo public boolean modifytaskholidayinfo(string old_key, TaskHolidayInfo new_value). old_key new_value deletetaskholidayinfo // public boolean deletetaskholidayinfo(string[] keys) // public boolean deletetaskholidayinfo(string key). key addtaskholidaygroupinfo public boolean addtaskholidaygroupinfo(taskholidaygroupinfo value). FORCS Co., LTD 99
OZ API Developer's Guide (for Java) value modifytaskholidaygroupinfo public boolean modifytaskholidaygroupinfo(string old_key, TaskHolidayGroupInfo new_value). old_key new_value deletetaskholidaygroup public boolean deletetaskholidaygroupinfo(string key). key gettaskholidayinfolist public OZMap gettaskholidayinfolist(). gettaskholidaygroupinfolist public OZMap gettaskholidaygroupinfolist(). savetaskholiday public void savetaskholiday() xml. directexport public DirectExportResult directexport(serverinfo s, SortProperties configmap, SortProperties exportmap) throws SchedulerException 100 FORCS Co., LTD
. : "ViewType=None". :.pdf,.ozd,.html,.jpg,.xls,.doc,.svg,.txt,.ppt,.tif, csv. s configmap exportmap key "Option". key "Option". directprint public DirectPrintResult directprint(serverinfo s, SortProperties configmap, SortProperties printmap) throws SchedulerException. : "task_type=viewertag". "ViewType=None". s configmap printmap key "Option". key "Option"., print.mode = silent. Class ServerInfo(oz.scheduler.ServerInfo) Program class " class". FORCS Co., LTD 101
OZ API Developer's Guide (for Java) SortProperties (oz.util.sortproperties) Cache class " class". TaskHolidayInfo(oz.scheduler.Holiday) TaskHolidayInfo class " class". TaskHolidayGroupInfo(oz.scheduler.Holiday) TaskHolidayInfo class " class". TaskResult(oz.scheduler.TaskResult). - public String taskid: ID public String completedtime : public int issuccessfulcode: public String issuccessful: public String formfilename: public String Parameter: public String schedulingtype: public String exportfilelist: public String errormsg: DirectTaskResult(oz.scheduler.DirectTaskResult). - public String taskid: ID public String completedtime : public String executetime: ( : ) public boolean issuccessful: public String formname: oz.scheduler.directexportresult extends DirectTaskResult. - public String exportfilelist: 102 FORCS Co., LTD
public int pagecount:., 4 xls, doc pagecount 8. "viewer.largebundle=true" pagecount 1. oz.scheduler.directprintresult extends DirectTaskResult. - public int pagecount: public int pagecopy: public String pagerange: public String printername : public String printerdrivername : Option - "ViewType" "None", API, OZD. - viewer.mode "export" "print", "export". viewer.mode,. viewer.useprogressbar viewer.allowmultiframe export.mode false true silent FORCS Co., LTD 103
OZ API Developer's Guide (for Java) export.confirmsave print.mode print.ignoreerror information.debug viewer.showerrormessage false silent false debug false -. reportname displayname external_program_check external_program_command image_url_size image_url_n parameter_count parameter_name_n parameter_value_n option_properties_size option_property_name_n option_property_value_n - Key Value reportname ex) setproperty("reportname", "/categpry/sample.ozr") - Key Value displayname ex) setproperty("displayname", "sample") - Key Value 104 FORCS Co., LTD
reportcount ( : 1) ex) setproperty("reportcount", "2") - Key Value dm_server_check dm_server_name odi_name odi_category_name "check" "null" SDM ODI ex) setproperty("dm_server_check", "check") (Repository odi category SDM ) ex) setproperty("dm_server_name", test1.sdm") ODI ex) setproperty("odi_name","testodi.odi") ODI ( "/" ) ex) setproperty("odi_category_name","/test") - Key Value task_type "viewertag" "none" "sdm" viewertag : OZU g,. none : (ViewType None ) sdm : SDM ex) setproperty("task_type ", "viewertag") - Key Value external_program_che ck "check" "null" ex) setproperty("external_program_check", "check") FORCS Co., LTD 105
OZ API Developer's Guide (for Java) external_program_co mmand ("SCH_HOME/External" ) ex) SetProperty("external_program_command", "notepad.bat") - URL Key Value image_url_size url OZD url ex) setproperty("image_url_size", "1") image_url_1... image_url_n url url (n : url ) ex) setproperty("image_url_1", "http://127.0.0.1/sample.jpg") Key Value mail_check mail_notify_error_ch eck mail_recipient_to mail_recipient_cc "check" "null" "check" "null" ex) setproperty("mail_check", "check") ex) setproperty("mail_notify_error_check", "null") ex) setproperty("mail_recipient_to", "gil_dong@forcs.com") ex) setproperty("mail_recipient_cc", "aaa@forcs.com") mail_recipient_bcc mail_subject mail_text_message mail_html_comment "check" "null" ex) setproperty("mail_recipient_bcc", "bbb@forcs.com") ex) setproperty("mail_subject", "") ex) setproperty("mail_text_message", "") HTML ex) setproperty("mail_html_comment","check") 106 FORCS Co., LTD
html_mail_content mail_attach_list "check" "null" HTML ex) setproperty("html_mail_content","check") ( '/' ) ex) setproperty("mail_attach_list","excel/pdf/word") Key Value file_export_list ( '/' ) ex) setproperty("file_export_list ", "xls/pdf/tif" Key Value parameter_count ex) setproperty("parameter_count", "1") parameter_name_1... parameter_name_n (n : ) ex) setproperty("parameter_name_1", "[FORM].empNo") parameter_value_1... parameter_value_n (n : ) ex) setproperty("parameter_value_1", " 10") : ODI,. "[FORM].". empno "[FORM].empNo". ODI ODI. ODI "testodi" "id" "testodi.id". FORCS Co., LTD 107
OZ API Developer's Guide (for Java) ODI Key Value odi_parameter_ count ex) setproperty("odi_parameter_count", "1") odi_parameter_name_1... odi_parameter_name_n (n : ) ex) setproperty("odi_parameter_name_1", "id") odi_parameter_value_1... odi_parameter_value_n (n : ) ex) setproperty("odi_parameter_value_1", " 10") : ODI, ODI ODI. Key Value use_ozd_parameter true/false OZD OZD ex) setproperty("use_ozd_parameter ", "false") - Key Value launch_type "once" "immediately" "periodically" once : immediately : periodically : ex) setproperty("launch_type", "once") launch_ type = once Key Value execution_year ex) setproperty("execution_year", "2005") 108 FORCS Co., LTD
execution_month execution_day execution_hour execution_min ex) setproperty("execution_month", "12") ex) setproperty("execution_day", "30") ex) setproperty("execution_hour", "10") ex) setproperty("execution_minute", "30") launch_ type = periodically Key Value start_year start_month start_day periodically_executi on_day_type "daily" "weekly" "monthly" ex) setproperty("start_year", "2002") ex) setproperty("start_month", "11") ex) setproperty("start_day", "16") ex) setproperty("periodically_execution_day_ type", "daily") periodically_ execution_day_type = daily Key Value daily_type daily_every_days weekday ex) setproperty("daily_type", "weekday") () ex) 2 : setproperty ("daily_every_days", "2") periodically_ execution_day_type = weekly Key Value weekly_every_week s weekly_monday_che ck "check" "null" ex) setproperty("weekly_every_weeks", "2") ex) setproperty("weekly_monday_check", "check") FORCS Co., LTD 109
OZ API Developer's Guide (for Java) weekly_tuesday_che ck weekly_wednesday_ check weekly_thursday_ch eck weekly_friday_check weekly_saturday_ch eck weekly_sunday_che ck "check" "null" "check" "null" "check" "null" "check" "null" "check" "null" "check" "null" ex) setproperty("weekly_tuesday_check", "check") ex) setproperty("weekly_wednesday_check", "check") ex) setproperty("weekly_thursday_check", "check") ex) setproperty("weekly_friday_check", "check") ex) setproperty("weekly_saturday_check", "check") ex) setproperty("weekly_sunday_check", "check") periodically_ execution_day_type = monthly Key Value monthly_every_m onths monthly_type monthly_days monthly_which_w eek monthly_which_w eek_day "specific_day", "day_of_week", "user_defined" "T1" "T2" "T3"" T4" "T5" "sunday" "monday" "tuesday" "wednesday" "thursday" "friday" "saturday" ( ) ex) setproperty("monthly_every_months", "2") ex) setproperty("monthly_type", "specific_day") ex) setproperty("monthly_days", "2") T1 : T2 : T3 : T4 : T5 : ex) setproperty("monthly_which_week", "T2") ex) : setproperty("monthly_which_week_day", "monday") 110 FORCS Co., LTD
monthly_user_defi ned_days (,) ex) 1,15 : setproperty("monthly_user_defined_days", "1,15") - Key Value periodically_exec ution_time_ type "once" "repeat" "user_defined" (,, ) ex) setproperty ("periodically_execution_time_type","once") periodically_ execution_time_ type = once Key Value once_hour once_min ex) setproperty("once_hour", "01") ex) setproperty("once_min", "00") periodically_ execution_time_ type = repeat Key Value repeat_every_hours repeat_every_minutes repeat_start_hour repeat_start_minute repeat_end_hour repeat_end_minute ex) setproperty("repeat_every_hours", "01") ex) setproperty("repeat_every_minutes", "04") ex) setproperty("repeat_start_hour", "02") ex) setproperty("repeat_start_minute", "05") ex) setproperty("repeat_end_hour", 09") ex) setproperty("repeat_end_minute", "35") : 6 2 5 9 35 1 4. FORCS Co., LTD 111
OZ API Developer's Guide (for Java) periodically_ execution_time_ type = user_defined Key Value user_defined_time (:) (,) ex) setproperty("user_defined_time", "01:30,13:30") ".mailattach". true, false. ex) setproperty("hdm.mailattach", "true") key " ". : Value "/." "%%\Repository/"., "FORCS" CSV setproperty("csv.filename", "FORCS/test.csv"), "%%\Repository/FORCS" "test.csv". modifyconfiguration ConfigMap Key Value SchedulerPort SchedulingInfoFil epath SMTPServer ( : "9521") ex) p.setproperty("schedulerport", "9521"); ex) p.setproperty("schedulinginfofilepath","%sch_hom E%/ScheduledTask"); SMTP ex) p.setproperty("smtpserver", "mail.forcs.com"); 112 FORCS Co., LTD
SMTPServerProt SMTP ex) p.setproperty("smtpserverprot", "25"); MailFrom TempRepositoryF ilepath ex) p.setproperty("mailfrom", "mail@forcs.com"); ex) p.setproperty("temprepositoryfilepath", "%SCH_HOME%/Te mp Repository"); RepositoryFileRo otpath ex) p.setproperty("repositoryfilerootpath", "%SCH_HOME%/Repository"); ExternalProgram FilePath ErrorNotifyToSen der "true" "false" ex) p.setproperty("externalprogramfilepath", "%SCH_HOME%/External"); true : false : ex) p.setproperty("errornotifytosender", "false"); Sample : SchedulerSample.java package sample; import oz.framework.api.*; import oz.scheduler.serverinfo; import oz.util.sortproperties; import org.apache.log4j.*; public class SchedulerSample { private static String[][] scheduleinfoproperties = { // Basic Configration {"launch_type","immediately", // Task Execute Type // {"launch_type","periodically", // {"start_year","2004", // {"start_month","12", // {"start_day","29", // {"periodically_execution_day_type","daily", // {"daily_type","specific_day", // {"daily_every_days","1", FORCS Co., LTD 113
OZ API Developer's Guide (for Java) // {"periodically_execution_time_type","repeat", //"once", "repeat", "user_defined" // {"repeat_every_hours","00", // {"repeat_every_minutes","01", // {"repeat_start_hour","01", // {"repeat_start_minute","01", // {"repeat_end_hour","23", // {"repeat_end_minute","59", // {"daily_type","specific_day", // {"daily_every_days","1", // {"periodically_execution_time_type","user_defined", // {"user_defined_time","16:20", // {"daily_type","specific_day", // {"daily_every_days","1", // {"periodically_execution_time_type","user_defined", // {"user_defined_time","16:20", //task holiday // {"task_holiday", "common", // {"dm_server_name", "testtesttest.sdm", {"cfg.type","new", // Type of Task -> new, edit // {"cfg.task_id","parameter_test_060823103556234_296956235.ozs", {"report_name", "parameter_test.ozr", {"category_name","/", {"group_name","", // ODI {"odi_name", "parameter_test.odi", {"odi_category_name", "/", //image URL properties // {"image_url_size", "1", // {"image_url_1","http://localhost:8088/tomcat.gif", // {"image_url_2","http://localhost:8088/b.gif", // {"option_properties_size", "1", // {"option_property_name_1","use_ozd_parameter", // {"option_property_value_1","true", // Server Data Moudle {"dm_server_check", "check", {"dm_server_name", "testtesttest.sdm", 114 FORCS Co., LTD
{"parameter_count", "4", {"parameter_name_1", "[FORM].formparam1", {"parameter_value_1", "AAAA", {"parameter_name_2", "[FORM].formparam2", {"parameter_value_2", "BBBB", {"parameter_name_3", "parameter_test.odiparam1", {"parameter_value_3", "CCCC", {"parameter_name_4", "parameter_test.odiparam2", {"parameter_value_4", "DDDD", // // It must input for ODI parameter sdm create. {"odi_parameter_count", "2", {"odi_parameter_name_1", "odiparam1", {"odi_parameter_value_1", "111", {"odi_parameter_name_2", "odiparam2", {"odi_parameter_value_2", "222", // {"odi_parameter_name_1", "odiparam1", // {"odi_parameter_name_1", "odiparam2", // e-mail send. // {"mail_check", "check", // {"html_mail_content", "check", // {"mail_notify_error_check", "null", // {"mail_recipient_to", "", // {"mail_recipient_cc", "", // {"mail_recipient_bcc", "", // {"mail_subject", "", // {"mail_text_message", "context", // {"mail_attach_list", "csv/xls/html/ozd/pdf/txt/tif/doc/ppt/jpg/svg", {"file_export_list", "csv/xls/html/ozd/pdf/txt/tif/doc/ppt/jpg/svg" ; private static String[][] exportedproperties = { {"csv.filename ", "test.csv", // csv file name {"xls.filename ", "test.xls", // excel file name {"html.filename ", "test.html", // html file name {"ozd.filename ", "newimage.ozd", //OZD file name {"pdf.filename ", "test.pdf",//, //pdf file name {"txt.filename ", "test.txt", //text file name {"tif.filename ", "test.tif",//tiff file name {"doc.filename", "test.doc", //word file name {"ppt.filename ", "test.ppt", //ppt file name FORCS Co., LTD 115
OZ API Developer's Guide (for Java) {"jpg.filename ", "test.jpg", //jpg file name {"svg.filename ", "test.svg" //svg file name ; public static void main(string[] args) { BasicConfigurator.configure(); String IP = "127.0.0.1"; //scheduler server ip int PORT = 9521; //scheduler server port String[][] values = null; Scheduler scheduler = null; String taskid = null; try { scheduler = new Scheduler(IP, PORT); // scheduler Server Info ServerInfo serverinfo = new ServerInfo(); daemon serverinfo.setip("127.0.0.1"); //OZ Server IP conf. In case use of serverinfo.setportno(8003); serverinfo.setisdaemon(true); //OZ Server Type. -> daemon, servlet serverinfo.setid("admin"); //id serverinfo.setpwd("admin"); //pw SortProperties p = new SortProperties(); setproperties(p, scheduleinfoproperties); // p.setproperty("task_type", "sdm"); SortProperties exportmap = new SortProperties(); setproperties(exportmap, exportedproperties); taskid = scheduler.createtask(serverinfo, p, exportmap); System.out.println("taskid=="+taskID); catch (Exception e) { e.printstacktrace(); private static void setproperties(sortproperties p, String[][] values) { 116 FORCS Co., LTD
for(int i=0; i<values.length; i++) { p.setproperty(values[i][0], values[i][1]); Sample : SchedulerSampleTaskExportMakePrintExport.java package sample; import oz.framework.api.*; import oz.scheduler.serverinfo; import oz.scheduler.scheduledtask; import oz.util.sortproperties; import org.apache.log4j.*; import oz.scheduler.schedulerexception; public class SchedulerSampleTaskExportMakePrintExport { public SchedulerSampleTaskExportMakePrintExport() { public static void main(string[] args) throws SchedulerException { BasicConfigurator.configure(); Scheduler scheduler = null; scheduler = new Scheduler("127.0.0.1", 9521); // ServerInfo serverinfo = new ServerInfo(); serverinfo.setid("admin"); // serverinfo.setpwd("admin"); // serverinfo.setisdaemon(true); serverinfo.setip("127.0.0.1"); //OZ Server IP. daemon serverinfo.setportno(8003); SortProperties config = new SortProperties(); // config.setproperty("task_type", "viewertag"); // config.setproperty("cfg.type", "new"); // Task new, edit FORCS Co., LTD 117
OZ API Developer's Guide (for Java) SortProperties printexport = new SortProperties(); // printexport.setproperty("connection.server", "127.0.0.1"); printexport.setproperty("connection.port", "8003"); printexport.setproperty("connection.reportname", "/parameter_test.ozr"); printexport.setproperty("applet.useprogressbar", "false"); printexport.setproperty("applet.allowmultiframe", "true"); printexport.setproperty("viewer.mode", "print"); printexport.setproperty("print.mode", "silent"); printexport.setproperty("print.ignoreerror", "false"); printexport.setproperty("connection.fetchtype", "BATCH"); printexport.setproperty("information.debug", "debug"); printexport.setproperty("applet.showerrormessage", "false"); // printexport.setproperty("viewer.childcount", "1"); printexport.setproperty("child1.connection.server", "127.0.0.1"); printexport.setproperty("child1.connection.port", "8003"); printexport.setproperty("child1.connection.reportname", "/parameter_test.ozr"); printexport.setproperty("child1.viewer.applet.mode", "print"); printexport.setproperty("child1.print.mode","silent"); printexport.setproperty("child1.print.ignoreerror","false"); printexport.setproperty("child1.print.pagerange","range"); printexport.setproperty("child1.print.pages","2"); // config.setproperty("launch_type", "immediately");// ("immediately", "periodically") config.setproperty("launch_type", "periodically"); config.setproperty("start_year", "2009"); config.setproperty("start_month", "03"); config.setproperty("start_day", "01"); config.setproperty("start_hour", "06"); config.setproperty("start_min", "42"); config.setproperty("periodically_execution_day_type", "daily"); config.setproperty("daily_type", "specific_day"); config.setproperty("daily_every_days", "1"); // config.setproperty("periodically_execution_time_type", "once"); // config.setproperty("once_hour", "09"); // config.setproperty("once_min", "41"); config.setproperty("periodically_execution_time_type", "repeat"); config.setproperty("repeat_every_hours", "00"); config.setproperty("repeat_every_minutes", "01"); 118 FORCS Co., LTD
config.setproperty("repeat_start_hour", "09"); config.setproperty("repeat_start_minute", "01"); config.setproperty("repeat_end_hour", "23"); config.setproperty("repeat_end_minute", "01"); String taskid = scheduler.createtask(serverinfo, config, printexport); Sample : SchedulerViewerTagSample.java package sample; import oz.framework.api.*; import oz.scheduler.taskresult; import oz.scheduler.serverinfo; import oz.scheduler.scheduledtask; import oz.util.sortproperties; import java.util.vector; import java.io.*; import org.apache.log4j.*; import oz.scheduler.schedulerexception; public class SchedulerViewerTagSample { public static void main(string[] args) { //. BasicConfigurator.configure(); Scheduler scheduler = null; scheduler = new Scheduler("127.0.0.1", 9521); // ServerInfo serverinfo = new ServerInfo(); serverinfo.setid("admin"); // serverinfo.setpwd("admin"); // serverinfo.setisdaemon(true); serverinfo.setip("127.0.0.1"); //OZ Server IP. daemon serverinfo.setportno(8003); SortProperties config = new SortProperties(); //. config.setproperty("task_type", "viewertag"); FORCS Co., LTD 119
OZ API Developer's Guide (for Java) // Task new, edit config.setproperty("cfg.type", "new"); // (:"immediately", :"periodically") config.setproperty("launch_type", "immediately"); SortProperties export = new SortProperties(); // export.setproperty("connection.server", "127.0.0.1"); export.setproperty("connection.port", "8003"); export.setproperty("connection.reportname", "/parameter_test.ozr"); export.setproperty("applet.mode", "export"); export.setproperty("applet.useprogressbar", "false"); export.setproperty("applet.allowmultiframe", "true"); export.setproperty("connection.pcount", "2"); export.setproperty("connection.args1", "formparam1="); export.setproperty("connection.args2", "formparam2="); export.setproperty("export.mode", "silent"); // export.setproperty("export.saveonefile", "true"); export.setproperty("connection.fetchtype", "BATCH"); export.setproperty("export.confirmsave", "false"); export.setproperty("information.debug", "debug"); export.setproperty("applet.showerrormessage", "false"); export.setproperty("odi.parameter_test.pcount", "2"); export.setproperty("odi.parameter_test.args1", "odiparam1="); export.setproperty("odi.parameter_test.args2", "odiparam2="); export.setproperty("odi.odinames", "parameter_test"); export.setproperty("export.format", "csv/xls/html/ozd/pdf/txt/tif/doc/ppt/jpg/svg/mht"); export.setproperty("csv.filename", "1.csv"); export.setproperty("excel.filename", "1.xls"); export.setproperty("html.filename", "1.html"); export.setproperty("ozd.filename", "1.ozd"); export.setproperty("pdf.filename", "1.pdf"); export.setproperty("text.filename", "1.txt"); export.setproperty("tiff.filename", "1.tif"); export.setproperty("word.filename", "1.doc"); export.setproperty("ppt.filename", "1.ppt"); export.setproperty("jpg.filename", "1.jpg"); export.setproperty("svg.filename", "1.svg"); export.setproperty("mht.filename", "1.mht"); export.setproperty("hdm.filename", "1.hdm"); // export.setproperty("viewer.childcount", "1"); 120 FORCS Co., LTD
export.setproperty("child1.connection.server", "127.0.0.1"); export.setproperty("child1.connection.port", "8003"); export.setproperty("child1.connection.reportname", "/parameter_test.ozr"); export.setproperty("child1.applet.mode", "export"); export.setproperty("child1.applet.useprogressbar", "false"); export.setproperty("child1.applet.allowmultiframe", "true"); export.setproperty("child1.export.mode", "silent"); export.setproperty("child1.connection.fetchtype", "BATCH"); export.setproperty("child1.export.confirmsave", "false"); export.setproperty("child1.information.debug", "debug"); export.setproperty("child1.applet.showerrormessage", "false"); export.setproperty("child1.connection.pcount", "2"); export.setproperty("child1.connection.args1", "formparam1= 1"); export.setproperty("child1.connection.args2", "formparam2= 2"); export.setproperty("child1.odi.odinames", "parameter_test"); export.setproperty("child1.odi.parameter_test.pcount", "2"); export.setproperty("child1.odi.parameter_test.args1", "odiparam1= 3"); export.setproperty("child1.odi.parameter_test.args2", "odiparam2= 4"); //. export.setproperty("child1.export.format", "csv/xls/html/ozd/pdf/txt/tif/doc/ppt/jpg/svg/mht"); export.setproperty("child1.csv.filename", "child_1.csv"); export.setproperty("child1.excel.filename", "child_1.xls"); export.setproperty("child1.html.filename", "child_1.html"); export.setproperty("child1.ozd.filename", "child_1.ozd"); export.setproperty("child1.pdf.filename", "child_1.pdf"); export.setproperty("child1.text.filename", "child_1.txt"); export.setproperty("child1.tiff.filename", "child_1.tif"); export.setproperty("child1.word.filename", "child_1.doc"); export.setproperty("child1.ppt.filename", "child_1.ppt"); export.setproperty("child1.jpg.filename", "child_1.jpg"); export.setproperty("child1.svg.filename", "child_1.svg"); export.setproperty("child1.mht.filename", "child_1.mht"); export.setproperty("child1.hdm.filename", "child_1.hdm"); // API EM. String taskid = scheduler.createtask(serverinfo, config, export); FORCS Co., LTD 121
OZ API Developer's Guide (for Java) Sample : SchedulerExportOZDsample.java package sample; import oz.framework.api.*; import oz.scheduler.serverinfo; import oz.util.sortproperties; import org.apache.log4j.*; public class SchedulerExportOZDsample { private static String[][] scheduleinfoproperties = { {"task_type","none", {"cfg.type","new", // Type of Task -> new, edit {"reportname", "/sample.ozr", // {"category_name","/", // {"group_name","", // {"odi_name", "sample", // {"odi_category_name", "/", {"file_export_list", "ozd", {"export.confirmsave", "false", {"TempRepositoryFilePath", "%SCH_HOME%/TempRepository", // {"RepositoryFileRootPath", "%SCH_HOME%/Repository", {"parameter_count", "2", {"parameter_name_1", "[FORM].formparam", {"parameter_value_1", "value1", {"parameter_name_2", "sample.odiparam", {"parameter_value_2", "value2", {"image_url_size", "2", {"image_url_1", "file://d:\\repository\\img1.jpg", {"image_url_2", "file://d:\\pictures\\img2.jpg", // {"external_program_check", "check", {"external_program_command","external.bat", {"reportcount", "2", {"child1.reportname", "/orders.ozr", {"child1.displayname", "orders", {"child1.odi_name", "/orders", {"child1.odi_category_name", "/", {"child1.parameter_count", "2", {"child1.parameter_name_1", "[FORM].formparam", 122 FORCS Co., LTD
{"child1.parameter_value_1", "value1", {"child1.parameter_name_2", "sample.odiparam", {"child1.parameter_value_2", "value2", // {"child1.external_program_check", "check", {"child1.external_program_command","external.bat", // {"child1.option_properties_size", "1", {"child1.option_property_name_1","use_ozd_parameter", {"child1.option_property_value_1","true", // {"launch_type", "periodically", //("immediately","periodically") {"start_year", "2009", {"start_month", "03", {"start_day", "01", {"start_hour", "06", {"start_min", "42", {"periodically_execution_day_type", "daily", {"daily_type", "specific_day", {"daily_every_days", "1", {"periodically_execution_time_type", "repeat", {"repeat_every_hours", "00", {"repeat_every_minutes", "01", {"repeat_start_hour", "09", {"repeat_start_minute", "01", {"repeat_end_hour", "23", {"repeat_end_minute", "01", ; {"mail_check", "check", {"mail_notify_error_check", "null", {"mail_recipient_to", "sblee@forcs.com", {"mail_recipient_cc", "", {"mail_recipient_bcc", "", {"mail_subject", "aaa", {"mail_text_message", "message", {"mail_html_comment", "comment", {"html_mail_content", "content", {"mail_attach_list", "ozd" private static String[][] exportedproperties = { {"ozd.filename", "test11.ozd", //pdf file name {"ozd.mailattach", "true", // FORCS Co., LTD 123
OZ API Developer's Guide (for Java) ; {"ozd.password", "aaaa", // {"ozd.memoallowed", "false", // {"ozd.includeimage", "false" // public static void main(string[] args) { BasicConfigurator.configure(); String IP = "127.0.0.1"; //scheduler server ip int PORT = 9521; //scheduler server port Scheduler scheduler = null; boolean isdaemon = true; try { scheduler = new Scheduler(IP, PORT); daemon // scheduler Server Info ServerInfo serverinfo = new ServerInfo(); if(isdaemon){ serverinfo.setip("127.0.0.1"); //OZ Server IP conf. In case use of serverinfo.setportno(8003); serverinfo.setisdaemon(true);//oz Server Type. -> daemon, servlet else{ serverinfo.setisdaemon(false); serverinfo.seturl("http://127.0.0.1:8080/oz50/server"); serverinfo.setid("admin"); //id serverinfo.setpwd("admin"); //pw SortProperties props = new SortProperties(); setproperties(props, scheduleinfoproperties); SortProperties exportmap = new SortProperties(); setproperties(exportmap, exportedproperties); scheduler.createtask(serverinfo,props,exportmap); catch(exception e) { e.printstacktrace(); private static void setproperties(sortproperties p, String[][] values) { for(int i=0; i<values.length; i++) { p.setproperty(values[i][0], values[i][1]); 124 FORCS Co., LTD
Sample : SchedulerTaskResult.java package sample; import oz.framework.api.*; import oz.scheduler.taskresult; import oz.scheduler.serverinfo; import oz.scheduler.scheduledtask; public class SchedulerTaskResult { public static void main(string[] args) { String IP = "127.0.0.1"; //scheduler server ip int PORT = 9521; //scheduler server port Scheduler scheduler = null; try { scheduler = new Scheduler(IP, PORT); // scheduler Server Info ServerInfo serverinfo = new ServerInfo(); daemon serverinfo.setip("127.0.0.1"); //OZ Server IP conf. In case use of serverinfo.setportno(8003); serverinfo.setisdaemon(true);//oz Server Type. -> daemon, servlet serverinfo.setid("admin"); //id serverinfo.setpwd("admin"); //pw ScheduledTask[] tasklist = scheduler.gettask(serverinfo); for (int k = 0; k < tasklist.length; k++) { showtask(tasklist[k]); System.out.println("\n\n"); TaskResult tr = new TaskResult(); tr.taskid = tasklist[k].taskid; String from = ""; //Task Result Start time String to = ""; //Task Result Endt time FORCS Co., LTD 125
OZ API Developer's Guide (for Java) boolean iscomplete = false; TaskResult[] trlist = scheduler.gettaskresult(serverinfo, from, to, tr.taskid); if (trlist.length > 0) { for (int i = 0; i < trlist.length; i++) { showtaskresult(trlist[i]); iscomplete = true; catch(exception e) { e.printstacktrace(); private static void showtask(scheduledtask t) { System.out.println("TASK ID : " + t.taskid); System.out.println("Report Name : " + t.reportname); System.out.println("Type : " + t.schedulingtypestr); System.out.println("Finish Execute Time : " + t.lastruntimestr); System.out.println("Next Execute Time : " + t.nextruntimestr); System.out.println("Status : " + t.status); System.out.println(""); private static void showtaskresult(taskresult tr) { System.out.println("TASK ID : " + tr.taskid); System.out.println("TASK FINISH TIME : " + tr.completedtime); System.out.println("Is Sucessed Code : " + tr.issuccessfulcode); System.out.println("Is Sucessed? : " + tr.issuccessful); System.out.println("Report Name : " + tr.formfilename); System.out.println("Parameter : " + tr.paraminfo); System.out.println("Type : " + tr.schedulingtype); System.out.println("Error Message : " + tr.errormsg); System.out.println(""); Sample : SchedulerTaskModify.java 126 FORCS Co., LTD
package sample; import org.apache.log4j.*; import oz.framework.api.*; import oz.scheduler.serverinfo; import oz.scheduler.scheduledtask; import oz.util.sortproperties; public class SchedulerTaskModify { public static void main(string[] args) { //. BasicConfigurator.configure(); // String IP = "127.0.0.1"; // IP int PORT = 9521; // Port Scheduler scheduler = null; String taskid = null; try { scheduler = new Scheduler(IP, PORT); // OZ Server ServerInfo serverinfo = new ServerInfo(); serverinfo.setip("127.0.0.1"); // IP serverinfo.setportno(8003); // Port serverinfo.setisdaemon(true);// serverinfo.setid("admin"); // ID serverinfo.setpwd("admin"); // Password // taskid // task task_type viewertag. taskid = "parameter_test_061031115221500_263141500.ozs"; taskid); //. SortProperties[] props = scheduler.gettaskproperties(serverinfo, // txt Export Task csv export. props[0].setproperty("user_defined_time", "17:53"); props[0].setproperty("file_export_list", "csv/txt"); props[1].setproperty("csv.filename", "modify_task.csv"); FORCS Co., LTD 127
OZ API Developer's Guide (for Java) // System.out.println("config..."); props[0].list(system.out); System.out.println("export..."); props[1].list(system.out); // ScheduledTask[] tasklist = scheduler.gettask(serverinfo); for (int i = 0; i < tasklist.length; i++) { if (taskid.endswith(tasklist[i].taskid)) { while(true) { if (tasklist[i].status!= 'R') { // // scheduler.modifytask(serverinfo, taskid, props[0], props[1]); System.out.println("modify ok..."); break; Thread.sleep(1000); catch(exception e) { e.printstacktrace(); Sample : SchedulerPrint.java package sample; import org.apache.log4j.basicconfigurator; import oz.framework.api.scheduler; import oz.scheduler.schedulerexception; import oz.scheduler.serverinfo; import oz.util.sortproperties; public class SchedulerPrint { public static void main(string[] args) { 128 FORCS Co., LTD
//. BasicConfigurator.configure(); // String IP = "127.0.0.1"; // IP int PORT = 9521; // Port try { Scheduler scheduler = new Scheduler(IP, PORT); // OZ Server ServerInfo serverinfo = new ServerInfo(); serverinfo.setip("127.0.0.1"); // IP serverinfo.setportno(8003); // Port serverinfo.setisdaemon(true); // serverinfo.setid("admin"); // ID serverinfo.setpwd("admin"); // Password SortProperties config = new SortProperties(); // print task_type viewertag. config.setproperty("task_type", "viewertag"); config.setproperty("launch_type", "immediately"); SortProperties printmap = new SortProperties(); printmap.setproperty("connection.server", "127.0.0.1"); printmap.setproperty("connection.port", "8003"); printmap.setproperty("connection.reportname", "/parameter_test.ozr"); printmap.setproperty("repository_agent.try_license_check", "true"); printmap.setproperty("connection.pcount", "2"); printmap.setproperty("connection.args1", "formparam1="); printmap.setproperty("connection.args2", "formparam2="); printmap.setproperty("connection.fetchtype", "BATCH"); printmap.setproperty("odi.parameter_test.pcount", "2"); printmap.setproperty("odi.parameter_test.args1", "odiparam1="); printmap.setproperty("odi.parameter_test.args2", "odiparam2="); printmap.setproperty("odi.odinames", "parameter_test"); //print ( ) printmap.setproperty("print.adjust", "true"); printmap.setproperty("print.alldocument", "false"); printmap.setproperty("print.close", "true"); printmap.setproperty("print.collate", "true"); printmap.setproperty("print.copies", "1"); printmap.setproperty("print.duplex", "none"); printmap.setproperty("print.gray", "true"); printmap.setproperty("print.ignoreerror", "true"); FORCS Co., LTD 129
OZ API Developer's Guide (for Java) printmap.setproperty("print.lockopt", "true"); printmap.setproperty("print.once", "false"); printmap.setproperty("print.orientation", "default"); printmap.setproperty("print.pageorient", "horizontal"); printmap.setproperty("print.pagerange", "all"); printmap.setproperty("print.printbypage", "true"); printmap.setproperty("print.printername", "default"); printmap.setproperty("print.scaling", "100"); printmap.setproperty("print.size", "A4"); printmap.setproperty("print.spoolpages", "100"); printmap.setproperty("print.style", "normal"); printmap.setproperty("print.usedefaultpaper", "false"); printmap.setproperty("print.spoolpages", "100"); printmap.setproperty("print.usedialogopt", "true"); // printmap.setproperty("viewer.childcount", "1"); printmap.setproperty("child1.connection.server", "127.0.0.1"); printmap.setproperty("child1.connection.port", "8003"); printmap.setproperty("child1.connection.reportname", "/module_sample.ozr"); printmap.setproperty("child1.connection.fetchtype", "BATCH"); // API EM. boolean result = scheduler.print(serverinfo, config, printmap); if(result == true) { System.out.println("Success Print"); else { System.out.println("Failed Print"); catch (SchedulerException se) { se.printstacktrace(); Sample : SchedulerTaskConverter.java package sample; import org.apache.log4j.basicconfigurator; import oz.framework.api.scheduler; public class SchedulerTaskConverter { public static void main(string[] args) { 130 FORCS Co., LTD
BasicConfigurator.configure(); String IP = "127.0.0.1"; //scheduler server ip int PORT = 9521; //scheduler server port Scheduler scheduler = null; try { scheduler = new Scheduler(IP, PORT); // /%SCH_HOME%/ScheduledTask ozs ( OZS ) String[] ozslist = scheduler.getozslist("/scheduledtask"); for(int i=0 ; i < ozslist.length ; i++) { System.out.println(ozsList[i]); // /%SCH_HOME%/ScheduledTask ozs /%SCH_HOME%/ConvertedTask scheduler.ozsverconv("/scheduledtask", "/ConvertTask"); // /%SCH_HOME%/ ConvertTask ozs ( OZS ) ozslist = scheduler.getozslist("/converttask"); for(int i=0 ; i < ozslist.length ; i++) { System.out.println(ozsList[i]); catch(exception e) { e.printstacktrace(); UseSCOzdParameterSample.java package sample; import oz.framework.api.*; import oz.scheduler.taskresult; import oz.scheduler.serverinfo; import oz.scheduler.scheduledtask; import oz.util.sortproperties; import java.util.vector; import java.io.*; FORCS Co., LTD 131
OZ API Developer's Guide (for Java) import org.apache.log4j.*; public class UseSCOzdParameterSample { private static String[][] scheduleinfoproperties = { // Basic Configration {"launch_type","immediately", // Task Execute Type {"cfg.type","new", // Type of Task -> new, edit {"report_name", "parameter_test.ozr", {"category_name","/", {"group_name","", // ODI {"odi_name", "parameter_test.odi", {"odi_category_name", "/", {"option_properties_size", "1", {"option_property_name_1","use_ozd_parameter", {"option_property_value_1","true", {"parameter_count", "4", {"parameter_name_1", "[FORM].formparam1", {"parameter_value_1", "1", {"parameter_name_2", "[FORM].formparam2", {"parameter_value_2", "2", {"parameter_name_3", "parameter_test.odiparam1", {"parameter_value_3", "3", {"parameter_name_4", "parameter_test.odiparam2", {"parameter_value_4", "4", {"file_export_list", "ozd" ; private static String[][] exportedproperties = { ; {"ozd.filename ", "newimage.ozd", //OZD file name public static void main(string[] args) 132 FORCS Co., LTD
{ BasicConfigurator.configure(); String IP = "127.0.0.1"; //scheduler server ip int PORT = 9521; //scheduler server port String[][] values = null; Scheduler scheduler = null; String taskid = null; try { scheduler = new Scheduler(IP, PORT); for (int i = 0; i < 1; i++) { // scheduler Server Info ServerInfo serverinfo = new ServerInfo(); serverinfo.setip("127.0.0.1"); //OZ Server IP conf. In case use of daemon serverinfo.setportno(8003); serverinfo.setisdaemon(true); //OZ Server Type. -> daemon, servlet serverinfo.setid("admin"); //id serverinfo.setpwd("admin"); //pw SortProperties p = new SortProperties(); setproperties(p, scheduleinfoproperties); SortProperties exportmap = new SortProperties(); setproperties(exportmap, exportedproperties); taskid = scheduler.createtask(serverinfo, p, exportmap); System.out.println("ii=="+i+" catch (Exception e) { e.printstacktrace(); taskid=="+taskid); private static void setproperties(sortproperties p, String[][] values) { FORCS Co., LTD 133
OZ API Developer's Guide (for Java) for(int i=0; i<values.length; i++) { p.setproperty(values[i][0], values[i][1]); Sample : DirectExportResultSample.java package sample; import oz.framework.api.*; import oz.scheduler.directexportresult; import oz.scheduler.serverinfo; import oz.util.sortproperties; public class DirectExportResultSample { public DirectExportResultSample() { static final String IP = "127.0.0.1"; static final int PORT = 8003; static final String URL = "http://localhost:8088/oz/server"; static final boolean isdaemon = true; static final String ID = "admin"; static final String PWD = "admin"; static final String schedulerip = "127.0.0.1"; static final int schedulerport = 9521; public static void main(string[] args) { Scheduler scheduler = null; try { scheduler = new Scheduler(schedulerIP, schedulerport); // ServerInfo serverinfo = new ServerInfo(); serverinfo.setid(id); // serverinfo.setpwd(pwd); // serverinfo.setisdaemon(isdaemon); if (serverinfo.getisdaemon()) { 134 FORCS Co., LTD
serverinfo.setip(ip); //OZ Server IP. daemon serverinfo.setportno(port); else { serverinfo.seturl(url); SortProperties props = new SortProperties(); props.setproperty("task_type", "viewertag"); props.setproperty("cfg.type", "new"); props.setproperty("launch_type", "immediately"); SortProperties export = new SortProperties(); export.setproperty("connection.server", "127.0.0.1"); export.setproperty("connection.port", "8003"); export.setproperty("connection.reportname", "/parameter_test.ozr"); export.setproperty("viewer.mode", "export"); export.setproperty("export.mode", "silent"); export.setproperty("viewer.isframe", "true"); export.setproperty("viewer.mode", "silent"); export.setproperty("export.confirmsave", "false"); export.setproperty("export.format", "xls"); export.setproperty("xls.filename", "sample.xls"); props, export); DirectExportResult result = scheduler.directexport(serverinfo, showdirectexportresult(result); catch (Exception e) { e.printstacktrace(); private static void showdirectexportresult(directexportresult t) { System.out.println(" :" + t.taskid); System.out.println(" :" + t.completedtime); System.out.println(" : " + t.executetime + "sec"); System.out.println(" : " + t.issuccessful); System.out.println(" : " + t.formname); System.out.println("export : " + t.exportfilelist); System.out.println(" : " + t.pagecount); System.out.println(""); FORCS Co., LTD 135
OZ API Developer's Guide (for Java) Sample :DirectPrintResultSample.java package sample; import oz.framework.api.*; import oz.scheduler.directprintresult; import oz.scheduler.serverinfo; import oz.util.sortproperties; public class DirectPrintResultSample { public DirectPrintResultSample() { static final String IP = "127.0.0.1"; static final int PORT = 8003; static final String URL = "http://localhost:8088/oz35/server"; static final boolean isdaemon = true; static final String ID = "admin"; static final String PWD = "admin"; static final String schedulerip = "127.0.0.1"; static final int schedulerport = 9521; public static void main(string[] args) { Scheduler scheduler = null; try { scheduler = new Scheduler(schedulerIP, schedulerport); // ServerInfo serverinfo = new ServerInfo(); serverinfo.setid(id); // serverinfo.setpwd(pwd); // serverinfo.setisdaemon(isdaemon); if (serverinfo.getisdaemon()) { serverinfo.setip(ip); //OZ Server IP. daemon serverinfo.setportno(port); else { serverinfo.seturl(url); SortProperties props = new SortProperties(); props.setproperty("task_type", "viewertag"); props.setproperty("cfg.type", "new"); 136 FORCS Co., LTD
props.setproperty("launch_type", "immediately"); SortProperties print = new SortProperties(); print.setproperty("connection.server","127.0.0.1"); print.setproperty("connection.port","8003"); print.setproperty("connection.id","admin"); print.setproperty("connection.password","admin"); print.setproperty("connection.reportname","/parameter_test.ozr"); print.setproperty("viewer.configmode","html"); print.setproperty("odi.odinames","parameter_test"); print.setproperty("connection.pcount","2"); print.setproperty("connection.args1","formparam2="); print.setproperty("connection.args2","formparam1="); print.setproperty("odi.parameter_test.pcount","2"); print.setproperty("odi.parameter_test.args1","odiparam1=odivalue1111111"); print.setproperty("odi.parameter_test.args2","odiparam2=odivalue22222222"); // print.setproperty("applet.isframe","false"); print.setproperty("connection.clientdmtype","memory"); print.setproperty("connection.serverdmtype","memory"); print.setproperty("connection.fetchtype","concurrent"); print.setproperty("viewer.mode","print"); print.setproperty("print.mode","silent"); print.setproperty("viewer.printcommand", "true"); print); DirectPrintResult result = scheduler.directprint(serverinfo, props, showdirectexportresult(result); catch (Exception e) { e.printstacktrace(); private static void showdirectexportresult(directprintresult t) { System.out.println(" :" + t.taskid); System.out.println(" :" + t.completedtime); System.out.println(" : " + t.executetime + "sec"); System.out.println(" : " + t.issuccessful); System.out.println(" : " + t.formname); System.out.println(" : " + t.pagecount); System.out.println(" : " + t.pagecopy); FORCS Co., LTD 137
OZ API Developer's Guide (for Java) System.out.println(" : " + t.pagerange); System.out.println(" : " + t.printername); System.out.println(" : " + t.printerdrivername); System.out.println(""); 138 FORCS Co., LTD
Constructor Summary TaskHolidayInfo(String name) Method Summary String getname() void setbaseday(string pattern) String getbaseday() void settype(string type) String gettype() boolean islunar() void setstart(int start) int getstart() void setend(int end) void getend() Constructor Detail public TaskHolidayInfo(String name) name : ";". Method Detail getname public String getname() FORCS Co., LTD 139
OZ API Developer's Guide (for Java). setbaseday public void setbaseday(string pattern). pattern : yyyy-mm-dd : yyyy-mm-01 : 1 yyyy-01-01 : 1 1 2007-01-01 : 2007 1 1 getbaseday public String getbaseday(). settype public void settype(string type),. type, solar : lunar : : solar, lunar solar. (solar, lunar ) gettype public String gettype() (, ). islunar public boolean islunar(). setstart public void setstart(int start) 140 FORCS Co., LTD
"baseday". start getstart public int getstart() "baseday". setend public void setend(int end) "baseday". end getend public void getend() "baseday". Sample : SchedulerTaskHoliday.java package sample; import java.util.*; import oz.util.ozmap; import oz.framework.api.*; import oz.scheduler.holiday.*; public class SchedulerTaskHoliday { public static void main(string[] args) { String IP = "127.0.0.1"; //scheduler server ip int PORT = 9521; //scheduler server port Scheduler scheduler = null; try { scheduler = new Scheduler(IP, PORT); //TaskHolidayInfo. FORCS Co., LTD 141
OZ API Developer's Guide (for Java) OZMap infomap = scheduler.gettaskholidayinfolist(); Iterator set = infomap.keys(); while(set.hasnext()) { String key = (String)set.next(); TaskHolidayInfo info = (TaskHolidayInfo)infoMap.get(key); System.out.println(info. tostring()); //TaskHolidayInfo. TaskHolidayInfo info = new TaskHolidayInfo(""); info.setbaseday("yyyy-07-01"); info.settype("solar"); info.setstart(0); info.setend(0); scheduler.addtaskholidayinfo(info); //TaskHolidayInfo. info.setbaseday("yyyy-07-02"); scheduler.modifytaskholidayinfo("",info); //TaskHolidayInfo. scheduler.deletetaskholidayinfo(""); // TaskHoliday. //(.) scheduler.savetaskholiday(); catch(exception e) { e.printstacktrace(); : Scheduler Info Properties {"task_holiday", " ; ". (ex : {"task_holiday", ";Group1") 142 FORCS Co., LTD
Constructor Summary TaskHolidayGroupInfo(String name) Method Summary String getname() void addreference(string name) void addreference(string[] ref) String[] getreferences() void removereference(string name) void removereference(string[] name) void removeallref() Constructor Detail public TaskHolidayGroupInfo(String name) name : ";". Method Detail getname public String getname(). addreference FORCS Co., LTD 143
OZ API Developer's Guide (for Java) public void addreference(string name).. name ( ) addreference public void addreference(string[] names). names getreferences public String[] getreferences() Reference. removereference public void removereference(string name). name removereference public void removereference(string[] name). name removeallref public void removeallref(). Sample : SchedulerTaskHolidayGroup.java package sample; import java.util.*; 144 FORCS Co., LTD
import oz.util.ozmap; import oz.framework.api.*; import oz.scheduler.holiday.*; public class SchedulerTaskHolidayGroup { public static void main(string[] args) { String IP = "127.0.0.1"; //scheduler server ip int PORT = 9521; //scheduler server port Scheduler scheduler = null; try { scheduler = new Scheduler(IP, PORT); //TaskHolidayInfoGroup. OZMap ginfomap = scheduler.gettaskholidaygroupinfolist(); Iterator set1 = ginfomap.keys(); while(set1.hasnext()) { String key = (String)set1.next(); TaskHolidayGroupInfo ginfo = (TaskHolidayGroupInfo)gInfoMap.get(key); System.out.println(ginfo.toString()); //TaskHolidayGroupInfo. TaskHolidayGroupInfo ginfo = new TaskHolidayGroupInfo("group1"); ginfo.addreference(""); ginfo.addreference(""); ginfo.addreference("31 "); scheduler.addtaskholidaygroupinfo(ginfo); //TaskHolidayGroupInfo. ginfo.addreference(""); scheduler.modifytaskholidaygroupinfo("group1", ginfo); //TaskHolidayGroupInfo. scheduler.deletetaskholidaygroupinfo("group1"); // TaskHoliday. //(.) scheduler.savetaskholiday(); catch(exception e) { e.printstacktrace(); FORCS Co., LTD 145
OZ API Developer's Guide (for Java) : Scheduler Info Properties {"task_holiday", " ; ". (ex : {"task_holiday", ";Group1") 146 FORCS Co., LTD
Interface Repository Class RepositoryEx FORCS Co., LTD 147
OZ API Developer's Guide (for Java). Interface Summary // : oz.framework.repositoryex - public interface IOZRepository - public interface IOZRepositoryCategory - public interface IOZRepositoryItem - public interface IOZRepositoryItemHistory - public interface IOZRepositoryGroup - public interface IOZRepositoryUser - public interface IOZRepositoryMultiLoginUser Exception - public class OZRepositoryException extends Exception // : oz.framework.repositoryex.auth - public interface IOZRepositoryAuthGroupCategory - public interface IOZRepositoryAuthGroupItem - public interface IOZRepositoryAuthUserCategory - public interface IOZRepositoryAuthUserItem // : oz.framework.repositoryex.info (bean) 148 FORCS Co., LTD
- public interface IOZCategoryInfo - public interface IOZItemInfo - public interface IOZHistoryInfo - public interface IOZGroupInfo - public interface IOZUserInfo - public interface IOZLoginInfo (bean) - public interface IOZCategoryInfoList - public interface IOZItemInfoList - public interface IOZHistoryInfoList - public interface IOZGroupInfoList - public interface IOZUserInfoList Interface Method Summary // IOZRepository void setproperty(sortproperties prop) throws OZRepositoryException int getrepositoryversion() void openrepository() throws OZRepositoryException void closerepository() throws OZRepositoryException Object checkrepositorylogin(string username, String password, IOZLoginInfo logininfo, HttpServletRequest request, HttpServlet servlet) throws OZRepositoryException void updatesesssionstate(object sessionid, int type) throws OZRepositoryException boolean repositorylogout(object sessionid, String username, IOZLoginInfo logininfo, HttpServletRequest request, HttpServlet servlet) throws OZRepositoryException IOZRepositoryCategory getrepositorycategory() throws OZRepositoryException IOZRepositoryItem getrepositoryitem() throws OZRepositoryException IOZRepositoryItemHistory getrepositoryitemhistory() throws OZRepositoryException FORCS Co., LTD 149
OZ API Developer's Guide (for Java) IOZRepositoryGroup getrepositorygroup() throws OZRepositoryException IOZRepositoryUser getrepositoryuser() throws OZRepositoryException IOZRepositoryMultiLoginUser getrepositorymultiloginuser() throws OZRepositoryException IOZRepositoryAuthGroupCategory getrepositoryauthgroupcategory() throws OZRepositoryException IOZRepositoryAuthGroupItem getrepositoryauthgroupitem() throws OZRepositoryException IOZRepositoryAuthUserCategory getrepositoryauthusercategory() throws OZRepositoryException IOZRepositoryAuthUserItem getrepositoryauthuseritem() throws OZRepositoryException // IOZRepositoryCategory int getaccesstypecategory() IOZRepository getozrepository() throws OZRepositoryException String[] createitemincategory(object sessionid, String[] itemnames, String[] descs, String[] categoryids, InputStream[] item_ins, String comment, int[] errorcode, String[] errormsg) throws OZRepositoryException String[] createcategory(object sessionid, String[] categorynames, String[] pcategoryids, String comment, int[] errorcode, String[] errormsg) throws OZRepositoryException String modifycategoryname(object sessionid, String categoryid, String new_categoryname, String comment) throws OZRepositoryException boolean[] deletecategory(object sessionid, String[] categoryids, boolean[] isdestroys, String comment, int[] errorcode, String[] errormsg) throws OZRepositoryException boolean[] undeletecategory(object sessionid, String[] categoryids, String comment, int[] errorcode, String[] errormsg) throws OZRepositoryException boolean hastheitemincategory(object sessionid, String itemid) throws OZRepositoryException int getitemcountincategory(object sessionid, String categoryid) throws OZRepositoryException 150 FORCS Co., LTD
IOZItemInfoList getitemlistincategory(object sessionid, String categoryid) throws OZRepositoryException IOZCategoryInfoList getcategorylistincategory(object sessionid, String categoryid) throws OZRepositoryException String getcategoryidofitem(object sessionid, String itemid) throws OZRepositoryException IOZCategoryInfo getcategoryinfo(object sessionid, String categoryid) throws OZRepositoryException IOZItemInfoList getdeleteditemlistincategory(object sessionid, String categoryid) throws OZRepositoryException boolean transferitem(object sessionid, String[] itemids, String target_categoryid) throws OZRepositoryException boolean transfercategory(object sessionid, String categoryid, String target_categoryid) throws OZRepositoryException // IOZRepositoryItem public int getaccesstypeitem() public IOZRepository getozrepository() throws OZRepositoryException public String[] createitem(object sessionid, String[] itemnames, String[] descs, InputStream[] item_ins, String comment, int[] errorcode, String[] errormsg) throws public String modifyitemname(object sessionid, String itemid, String new_itemname, String comment) throws OZRepositoryException public boolean[] deleteitem(object sessionid, String[] itemids, boolean[] isdestroys, String comment, int[] errorcode, String[] errormsg) throws public boolean[] undeleteitem(object sessionid, String[] itemids, String comment, int[] errorcode, String[] errormsg) throws OZRepositoryException public boolean modifyitemdesc(object sessionid, String itemid, String desc) throws OZRepositoryException public IOZItemInfo getiteminfo(object sessionid, String itemid) throws OZRepositoryException public boolean hastheitem(object sessionid, String itemid) throws OZRepositoryException public InputStream[] getitems(object sessionid, String itemids[], int[] FORCS Co., LTD 151
OZ API Developer's Guide (for Java) errorcode, String[] errormsg) throws OZRepositoryException public InputStream[] getitems(object sessionid, String itemids[], long[] modifiedtimes, int[] errorcode, String[] errormsg) throws OZRepositoryException public InputStream[] checkoutitem(object sessionid, String itemids[], String[] localcheckoutfolders, long[] localfiletimes, int[] errorcode, String[] errormsg) throws public boolean[] checkinitem(object sessionid, String[] itemids, InputStream[] item_ins, String comment, boolean[] keepcheckout, int[] errorcode, String[] errormsg) throws public InputStream[] undocheckoutitem(object sessionid, String[] itemids, boolean[] isreplaces, int[] errorcode, String[] errormsg) throws OZRepositoryException public boolean[] ischeckoutuser(object sessionid, String[] itemids) throws OZRepositoryException // IOZRepositoryItemHistory public int getaccesstypeitemhistory() public IOZRepository getozrepository() throws OZRepositoryException public boolean rollbackitem(object sessionid, String itemid, int itemversion, String comment) throws OZRepositoryException public InputStream getitembyversion(object sessionid, String itemid, int version) throws OZRepositoryException public IOZHistoryInfoList gethistoryitemlist(object sessionid, String itemid) throws OZRepositoryException public IOZHistoryInfoList getdeletehistoryiteminfo(object sessionid, String itemid) throws OZRepositoryException public boolean removehistoryitem(object sessionid, String itemid, int itemversion) throws OZRepositoryException // IOZRepositoryGroup public int getaccesstypegroup() public IOZRepository getozrepository() throws OZRepositoryException public String creategroup(object sessionid, String gname, String pgroupid, String desc) throws OZRepositoryException 152 FORCS Co., LTD
public String modifygroupname(object sessionid, String groupid, String gname) throws OZRepositoryException public boolean modifygroupdesc(object sessionid, String groupid, String desc) throws OZRepositoryException public boolean deletegroup(object sessionid, String groupid) throws OZRepositoryException public String createuseringroup(object sessionid, String username, String password, String groupid, String desc) throws OZRepositoryException public IOZUserInfoList getuserinfolistingroup(object sessionid, String groupid) throws OZRepositoryException public IOZGroupInfo getgroupinfo(object sessionid, String groupid) throws OZRepositoryException public IOZGroupInfoList getsubgroupinfolist(object sessionid, String groupid) throws OZRepositoryException public IOZGroupInfo getparentgroupinfo(object sessionid, String groupid) throws OZRepositoryException public IOZGroupInfo getgroupidofuser(object sessionid, String userid) throws OZRepositoryException public boolean addgroupadmin(object sessionid, String userid, String groupid) throws OZRepositoryException public boolean removegroupadmin(object sessionid, String userid, String groupid) throws OZRepositoryException public boolean isusergroupadmin(object sessionid, String userid, String groupid) throws OZRepositoryException public IOZUserInfoList getuseradminlistingroup(object sessionid, String groupid) throws OZRepositoryException public boolean transferuser(object sessionid, String userid, String target_groupid) throws OZRepositoryException public boolean transfergroup(object sessionid, String groupid, String target_groupid) throws OZRepositoryException // IOZRepositoryUser public int getaccesstypeuser() public IOZRepository getozrepository() throws OZRepositoryException public String createuser(object sessionid, String username, String FORCS Co., LTD 153
OZ API Developer's Guide (for Java) password, String desc) throws OZRepositoryException public String modifyusername(object sessionid, String userid, String username) throws OZRepositoryException public boolean modifyuserpassword(object sessionid, String userid, String old_password, String new_password) throws OZRepositoryException public boolean modifyuserdesc(object sessionid, String userid, String desc) throws OZRepositoryException public boolean deleteuser(object sessionid, String userid) throws OZRepositoryException public IOZUserInfo getuserinfo(object sessionid, String userid) throws OZRepositoryException public boolean checkuserpassword(object sessionid, String userid, String password) throws OZRepositoryException public IOZUserInfoList getuserinfolist(object sessionid) throws OZRepositoryException public boolean ischeckadmin(object sessionid, String userid) throws OZRepositoryException // IOZRepositoryMultiLoginUser public int getaccesstypeuser() public IOZRepository getozrepository() throws OZRepositoryException public String createuser(object sessionid, String username, String password, String desc) throws OZRepositoryException public String modifyusername(object sessionid, String userid, String username) throws OZRepositoryException public boolean modifyuserpassword(object sessionid, String userid, String old_password, String new_password) throws OZRepositoryException public boolean modifyuserdesc(object sessionid, String userid, String desc) throws OZRepositoryException public boolean deleteuser(object sessionid, String userid) throws OZRepositoryException public IOZUserInfo getuserinfo(object sessionid, String userid) throws OZRepositoryException 154 FORCS Co., LTD
public boolean checkuserpassword(object sessionid, String userid, String password) throws OZRepositoryException public IOZUserInfoList getuserinfolist(object sessionid) throws OZRepositoryException public boolean ischeckadmin(object sessionid, String userid) throws OZRepositoryException // IOZRepositoryAuthGroupCategory public int getaccesstypeauthgroupcategory() public IOZRepository getozrepository() throws OZRepositoryException public boolean modifycategorygroupauth(object sessionid, String categoryid, String groupid, int perm) throws OZRepositoryException public int getgroupauthtocategory(object sessionid, String categoryid, String groupid) throws OZRepositoryException public IOZGroupInfoList getgrouplistauthtocategory(object sessionid, String categoryid, int perm) throws OZRepositoryException public IOZItemInfoList getitemlistauthtogroupincategory(object sessionid, String groupid, String categoryid, int perm) throws OZRepositoryException public IOZCategoryInfoList getcategorylistauthtogroupincategory(object sessionid, String groupid, String categoryid, int perm) throws OZRepositoryException // IOZRepositoryAuthGroupItem public int getaccesstypeauthgroupitem() public IOZRepository getozrepository() throws OZRepositoryException public boolean modifyitemgroupauth(object sessionid, String groupid, String itemid, int perm) throws OZRepositoryException public int getgroupauthtoitem(object sessionid, String groupid, String itemid) throws OZRepositoryException public IOZGroupInfoList getgrouplistauthtoitem(object sessionid, String itemid, int perm) throws OZRepositoryException public IOZItemInfoList getitemlistauthtogroup(object sessionid, String groupid, int perm) throws OZRepositoryException FORCS Co., LTD 155
OZ API Developer's Guide (for Java) // IOZRepositoryAuthUserCategory public int getaccesstypeauthusercategory() public IOZRepository getozrepository() throws OZRepositoryException public boolean modifycategoryuserauth(object sessionid, String userid, String categoryid, int perm) throws OZRepositoryException public int getuserauthtocategory(object sessionid, String userid, String categoryid) throws OZRepositoryException public IOZUserInfoList getuserlistauthtocategory(object sessionid, String categoryid, int perm) throws OZRepositoryException public IOZItemInfoList getitemlistauthtouserincategory(object sessionid, String userid, String categoryid, int perm) throws OZRepositoryException public IOZCategoryInfoList getcategorylistauthtouserincategory(object sessionid, String userid, String categoryid, int perm) throws OZRepositoryException // IOZRepositoryAuthUserItem public int getaccesstypeauthuseritem() public IOZRepository getozrepository() throws OZRepositoryException public boolean modifyitemuserauth(object sessionid, String userid, String itemid, int perm) throws OZRepositoryException public int getuserauthtoitem(object sessionid, String userid, String itemid) throws OZRepositoryException public IOZUserInfoList getuserlistauthtoitem(object sessionid, String itemid, int perm) throws OZRepositoryException public IOZItemInfoList getitemlistauthtouser(object sessionid, String userid, int perm) throws OZRepositoryException Interface Method Detail // IOZRepository Interface Method Summary setproperty public void setproperty(sortproperties prop) throws OZRepositoryException 156 FORCS Co., LTD
. "repository.properties", Key. prop getrepositoryversion public int getrepositoryversion(). openrepository public void openrepository() throws OZRepositoryException. closerepository public void closerepository() throws OZRepositoryException. checkrepositorylogin public Object checkrepositorylogin(string username, String password, IOZLoginInfo logininfo, HttpServletRequest request, HttpServlet servlet) throws OZRepositoryException. username password iscallserver logininfo request servlet : IOZLoginInfo. HTTP Servelt Request HTTP Servlet updatesesssionstate public void updatesesssionstate(object sessionid, int type) throws OZRepositoryException FORCS Co., LTD 157
OZ API Developer's Guide (for Java). sessionid ID type 0 : DEFAULT 1 : BARE_SERVER 2 : FROM_SERVER repositorylogout public boolean repositorylogout(object sessionid, String username, IOZLoginInfo logininfo, HttpServletRequest request, HttpServlet servlet) throws OZRepositoryException ID,. sessionid ID username logininfo request servlet ( ) HTTP Servelt Request HTTP Servlet getrepositorycategory public IOZRepositoryCategory getrepositorycategory() throws OZRepositoryException. getrepositoryitem public IOZRepositoryItem getrepositoryitem() throws OZRepositoryException. getrepositoryitemhistory public IOZRepositoryItemHistory getrepositoryitemhistory() throws OZRepositoryException. getrepositorygroup 158 FORCS Co., LTD
public IOZRepositoryGroup getrepositorygroup() throws OZRepositoryException. getrepositoryuser public IOZRepositoryUser getrepositoryuser() throws OZRepositoryException. getrepositorymultiloginuser public IOZRepositoryMultiLoginUser getrepositorymultiloginuser() throws OZRepositoryException getrepositoryauthgroupcategory public IOZRepositoryAuthGroupCategory getrepositoryauthgroupcategory() throws OZRepositoryException getrepositoryauthgroupitem public IOZRepositoryAuthGroupItem getrepositoryauthgroupitem() throws OZRepositoryException getrepositoryauthusercategory public IOZRepositoryAuthUserCategory getrepositoryauthusercategory() throws OZRepositoryException getrepositoryauthuseritem public IOZRepositoryAuthUserItem getrepositoryauthuseritem() throws OZRepositoryException FORCS Co., LTD 159
OZ API Developer's Guide (for Java) - Key setrepositoryconfig() getrepositoryconfig() key. Key Value REPOSITORY_TYPE REPOSITORY_FILE_P ATH REPOSITORY_ITEM_ NUMBER_PER_DIREC TORY REPOSITORY_HISTO RY_ITEM_VALID_DA YS REPOSITORY_ADD_C OMPRESSED_ITEM "RDB" "BUILTIN" "true" "false" ex) prop.setproperty("repository_type","rdb"); ex) prop.setproperty("repository_file_path","c:/temp_ repository"); ( : "500") ex) prop.setproperty("repository_item_number_per_ DIRECTORY","100"); ex) prop.setproperty("repository_history_item_vali D_DAYS","20"); ex) prop.setproperty("repository_add_compressed_i TEM","false"); // IOZRepositoryCategory Interface Method Summary getaccesstypecategory public int getaccesstypecategory() 160 FORCS Co., LTD
. int ACCESS_CATEGORY_NOT = 0x00000000 int ACCESS_CREATEITEM_IN_CATEGORY = 0x00000001 int ACCESS_CREATE_CATEGORY = 0x00000002 int ACCESS_MODIFY_CATEGORY_NAME = 0x00000004 int ACCESS_DELETE_CATEGORY = 0x00000008 int ACCESS_UN_DELETE_CATEGORY = 0x00000010 int ACCESS_HAS_THE_ITEM_IN_CATEGORY = 0x00000020 int ACCESS_GET_ITEMCOUNT_IN_CATEGORY = 0x00000040 int ACCESS_GET_ITEMLIST_IN_CATEGORY = 0x00000080 int ACCESS_GET_CATEGORYID_OF_ITEM = 0x00000100 int ACCESS_GET_CATEGORY_INFO = 0x00000200 int ACCESS_GET_DELETED_ITEMLIST_IN_CATEGORY = 0x00000400 int ACCESS_GET_SEARCH_ITEMLIST_IN_CATEGORY = 0x00000800 int ACCESS_GET_CATEGORYLIST_IN_CATEGORY = 0x00001000 int ACCESS_TRANSFER_ITEM = 0x00002000; int ACCESS_TRANSFER_CATEGORY = 0x00004000; getozrepository public IOZRepository getozrepository() throws OZRepositoryException OZRepostiroy. createitemincategory public String[] createitemincategory(object sessionid, String[] itemnames, String[] descs, String[] categoryids, InputStream[] item_ins, String comment, int[] errorcode, String[] errormsg) throws OZRepositoryException ID. sessionid itemname descs categoryids item_ins comment errorcode errormsg ID ID ID createcategory FORCS Co., LTD 161
OZ API Developer's Guide (for Java) public String[] createcategory(object sessionid, String[] categorynames, String[] pcategoryids, String comment, int[] errorcode, String[] errormsg) throws OZRepositoryException ID. sessionid categoryname pcategoryids comment errorcode errormsg ID ID modifycategoryname public String modifycategoryname(object sessionid, String categoryid, String new_categoryname, String comment) throws OZRepositoryException ID. sessionid ID categoryid ID new_categoryname comment deletecategory public boolean[] deletecategory(object sessionid, String[] categoryids, boolean[] isdestroys, String comment, int[] errorcode, String[] errormsg) throws OZRepositoryException ID. sessionid categoryids isdestroys comment errorcode errormsg ID ID undeletecategory 162 FORCS Co., LTD
public boolean[] undeletecategory(object sessionid, String[] categoryids, String comment, int[] errorcode, String[] errormsg) throws OZRepositoryException. : "isdestroys=false". sessionid ID categoryids comment errorcode errormsg ID hastheitemincategory public boolean hastheitemincategory(object sessionid, String itemid) throws OZRepositoryException. sessionid itemid ID ID getitemcountincategory public int getitemcountincategory(object sessionid, String categoryid) throws OZRepositoryException. sessionid categoryid ID ID getitemlistincategory public IOZItemInfoList getitemlistincategory(object sessionid, String categoryid) throws OZRepositoryException. sessionid categoryid ID ID getcategoryidofitem FORCS Co., LTD 163
OZ API Developer's Guide (for Java) public String getcategoryidofitem(object sessionid, String itemid) throws OZRepositoryException ID. sessionid itemid ID ID ID getcategoryinfo public IOZCategoryInfo getcategoryinfo(object sessionid, String categoryid) throws OZRepositoryException. sessionid categoryid ID ID getdeleteditemlistincategory public IOZItemInfoList getdeleteditemlistincategory(object sessionid, String categoryid) throws OZRepositoryException. : "isdestroys=false". sessionid ID categoryid ID transferitem public boolean transferitem(object sessionid, String[] itemids, String target_categoryid) throws OZRepositoryException. sessionid itemids ID ID target_categoryid ID transfercategory public boolean transfercategory(object sessionid, String categoryid, String target_categoryid) throws OZRepositoryException 164 FORCS Co., LTD
. sessionid itemids ID ID target_categoryid ID // IOZRepositoryItem Interface Method Summary getaccesstypeitem public int getaccesstypecategory(). int ACCESS_ITEM_NOT = 0x00000000 int ACCESS_CREATE_ITEM = 0x00000001 int ACCESS_MODIFY_ITEMNAME = 0x00000002 int ACCESS_DELETE_ITEM = 0x00000004 int ACCESS_UN_DELETE_ITEM = 0x00000008 int ACCESS_MODIFY_ITEM_DESC = 0x00000010 int ACCESS_HAS_THE_ITEM = 0x00000020 int ACCESS_GET_ITEM_INFO = 0x00000040 int ACCESS_GET_ITEMS_UNCONDITION = 0x00000080 int ACCESS_GET_ITEMS = 0x00000100 int ACCESS_CHECKOUT_ITEM = 0x00000200 int ACCESS_CHECKIN_ITEM = 0x00000400 int ACCESS_UNDO_CHECKOUT_ITEM = 0x00000800 int ACCESS_IS_CHECKOUT_USER = 0x00001000 getozrepository public IOZRepository getozrepository() throws OZRepositoryException OZRepostiroy. createitem public String[] createitem(object sessionid, String[] itemnames, String[] descs, InputStream[] item_ins, String comment, int[] errorcode, String[] errormsg) throws OZRepositoryException ID. sessionid itemnames descs ID FORCS Co., LTD 165
OZ API Developer's Guide (for Java) item_ins comment errcodes errmsgs modifyitemname public String modifyitemname(object sessionid, String itemid, String new_itemname, String comment) throws OZRepositoryException ID ID. sessionid ID itemid ID new_itemname comment deleteitem public boolean[] deleteitem(object sessionid, String[] itemids, boolean[] isdestroys, String comment, int[] errorcode, String[] errormsg) throws. sessionid ID itemids isdestroys comment errcodes errmsgs ID undeleteitem public boolean[] undeleteitem(object sessionid, String[] itemids, String comment, int[] errorcode, String[] errormsg) throws OZRepositoryException. : "isdestroys=false". sessionid ID 166 FORCS Co., LTD
itemids comment errcodes errmsgs ID modifyitemdesc public boolean modifyitemdesc(object sessionid, String itemid, String desc) throws OZRepositoryException ID. sessionid ID itemid desc ID getiteminfo public IOZItemInfo getiteminfo(object sessionid, String itemid) throws OZRepositoryException ID. sessionid itemid ID ID hastheitem public boolean hastheitem(object sessionid, String itemid) throws OZRepositoryException. sessionid itemid ID ID getitems public InputStream[] getitems(object sessionid, String itemids[], int[] errorcode, String[] errormsg) throws OZRepositoryException public InputStream[] getitems(object sessionid, String itemids[], long[] modifiedtimes, int[] errorcode, String[] errormsg) throws OZRepositoryException FORCS Co., LTD 167
OZ API Developer's Guide (for Java). sessionid itemids modifiedtimes errcodes errmsgs ID ID checkoutitem public InputStream[] checkoutitem(object sessionid, String itemids[], String[] localcheckoutfolders, long[] localfiletimes, int[] errorcode, String[] errormsg) throws OZRepositoryException ID. sessionid ID itemids localcheckout Folders localfiletimes errcodes errmsgs ID checkinitem public boolean[] checkinitem(object sessionid, String[] itemids, InputStream[] item_ins, String comment, boolean[] keepcheckout, int[] errorcode, String[] errormsg) throws OZRepositoryException ID. sessionid ID itemids item Streams comment keepcheckout errcodes errmsgs ID 168 FORCS Co., LTD
undocheckoutitem public InputStream[] undocheckoutitem(object sessionid, String[] itemids, boolean[] isreplaces, int[] errorcode, String[] errormsg) throws OZRepositoryException. sessionid itemids isreplaces errcodes errmsgs ID ID ischeckoutuser public boolean[] ischeckoutuser(object sessionid, String[] itemids) throws OZRepositoryException sessionid ID itemids ID // IOZRepositoryItemHistory getaccesstypeitemhistory public int getaccesstypeitemhistory(). int ACCESS_ITEM_HISTORY_NOT = 0x00000000 int ACCESS_ROLLBACK_ITEM = 0x00000001 int ACCESS_GET_ITEM_BY_VERSION = 0x00000002 int ACCESS_GET_HISTORY_ITEMLIST = 0x00000004 int ACCESS_GET_DELETE_HISTORY_ITEMLIST = 0x00000008 int ACCESS_REMOVE_HISTORY_ITEM = 0x00000010 getozrepository public IOZRepository getozrepository() throws OZRepositoryException OZRepostiroy. rollbackitem FORCS Co., LTD 169
OZ API Developer's Guide (for Java) public boolean rollbackitem(object sessionid, String itemid, int itemversion, String comment) throws OZRepositoryException. sessionid itemid itemversion comment ID ID getitembyversion public InputStream getitembyversion(object sessionid, String itemid, int version) throws OZRepositoryException ID. sessionid ID itemid version ID gethistoryitemlist public IOZHistoryInfoList gethistoryitemlist(object sessionid, String itemid) throws OZRepositoryException. sessionid ID itemids ID getdeletehistoryiteminfo public IOZHistoryInfoList getdeletehistoryiteminfo(object sessionid, String itemid) throws OZRepositoryException. : "isdestroys=false". sessionid ID itemids ID removehistoryitem 170 FORCS Co., LTD
public boolean removehistoryitem(object sessionid, String itemid, int itemversion) throws OZRepositoryException. sessionid itemid item version ID ID // IOZRepositoryGroup getaccesstypegroup public int getaccesstypegroup(). int ACCESS_GROUP_NOT = 0x00000000 int ACCESS_CREATE_GROUP = 0x00000001 int ACCESS_MODIFY_GROUP_NAME = 0x00000002 int ACCESS_MODIFY_GROUP_DESC = 0x00000004 int ACCESS_DELETE_GROUP = 0x00000008 int ACCESS_CREATE_UESR_IN_GROUP = 0x00000010 ACCESS_TRANSFER_USER = 0x00000020 int ACCESS_GET_USERINFOLIST_IN_GROUP = 0x00000040 int ACCESS_GET_GROUPINFO = 0x00000080 int ACCESS_GET_SUB_GROUPINFO_LIST = 0x00000100 int ACCESS_GET_PARENT_GROUPINFO = 0x00000200 int ACCESS_GET_GROUPID_OF_USER = 0x00000400 int ACCESS_ADD_GROUP_ADMIN = 0x00000800 int ACCESS_REMOVE_GROUP_ADMIN = 0x00001000 int ACCESS_IS_USER_GROUP_ADMIN = 0x00002000 int ACCESS_GET_USER_ADMINLIST_IN_GROUP = 0x00004000 int ACCESS_TRANSFER_GROUP = 0x00008000 getozrepository public IOZRepository getozrepository() throws OZRepositoryException OZRepostiroy. creategroup public String creategroup(object sessionid, String gname, String pgroupid, String desc) throws OZRepositoryException ID. FORCS Co., LTD 171
OZ API Developer's Guide (for Java) sessionid gname pgroupid desc ID ID modifygroupname public String modifygroupname(object sessionid, String groupid, String gname) throws OZRepositoryException ID ID. sessionid groupid gname ID ID modifygroupdesc public boolean modifygroupdesc(object sessionid, String groupid, String desc) throws OZRepositoryException ID. sessionid ID groupid desc ID deletegroup public boolean deletegroup(object sessionid, String groupid) throws OZRepositoryException ID. sessionid groupid ID ID createuseringroup public String createuseringroup(object sessionid, String username, String password, String groupid, String desc) throws OZRepositoryException ID ID. 172 FORCS Co., LTD
sessionid username password groupid desc ID ID getuserinfolistingroup public IOZUserInfoList getuserinfolistingroup(object sessionid, String groupid) throws OZRepositoryException ID. sessionid groupid ID ID getgroupinfo public IOZGroupInfo getgroupinfo(object sessionid, String groupid) throws OZRepositoryException ID. sessionid groupid ID ID getsubgroupinfolist public IOZGroupInfoList getsubgroupinfolist(object sessionid, String groupid) throws OZRepositoryException. sessionid groupid ID ID getparentgroupinfo public IOZGroupInfo getparentgroupinfo(object sessionid, String groupid) throws OZRepositoryException. sessionid ID groupid ID FORCS Co., LTD 173
OZ API Developer's Guide (for Java) getgroupidofuser public IOZGroupInfo getgroupidofuser(object sessionid, String userid) throws OZRepositoryException. sessionid ID userid ID addgroupadmin public boolean addgroupadmin(object sessionid, String userid, String groupid) throws OZRepositoryException. sessionid userid groupid ID ID ID removegroupadmin public boolean removegroupadmin(object sessionid, String userid, String groupid) throws OZRepositoryException. sessionid userid groupid ID ID ID isusergroupadmin public boolean isusergroupadmin(object sessionid, String userid, String groupid) throws OZRepositoryException ID. sessionid ID userid groupid ID ID getuseradminlistingroup 174 FORCS Co., LTD
public IOZUserInfoList getuseradminlistingroup(object sessionid, String groupid) throws OZRepositoryException. sessionid groupid ID ID transferuser public boolean transferuser(object sessionid, String userid, String target_groupid) throws OZRepositoryException. sessionid userid ID ID target_groupid ID transfergroup public boolean transfergroup(object sessionid, String groupid, String target_groupid) throws OZRepositoryException. sessionid userid ID ID target_groupid ID // IOZRepositoryUser getaccesstypeuser public int getaccesstypeuser(). int ACCESS_USER_NOT = 0x00000000 int ACCESS_CREATE_USER = 0x00000001 int ACCESS_MODIFY_USER_NAME = 0x00000002 int ACCESS_MODIFY_USER_PASSWORD = 0x00000004 int ACCESS_MODIFY_USER_DESC = 0x00000008 int ACCESS_DELETE_USER = 0x00000010 int ACCESS_GET_USERINFO = 0x00000020 int ACCESS_CHECK_USER_PASSWORD = 0x00000040 int ACCESS_GET_USERINFO_LIST = 0x00000080 int ACCESS_GET_IS_CHECK_ADMIN = 0x00000100 FORCS Co., LTD 175
OZ API Developer's Guide (for Java) getozrepository public IOZRepository getozrepository() throws OZRepositoryException OZRepostiroy. createuser public String createuser(object sessionid, String username, String password, String desc) throws OZRepositoryException ID. sessionid username password desc ID modifyusername public String modifyusername(object sessionid, String userid, String username) throws OZRepositoryException ID ID. sessionid ID userid username ID modifyuserpassword public boolean modifyuserpassword(object sessionid, String userid, String old_password, String new_password) throws OZRepositoryException. sessionid userid old_password new_password ID ID modifyuserdesc 176 FORCS Co., LTD
public boolean modifyuserdesc(object sessionid, String userid, String desc) throws OZRepositoryException ID. sessionid ID userid desc ID deleteuser public boolean deleteuser(object sessionid, String userid) throws OZRepositoryException ID. sessionid ID userid ID getuserinfo public IOZUserInfo getuserinfo(object sessionid, String userid) throws OZRepositoryException ID. sessionid userid ID ID checkuserpassword public boolean checkuserpassword(object sessionid, String userid, String password) throws OZRepositoryException. sessionid userid password ID ID getuserinfolist public IOZUserInfoList getuserinfolist(object sessionid) throws OZRepositoryException. FORCS Co., LTD 177
OZ API Developer's Guide (for Java) sessionid ID ischeckadmin public boolean ischeckadmin(object sessionid, String userid) throws OZRepositoryException ID. sessionid ID userid ID // IOZRepositoryMultiLoginUser getaccesstypemultiloginuser public int getaccesstypemultiloginuser(). int ACCESS_MULTILOGINUSER_NOT = 0x00000000 int ACCESS_DISABLE_USER_LOGIN = 0x00000001 int ACCESS_ENABLE_USER_LOGIN = 0x00000002 int ACCESS_IS_LOGIN_ENABLED = 0x00000004 getozrepository public IOZRepository getozrepository() throws OZRepositoryException OZRepostiroy. disableuserlogin public void disableuserlogin(object sessionid) throws OZRepositoryException ID. sessionid ID enableuserlogin public void enableuserlogin(object sessionid) throws OZRepositoryException ID. sessionid ID 178 FORCS Co., LTD
isloginenabled public boolean isloginenabled(object sessionid) throws OZRepositoryException ID. sessionid ID // IOZRepositoryAuthGroupCategory getaccesstypeauthgroupcategory public int getaccesstypeauthgroupcategory(). int ACCESS_TYPE_AUTH_GROUP_CATEGORY_NOT = 0x00000000 int ACCESS_TYPE_MODIFY_CATEGORY_GROUPAUTH = 0x00000001 int ACCESS_TYPE_GET_GROUPAUTH_TO_CATEGORY = 0x00000002 int ACCESS_TYPE_GET_GROUPLIST_AUTH_TO_CATEGORY = 0x00000004 int ACCESS_TYPE_GET_ITEMLIST_AUTH_TO_GROUP_IN_CATEGORY = 0x00000008 int ACCESS_TYPE_GET_CATEGORYLIST_AUTH_TO_GROUP_IN_CATEGORY = 0x00010000 getozrepository public IOZRepository getozrepository() throws OZRepositoryException OZRepostiroy. modifycategorygroupauth public boolean modifycategorygroupauth(object sessionid, String categoryid, String groupid, int perm) throws OZRepositoryException. sessionid ID categoryid groupid ID ID FORCS Co., LTD 179
OZ API Developer's Guide (for Java) perm 1 : VIEW 2 : READ 4 : WRITE : OR. getgroupauthtocategory public int getgroupauthtocategory(object sessionid, String categoryid, String groupid) throws OZRepositoryException. sessionid categoryid groupid ID ID ID getgrouplistauthtocategory public IOZGroupInfoList getgrouplistauthtocategory(object sessionid, String categoryid, int perm) throws OZRepositoryException ID perm. sessionid ID categoryid perm ID getitemlistauthtogroupincategory public IOZItemInfoList getitemlistauthtogroupincategory(object sessionid, String groupid, String categoryid, int perm) throws OZRepositoryException perm. sessionid ID groupid categoryid perm ID ID 180 FORCS Co., LTD
getcategorylistauthtogroupincategory public IOZCategoryInfoList getcategorylistauthtogroupincategory(object sessionid, String groupid, String categoryid, int perm) throws OZRepositoryException perm. sessionid ID groupid categoryid perm ID ID // IOZRepositoryAuthGroupItem getaccesstypeauthgroupitem public int getaccesstypeauthgroupitem(). int ACCESS_TYPE_AUTH_GROUP_ITEM_NOT = 0x00000000 int ACCESS_TYPE_MODIFY_ITEM_GROUPAUTH = 0x00000010 int ACCESS_TYPE_GET_GROUPAUTH_TO_ITEM = 0x00000020 int ACCESS_TYPE_GET_GROUPLIST_AUTH_TO_ITEM = 0x00000040 int ACCESS_TYPE_GET_ITEMLIST_AUTH_TO_GROUP = 0x00000080 getozrepository public IOZRepository getozrepository() throws OZRepositoryException OZRepostiroy. modifyitemgroupauth public boolean modifyitemgroupauth(object sessionid, String groupid, String itemid, int perm) throws OZRepositoryException ID ID. sessionid ID groupid itemid ID ID FORCS Co., LTD 181
OZ API Developer's Guide (for Java) perm getgroupauthtoitem public int getgroupauthtoitem(object sessionid, String groupid, String itemid) throws OZRepositoryException ID ID. sessionid groupid itemid ID ID ID getgrouplistauthtoitem public IOZGroupInfoList getgrouplistauthtoitem(object sessionid, String itemid, int perm) throws OZRepositoryException ID perm. sessionid ID itemid perm ID getitemlistauthtogroup public IOZItemInfoList getitemlistauthtogroup(object sessionid, String groupid, int perm) throws OZRepositoryException ID perm. sessionid ID groupid perm ID // IOZRepositoryAuthUserCategory getaccesstypeauthusercategory public int getaccesstypeauthusercategory() 182 FORCS Co., LTD
. int ACCESS_TYPE_AUTH_USER_CATEGORY_NOT = 0x00000000 int ACCESS_TYPE_MODIFY_CATEGORY_USERAUTH = 0x00000100 int ACCESS_TYPE_GET_USERAUTH_TO_CATEGORY = 0x00000200 int ACCESS_TYPE_GET_USERLIST_AUTH_TO_CATEGORY = 0x00000400 int ACCESS_TYPE_GET_ITEMLIST_AUTH_TO_USER_IN_CATEGORY= 0x00000800 int ACCESS_TYPE_GET_CATEGORYLIST_AUTH_TO_USER_IN_CATEGORY = 0x00020000 getozrepository public IOZRepository getozrepository() throws OZRepositoryException OZRepostiroy. modifycategoryuserauth public boolean modifycategoryuserauth(object sessionid, String userid, String categoryid, int perm) throws OZRepositoryException ID ID. sessionid ID userid categoryid perm ID ID getuserauthtocategory public int getuserauthtocategory(object sessionid, String userid, String categoryid) throws OZRepositoryException ID ID. sessionid userid categoryid ID ID ID getuserlistauthtocategory public IOZUserInfoList getuserlistauthtocategory(object sessionid, String categoryid, int perm) throws OZRepositoryException FORCS Co., LTD 183
OZ API Developer's Guide (for Java) ID perm. sessionid ID categoryid perm ID getitemlistauthtouserincategory public IOZItemInfoList getitemlistauthtouserincategory(object sessionid, String userid, String categoryid, int perm) throws OZRepositoryException perm. sessionid ID userid categoryid perm ID ID getcategorylistauthtouserincategory public IOZCategoryInfoList getcategorylistauthtouserincategory(object sessionid, String userid, String categoryid, int perm) throws OZRepositoryException perm. sessionid ID userid categoryid perm ID ID // IOZRepositoryAuthUserItem getaccesstypeauthuseritem public int getaccesstypeauthuseritem() 184 FORCS Co., LTD
. int ACCESS_TYPE_AUTH_USER_ITEM_NOT = 0x00000000 int ACCESS_TYPE_MODIFY_ITEM_USERAUTH = 0x00001000 int ACCESS_TYPE_GET_USERAUTH_TO_ITEM = 0x00002000 int ACCESS_TYPE_GET_USERLIST_AUTH_TO_ITEM = 0x00004000 int ACCESS_TYPE_GET_ITEMLIST_AUTH_TO_USER = 0x00008000 getozrepository public IOZRepository getozrepository() throws OZRepositoryException OZRepostiroy. modifyitemuserauth public boolean modifyitemuserauth(object sessionid, String userid, String itemid, int perm) throws OZRepositoryException. sessionid ID userid itemid perm ID ID getuserauthtoitem public int getuserauthtoitem(object sessionid, String userid, String itemid) throws OZRepositoryException. sessionid userid itemid ID ID getuserlistauthtoitem public IOZUserInfoList getuserlistauthtoitem(object sessionid, String itemid, int perm) throws OZRepositoryException FORCS Co., LTD 185
OZ API Developer's Guide (for Java) perm. sessionid ID iitemid perm ID getitemlistauthtouser public IOZItemInfoList getitemlistauthtouser(object sessionid, String userid, int perm) throws OZRepositoryException perm. sessionid userid perm ID ID //IOZCategoryInfo getcategoryid public String getcategoryid() ID. getcategoryname public String getcategoryname(). getparentcategoryid public String getparentcategoryid() ID. getparentcategoryname public String getparentcategoryname(). getcomment public String getcomment() 186 FORCS Co., LTD
. getdesc public String getdesc(). getupdatetime public long getupdatetime(). getcreateuserid public String getcreateuserid() ID. getcreateusername public String getcreateusername(). getperm public int getperm(). // IOZItemInfo ischeckout public boolean ischeckout(). isdeletable public boolean isdeletable(). : "isdestroys=false". getitemid FORCS Co., LTD 187
OZ API Developer's Guide (for Java) public String getitemid() ID. getitemname public String getitemname(). getcategoryid public String getcategoryid() ID. getcategoryname public String getcategoryname(). getupdatetime public long getupdatetime(). getdesc public String getdesc(). getcomment public String getcomment(). getcreateuserid public String getcreateuserid() ID. getcreateusername public String getcreateusername() 188 FORCS Co., LTD
. getcheckoutuser public String getcheckoutuser(). getcheckoutlocalpath public String getcheckoutlocalpath(). getperm public int getperm(). // IOZHistoryInfo getitemid public String getitemid() ID. getitemname public String getitemname(). gethistoryitemversion public int gethistoryitemversion(). gethistorycheckintime public long gethistorycheckintime(). gethistorycheckinuser public String gethistorycheckinuser() FORCS Co., LTD 189
OZ API Developer's Guide (for Java) ID. gethistorycheckincomment public String gethistorycheckincomment(). // IOZGroupInfo isgroupadmin public boolean isgroupadmin(string userid) ID. userid ID getgroupadminlist public HashMap getgroupadminlist(). : "key=id, value= " HashMap. getgroupid public String getgroupid() ID. getgroupname public String getgroupname(). getparentgroupid public String getparentgroupid() ID. getparentgroupname public String getparentgroupname(). 190 FORCS Co., LTD
getdesc public String getdesc(). getupdatetime public long getupdatetime(). // IOZUserInfo getuserid public String getuserid() ID. getpassword public String getpassword(). getusername public String getusername(). getgroupid public String getgroupid() ID. getgroupname public String getgroupname(). getdesc public String getdesc(). FORCS Co., LTD 191
OZ API Developer's Guide (for Java) getupdateusertime public long getupdateusertime(). isloggedin public boolean isloggedin(). getsessionid public String getsessionid() ID. isloginenabled public boolean isloginenabled(). getloginip public String getloginip() PC IP. getlastlogintime public long getlastlogintime(). getperm public int getperm(). //IOZLoginInfo getviewertype public int getviewertype(). 192 FORCS Co., LTD
getmacaddress public String getmacaddress() MAC Address. getipaddress public String getipaddress() IP Address. gethddserialno public String gethddserialno() HDD Serial. getuserid public String getuserid() ID. getusername public String getusername(). getsessionid public String getsessionid() ID. getclientip public String getclientip() IP. // IOZCategoryInfoList getcategoryinfo public IOZCategoryInfo getcategoryinfo(int index). index FORCS Co., LTD 193
OZ API Developer's Guide (for Java) getsize public String getsize(). getcategoryinfos public IOZCategoryInfo[] getcategoryinfos(). // IOZCategoryInfoList getiteminfo public IOZItemInfo getiteminfo(int index). index getsize public String getsize(). getiteminfos public IOZItemInfo[] getiteminfos(). // IOZHistoryInfoList gethistoryinfo public IOZHistoryInfo gethistoryinfo(int index). index getsize public String getsize(). gethistoryinfos 194 FORCS Co., LTD
public IOZHistoryInfo[] gethistoryinfos(). // IOZGroupInfoList getgroupinfo public IOZGroupInfo getgroupinfo(int index). index getsize public String getsize(). getgroupinfos public IOZGroupInfo[] getgroupinfos(). // IOZUserInfoList getgroupinfo public IOZUserInfoList getuserinfo(int index). index getsize public String getsize(). getgroupinfos public IOZUserInfo[] getuserinfos(). FORCS Co., LTD 195
OZ API Developer's Guide (for Java) Class OZRepositoryException // : oz.framework.repositoryex public class OZRepositoryException extends Exception Method Summary - public OZRepositoryException(String _msg) - public OZRepositoryException(int code, String _msg) - public OZErrorCode ErrorCode{get; - public String Message{get; Method Detail - OZRepositoryException public OZRepositoryException(String _msg) public OZRepositoryException(int code,string _msg) OZRepositoryException code _msg - ErrorCode public OZErrorCode ErrorCode{get; - Message public String Message{get; 196 FORCS Co., LTD
oz.framework.api.repositoryex Constructor. Constructor Summary public RepositoryEx(String ip, int port, String id, String pw) throws OZCPException public RepositoryEx(String ip, int port, String id, String pw, boolean useusl) throws OZCPException public RepositoryEx(String iurl, String id, String pw) throws OZCPException public RepositoryEx(String iurl, String id, String pw, boolean useusl) throws OZCPException Method Summary public void setrepositoryconfig(sortproperties prop) throws OZCPException public SortProperties getrepositoryconfig()throws OZCPException public void reloadrepository() throws OZCPException public String[] createitem(string[] itemnames, String[] idescs, String[] categoryids, boolean[] iscomp, InputStream[] itemstreams, String comment, int[] errorcodes, String[] errormsg) throws OZCPException public String modifyitemname(string itemid, String itemname, String comment) throws OZCPException public boolean[] deleteitem(string[] itemids, boolean[] isdestorys, String comment, int[] errorcodes, String[] errormsg) throws OZCPException public boolean[] undeleteitem(string[] itemids, String comment, int[] errorcodes, String[] errormsg) throws OZCPException public boolean modifyitemdesc(string itemid, String idesc) throws OZCPException FORCS Co., LTD 197
OZ API Developer's Guide (for Java) public IOZItemInfo getiteminfo(string itemid) throws OZCPException public boolean hastheitem(string itemid) throws OZCPException public InputStream[] getitemsuncondition(string[] itemids, boolean[] iscomp, boolean[] isobjstream, String[] categoryids, int[] errorcodes, String[] errormsg) throws OZCPException public InputStream[] getitems(string[] itemids, long[] modifiedtimes, boolean[] iscomp, boolean[] isobjstream, String[] categoryids, int[] errorcodes, String[] errormsg) throws OZCPException public InputStream[] checkoutitem(string itemids[], String[] localcheckoutfolders, long[] localfiletimes, boolean[] iscomp, int[] errorcodes, String[] errormsg) throws OZCPException public boolean[] checkinitem(string[] itemids, boolean[] iscomp, InputStream[] istreams, String comment, boolean[] keepcheckout, int[] errorcodes, String[] errormsg) throws OZCPException public InputStream[] undocheckoutitem(string[] itemids, boolean[] isreplaces, boolean[] iscomp, int[] errorcodes, String[] errormsg) throws OZCPException public boolean[] ischeckoutuser(string[] itemids) throws OZCPException public boolean rollbackitem(string itemid, int itemversion, String comment) throws OZCPException public InputStream getitembyversion(string itemid, int version, boolean iscomp) throws OZCPException public IOZHistoryInfoList gethistoryitemlist(string itemid) throws OZCPException public IOZHistoryInfoList getdeletehistoryiteminfo(string itemid) throws OZCPException public boolean removehistoryitem(string itemid, int itemversion) throws OZCPException public String[] createcategory(string[] categorynames, String[] pcategoryids, String comment, int[] errorcodes, String[] errormsg) throws OZCPException public String modifycategoryname(string categoryid, String new_categoryname, String comment) throws OZCPException public boolean[] deletecategory(string[] categoryids, boolean[] isdestroys, String comment, int[] errorcodes, String[] errormsg) throws 198 FORCS Co., LTD
OZCPException public boolean[] undeletecategory(string[] categoryids, String comment, int[] errorcodes, String[] errormsg) throws OZCPException public int getitemcountincategory(string categoryid) throws OZCPException public IOZItemInfoList getitemlistincategory(string categoryid) throws OZCPException public IOZCategoryInfoList getcategorylistincategory(string categoryid) throws OZCPException public String getcategoryidofitem(string itemid) throws OZCPException public IOZCategoryInfo getcategoryinfo(string categoryid) throws OZCPException public IOZItemInfoList getdeleteditemlistincategory(string categoryid) throws OZCPException public boolean transfercategory(string categoryid, String target_categoryid) throws OZCPException public boolean transferitem(string[] itemids, String target_categoryid) throws OZCPException public String createuser(string username, String password, String desc) throws OZCPException public String modifyusername(string userid, String username) throws OZCPException public boolean modifyuserpassword(string userid, String old_password, String new_password) throws OZCPException public boolean modifyuserdesc(string userid, String desc) throws OZCPException public boolean deleteuser(string userid) throws OZCPException public IOZUserInfo getuserinfo(string userid) throws OZCPException public boolean checkuserpassword(string userid, String password) throws OZCPException public IOZUserInfoList getuserinfolist() throws OZCPException public boolean ischeckadmin(string userid) throws OZCPException public void disableuserlogin(string userid) throws OZCPException public void enableuserlogin(string userid) throws OZCPException public boolean isloginenabled(string userid) throws OZCPException FORCS Co., LTD 199
OZ API Developer's Guide (for Java) public String creategroup(string gname, String pgroupid, String desc) throws OZCPException public String modifygroupname(string groupid, String gname) throws OZCPException public boolean modifygroupdesc(string groupid, String desc) throws OZCPException public boolean deletegroup(string groupid) throws OZCPException public String createuseringroup(string username, String password, String groupid, String desc) throws OZCPException public boolean transfergroup(string groupid, String target_groupid) throws OZCPException public boolean transferuser(string userid, String target_groupid) throws OZCPException public IOZUserInfoList getuserinfolistingroup(string groupid) throws OZCPException public IOZGroupInfo getgroupinfo(string groupid) throws OZCPException public IOZGroupInfoList getsubgroupinfolist(string groupid) throws OZCPException public IOZGroupInfo getparentgroupinfo(string groupid) throws OZCPException public String getgroupidofuser(string userid) throws OZCPException public boolean addgroupadmin(string userid, String groupid) throws OZCPException public boolean removegroupadmin(string userid, String groupid) throws OZCPException public boolean isusergroupadmin(string userid, String groupid) throws OZCPException public IOZUserInfoList getuseradminlistingroup(string groupid) throws OZCPException public InputStream distributerepository(string categoryid, boolean isrecursive) throws OZCPException public boolean uploadzipitem(string categoryid, InputStream stream) throws OZCPException public boolean modifycategorygroupauth(string categoryid, String groupid, int perm) throws OZCPException 200 FORCS Co., LTD
public int getgroupauthtocategory(string categoryid, String groupid) throws OZCPException public IOZGroupInfoList getgrouplistauthtocategory(string categoryid, int perm) throws OZCPException public IOZItemInfoList getitemlistauthtogroupincategory(string groupid, String categoryid, int perm) throws OZCPException public IOZCategoryInfoList getcategorylistauthtogroupincategory(string groupid, String categoryid, int perm) throws OZCPException public boolean modifyitemgroupauth(string groupid, String itemid, int perm) throws OZCPException public int getgroupauthtoitem(string groupid, String itemid) throws OZCPException public IOZGroupInfoList getgrouplistauthtoitem(string itemid, int perm) throws OZCPException public IOZItemInfoList getitemlistauthtogroup(string groupid, int perm) throws OZCPException public boolean modifycategoryuserauth(string userid, String categoryid, int perm) throws OZCPException public int getuserauthtocategory(string userid, String categoryid) throws OZCPException public IOZUserInfoList getuserlistauthtocategory(string categoryid, int perm) throws OZCPException public IOZItemInfoList getitemlistauthtouserincategory(string userid, String categoryid, int perm) throws OZCPException public IOZCategoryInfoList getcategorylistauthtouserincategory(string userid, String categoryid, int perm) throws OZCPException public boolean modifyitemuserauth(string userid, String itemid, int perm) throws OZCPException public int getuserauthtoitem(string userid, String itemid) throws OZCPException public IOZUserInfoList getuserlistauthtoitem(string itemid, int perm) throws OZCPException public IOZItemInfoList getitemlistauthtouser(string userid, int perm) throws OZCPException FORCS Co., LTD 201
OZ API Developer's Guide (for Java) Constructor Detail RepositoryEx //Daemon - TCP Server public RepositoryEx(String ip, int port, String id, String pw) throws OZCPException // Daemon - TCP Server ( ) public RepositoryEx(String ip, int port, String id, String pw, boolean useusl) throws OZCPException //Servlet - HTTP Server public RepositoryEx(String iurl, String id, String pw) throws OZCPException //Servlet - HTTP Server ( ) public RepositoryEx(String iurl, String id, String pw, boolean useusl) throws OZCPException Servlet URL ip ex) String url = "http://127.0.0.1/oz/server"; Daemon IP port ex) String ip = "127.0.0.1"; Daemon id ex) int port = 8003; pw ex) String id = "admin"; USL useusl ex) boolean useusl = false; Method Detail setrepositoryconfig public void setrepositoryconfig(sortproperties prop) throws OZCPException. SortProperties getrepositoryconfig 202 FORCS Co., LTD
public SortProperties getrepositoryconfig() throws OZCPException. reloadrepository public void reloadrepository() throws OZCPException. createitem public String[] createitem(string[] itemnames, String[] idescs, String[] categoryids, boolean[] iscomp, InputStream[] itemstreams, String comment, int[] errorcodes, String[] errormsg) throws OZCPException ID. itemnames descs categoryids iscomp item_ins comment errcodes errmsgs modifyitemname public String modifyitemname(string itemid, String itemname, String comment) throws OZCPException ID. itemid new_itemname comment ID deleteitem public boolean[] deleteitem(string[] itemids, boolean[] isdestorys, String comment, int[] errorcodes, String[] errormsg) throws OZCPException FORCS Co., LTD 203
OZ API Developer's Guide (for Java). itemids ID isdestroys comment errcodes errmsgs undeleteitem public boolean[] undeleteitem(string[] itemids, String comment, int[] errorcodes, String[] errormsg) throws OZCPException. : "isdestroys=false". itemids ID comment errcodes errmsgs modifyitemdesc public boolean modifyitemdesc(string itemid, String idesc) throws OZCPException ID. itemid ID desc getiteminfo public IOZItemInfo getiteminfo(string itemid) throws OZCPException ID. itemid ID hastheitem public boolean hastheitem(string itemid) throws 204 FORCS Co., LTD
OZCPException. itemid getitemsuncondition public InputStream[] getitemsuncondition(string[] itemids, boolean[] iscomp, boolean[] isobjstream, String[] categoryids, int[] errorcodes, String[] errormsg) throws OZCPException ID. itemids iscomp isobjstream errcodes errmsgs ID ODI getitems public InputStream[] getitems(string[] itemids, long[] modifiedtimes, boolean[] iscomp, boolean[] isobjstream, String[] categoryids, int[] errorcodes, String[] errormsg) throws OZCPException ID. itemids modifiedtimes iscomp isobjstream errcodes errmsgs ID ODI checkoutitem public InputStream[] checkoutitem(string itemids[], String[] localcheckoutfolders, long[] localfiletimes, boolean[] iscomp, int[] errorcodes, String[] errormsg) throws OZCPException. itemids ID FORCS Co., LTD 205
OZ API Developer's Guide (for Java) localcheckout Folders localfiletimes iscomp errcodes errmsgs checkinitem public boolean[] checkinitem(string[] itemids, boolean[] iscomp, InputStream[] istreams, String comment, boolean[] keepcheckout, int[] errorcodes, String[] errormsg) throws OZCPException. itemids iscomp item Streams comment keepcheckout errcodes errmsgs ID undocheckoutitem public InputStream[] undocheckoutitem(string[] itemids, boolean[] isreplaces, boolean[] iscomp, int[] errorcodes, String[] errormsg) throws OZCPException. itemids isreplaces errcodes errmsgs ID ischeckoutuser public boolean[] ischeckoutuser(string[] itemids) throws OZCPException. itemids ID 206 FORCS Co., LTD
rollbackitem public boolean rollbackitem(string itemid, int itemversion, String comment) throws OZCPException. itemid itemversion comment ID getitembyversion public InputStream getitembyversion(string itemid, int version, boolean iscomp) throws OZCPException ID. itemid version iscomp ID gethistoryitemlist public IOZHistoryInfoList gethistoryitemlist(string itemid) throws OZCPException. itemid ID getdeletehistoryiteminfo public IOZHistoryInfoList getdeletehistoryiteminfo(string itemid) throws OZCPException. : "isdestroys=false". itemid ID removehistoryitem public boolean removehistoryitem(string itemid, int itemversion) throws OZCPException. itemid ID FORCS Co., LTD 207
OZ API Developer's Guide (for Java) itemversion createcategory public String[] createcategory(string[] categorynames, String[] pcategoryids, String comment, int[] errorcodes, String[] errormsg) throws OZCPException ID. categoryname pcategoryids ID comment errorcode errormsg modifycategoryname public String modifycategoryname(string categoryid, String new_categoryname, String comment) throws OZCPException ID. categoryid ID new_categoryname comment deletecategory public boolean[] deletecategory(string[] categoryids, boolean[] isdestroys, String comment, int[] errorcodes, String[] errormsg) throws OZCPException ID. categoryids isdestroys comment errorcode errormsg ID undeletecategory public boolean[] undeletecategory(string[] categoryids, String comment, int[] errorcodes, String[] errormsg) throws OZCPException 208 FORCS Co., LTD
. : "isdestroys=false". categoryids ID comment errorcode errormsg getitemcountincategory public int getitemcountincategory(string categoryid) throws OZCPException. categoryid ID getitemlistincategory public IOZItemInfoList getitemlistincategory(string categoryid) throws OZCPException. categoryid ID getcategorylistincategory public IOZCategoryInfoList getcategorylistincategory(string categoryid) throws OZCPException. categoryid ID getcategoryidofitem public String getcategoryidofitem(string itemid) throws OZCPException ID. itemid ID ID getcategoryinfo FORCS Co., LTD 209
OZ API Developer's Guide (for Java) public IOZCategoryInfo getcategoryinfo(string categoryid) throws OZCPException. categoryid ID getdeleteditemlistincategory public IOZItemInfoList getdeleteditemlistincategory(string categoryid) throws OZCPException. : "isdestroys=false". categoryid ID transfercategory public boolean transfercategory(string categoryid, String target_categoryid) throws OZCPException. categoryid ID target_categoryid ID transferitem public boolean transferitem(string[] itemids, String target_categoryid) throws OZCPException. itemids ID target_categoryid ID createuser public String createuser(string username, String password, String desc) throws OZCPException ID. username password desc 210 FORCS Co., LTD
modifyusername public String modifyusername(string userid, String username) throws OZCPException ID. userid ID username modifyuserpassword public boolean modifyuserpassword(string userid, String old_password, String new_password) throws OZCPException ID. userid ID old_password new_password modifyuserdesc public boolean modifyuserdesc(string userid, String desc) throws OZCPException ID. userid ID desc deleteuser public boolean deleteuser(string userid) throws OZCPException ID. userid ID getuserinfo public IOZUserInfo getuserinfo(string userid) throws OZCPException ID. userid ID FORCS Co., LTD 211
OZ API Developer's Guide (for Java) checkuserpassword public boolean checkuserpassword(string userid, String password) throws OZCPException. userid password ID getuserinfolist public IOZUserInfoList getuserinfolist() throws OZCPException. DisableLogin public void DisableLogin(String userid) ID. userid ID EnableLogin public void EnableLogin(String userid) ID. userid ID ischeckadmin public boolean ischeckadmin(string userid) throws OZCPException ID. userid ID disableuserlogin public void disableuserlogin(string userid) throws OZCPException ID. userid ID 212 FORCS Co., LTD
enableuserlogin public void enableuserlogin(string userid) throws OZCPException ID. userid ID isloginenabled public boolean isloginenabled(string userid) throws OZCPException ID. userid ID creategroup public String creategroup(string gname, String pgroupid, String desc) throws OZCPException ID. gname pgroupid desc ID modifygroupname public String modifygroupname(string groupid, String gname) throws OZCPException ID. groupid ID gname modifygroupdesc public boolean modifygroupdesc(string groupid, String desc) throws OZCPException ID. groupid ID desc FORCS Co., LTD 213
OZ API Developer's Guide (for Java) deletegroup public boolean deletegroup(string groupid) throws OZCPException ID. groupid ID createuseringroup public String createuseringroup(string username, String password, String groupid, String desc) throws OZCPException ID. username password groupid desc ID transferuser public boolean transferuser(string userid, String target_groupid) throws OZCPException. userid target_groupid ID ID transfergroup public boolean transfergroup(string groupid, String target_groupid) throws OZCPException. groupid ID target_groupid ID getuserinfolistingroup public IOZUserInfoList getuserinfolistingroup(string groupid) throws OZCPException ID. groupid ID 214 FORCS Co., LTD
getgroupinfo public IOZGroupInfo getgroupinfo(string groupid) throws OZCPException ID. groupid ID getsubgroupinfolist public IOZGroupInfoList getsubgroupinfolist(string groupid) throws OZCPException. groupid ID getparentgroupinfo public IOZGroupInfo getparentgroupinfo(string groupid) throws OZCPException. groupid ID getgroupidofuser public String getgroupidofuser(string userid) throws OZCPException. userid ID addgroupadmin public boolean addgroupadmin(object sessionid, String userid, String groupid) throws OZRepositoryException. userid ID groupid ID removegroupadmin public boolean removegroupadmin(string userid, String groupid) throws OZCPException. FORCS Co., LTD 215
OZ API Developer's Guide (for Java) userid groupid ID ID isusergroupadmin public boolean isusergroupadmin(string userid, String groupid) throws OZCPException ID. userid ID groupid ID getuseradminlistingroup public IOZUserInfoList getuseradminlistingroup(string groupid) throws OZCPException. groupid ID distributerepository public InputStream distributerepository(string categoryid, boolean isrecursive) throws OZCPException. categoryid ID isrecursive uploadzipitem public boolean uploadzipitem(string categoryid, InputStream stream) throws OZCPException. categoryid ID Stream modifycategorygroupauth 216 FORCS Co., LTD
public boolean modifycategorygroupauth(string categoryid, String groupid, int perm) throws OZCPException. categoryid groupid perm ID ID getgroupauthtocategory public int getgroupauthtocategory(string categoryid, String groupid) throws OZCPException. categoryid ID groupid ID getgrouplistauthtocategory public IOZGroupInfoList getgrouplistauthtocategory(string categoryid, int perm) throws OZCPException ID perm. categoryid ID perm ID getitemlistauthtogroupincategory public IOZItemInfoList getitemlistauthtogroupincategory(string groupid, String categoryid, int perm) throws OZCPException ID perm. groupid categoryid perm ID ID getcategorylistauthtogroupincategory FORCS Co., LTD 217
OZ API Developer's Guide (for Java) public IOZCategoryInfoList getcategorylistauthtogroupincategory(string groupid, String categoryid, int perm) throws OZCPException ID perm. groupid categoryid perm ID ID modifyitemgroupauth public boolean modifyitemgroupauth(string groupid, String itemid, int perm) throws OZCPException ID ID. groupid itemid perm ID ID getgroupauthtoitem public int getgroupauthtoitem(string groupid, String itemid) throws OZCPException ID ID. groupid itemid ID ID getgrouplistauthtoitem public IOZGroupInfoList getgrouplistauthtoitem(string itemid, int perm) throws OZCPException ID perm. itemid ID perm getitemlistauthtogroup 218 FORCS Co., LTD
public IOZItemInfoList getitemlistauthtogroup(string groupid, int perm) throws OZCPException ID perm. groupid ID perm modifycategoryuserauth public boolean modifycategoryuserauth(string uid, String cid, int perm) throws OZCPException ID ID. userid ID categoryid perm ID getuserauthtocategory public int getuserauthtocategory(string userid, String categoryid) throws OZCPException ID ID. userid categoryid ID ID getuserlistauthtocategory public IOZUserInfoList getuserlistauthtocategory(string categoryid, int perm) throws OZCPException ID perm. categoryid ID perm getitemlistauthtouserincategory public IOZItemInfoList getitemlistauthtouserincategory(object sessionid, String userid, String categoryid, int perm) throws OZRepositoryException FORCS Co., LTD 219
OZ API Developer's Guide (for Java) perm. userid ID categoryid perm ID getcategorylistauthtouserincategory public IOZCategoryInfoList getcategorylistauthtouserincategory(string userid, String categoryid, int perm) throws OZCPException perm. userid ID categoryid perm ID modifyitemuserauth public boolean modifyitemuserauth(string userid, String itemid, int perm) throws OZCPException. userid ID itemid perm ID getuserauthtoitem public int getuserauthtoitem(string userid, String itemid) throws OZCPException. userid itemid perm ID ID getuserlistauthtoitem public IOZUserInfoList getuserlistauthtoitem(string itemid, int perm) throws OZCPException 220 FORCS Co., LTD
perm. itemid ID perm getitemlistauthtouser public IOZItemInfoList getitemlistauthtouser(string userid, int perm) throws OZCPException perm. userid ID perm FORCS Co., LTD 221
OZ API Developer's Guide (for Java) API(oz.framework.cp.client.OZFrameworkAPI) API API. CP. CP CP API. CP API. : API RepositoryEx API. Adapter IOZRepository. Adapter Category Item Group User..,.. Sample : RepositoryExSample.java package sample; import oz.framework.api.repositoryex; 222 FORCS Co., LTD
import oz.util.sortproperties; import oz.framework.repositoryex.info.*; import oz.framework.repositoryex.adapter.impl.*; import java.io.*; public class RepositoryExSample { public RepositoryExSample() { private static RepositoryEx rep = null; public static void main(string[] args) { String IP = "127.0.0.1"; // IP int PORT = 8003; // TCP String ID = "admin"; //default String PASSWORD = "admin"; //default try { rep = new RepositoryEx(IP, PORT, ID, PASSWORD, /*usl*/ false); //getconf(); //setconf(); //reloadconf(); itemtest(); catch (Exception e) { e.printstacktrace(); private static void getconf() throws Exception { //Repository configuration. System.out.println("Repository.getRepositoryConfig()"); SortProperties props = rep.getrepositoryconfig(); props.list(system.out); private static void setconf() throws Exception { //Repository Configuration SortProperties prop = new SortProperties(); prop.setproperty("repository_type", "RDB"); //RDB, FILESYSTEM, USER prop.setproperty("repository_file_path", "c:/temp_repository"); prop.setproperty("repository_item_number_per_directory", "100"); prop.setproperty("repository_history_item_valid_days", "20"); rep.setrepositoryconfig(prop); private static void reloadconf() throws Exception { rep.reloadrepository(); FORCS Co., LTD 223
OZ API Developer's Guide (for Java) private static void itemtest() throws Exception { String[] categorynames = { "182", "183", "184", "185", "186" ; String[] parentcategorynames = { "/REQ", "/REQ1", "/REQ2", "/REQ3", "/REQ4" ; int[] errcodes = new int[categorynames.length]; String[] errmsgs = new String[categoryNames.length]; //. String[] categoryids = rep.createcategory(categorynames, parentcategorynames, "comment", errcodes, errmsgs); // ID. for (int i = 0; i < categoryids.length; i++) { if (categoryids[i]!= null) { System.out.println("categoryID=" + categoryids[i]); else { System.out.println("error=[code=" + errcodes[i] + "] " + errmsgs[i]); //Item. String[] itemnames = { "car.odi", "car.ozr", "car.oza", "cap.txt" ; String[] itemdesc = { " odi ", " ozr ", " oza ", "0 byte text " ; FileInputStream[] fis = new FileInputStream[itemNames.length]; fis[0] = new FileInputStream("d:/REQ/182/car.odi"); 224 FORCS Co., LTD
fis[1] = new FileInputStream("d:/REQ/182/car.ozr"); fis[2] = new FileInputStream("d:/REQ/182/car.oza"); fis[3] = new FileInputStream("d:/cap.txt"); errcodes = new int[itemnames.length]; errmsgs = new String[itemNames.length]; String[] itemids = rep.createitem(itemnames, itemdesc, categoryids, new boolean[] {false, false, false, false, // fis, "comment", errcodes, errmsgs); //ItemID ID. for (int i = 0; i < itemids.length; i++) { if (itemids[i]!= null) { System.out.println("itemID=" + itemids[i]); else { System.out.println("error=[code=" + errcodes[i] + "] " + errmsgs[i]); errcodes = new int[itemnames.length]; errmsgs = new String[itemNames.length]; //Item. download(rep.getitems(itemids, new long[] {0, 0, 0, 0, new boolean[] {true, false, false, false, // new boolean[] {false, false, false, false, //odi categoryids, errcodes, errmsgs), new String[] {"d:/car.odi", "d:/car.ozr", "d:/car.oza", "d:/cap1.txt"); //. String newitemid = rep.modifyitemname(itemids[3], "modify" + System.currentTimeMillis() + ".txt", "comment"); System.out.println("new Item ID =" + newitemid); itemids[3] = newitemid; //ItemID. OZItemInfoImpl info = new OZItemInfoImpl(rep.getItemInfo(newItemID)); System.out.println(info.toString()); //ID ItemList. FORCS Co., LTD 225
OZ API Developer's Guide (for Java) OZItemInfoListImpl itemlist = new OZItemInfoListImpl(rep.getItemListInCategory("/REQ1/182/")); //ItemList ItemInfo. OZItemInfoImpl iteminfo = null; for (int i = 0; i < itemlist.getsize(); i++) { iteminfo = new OZItemInfoImpl(itemList.getItemInfo(i)); System.out.println(itemInfo.toString()); // System.out.println(rep.hasTheItem("/REQ1/182/car.odi")); // Item checkin(update). errcodes = new int[itemids.length]; errmsgs = new String[itemIDs.length]; fis[0] = new FileInputStream("d:/REQ/182/car.odi"); fis[1] = new FileInputStream("d:/REQ/182/car.ozr"); fis[2] = new FileInputStream("d:/REQ/182/car.oza"); fis[3] = new FileInputStream("d:/cap.txt"); boolean[] isresult = rep.checkinitem(itemids, new boolean[] {false, false, false, false, fis, "comment", new boolean[] {false, false, false, false, errcodes, errmsgs); for (int i = 0; i < isresult.length; i++) { System.out.println("check in success = " + isresult[i]); if (!isresult[i]) { System.out.println("error [" + errcodes[i] + "] =" + errmsgs[i]); //. errcodes = new int[itemids.length]; errmsgs = new String[itemIDs.length]; isresult = rep.deleteitem(itemids, new boolean[] {true, true, true, true, "comment", errcodes, errmsgs); for (int i = 0; i < isresult.length; i++) { System.out.println("delete item success = " + isresult[i]); if (!isresult[i]) { System.out.println("error [" + errcodes[i] + "] =" + errmsgs[i]); //. errcodes = new int[itemids.length]; 226 FORCS Co., LTD
errmsgs = new String[itemIDs.length]; isresult = rep.deletecategory(categoryids, new boolean[] {true, true, true, true, true, "comment", errcodes, errmsgs); for (int i = 0; i < isresult.length; i++) { System.out.println("delete category success = " + isresult[i]); if (!isresult[i]) { System.out.println("error [" + errcodes[i] + "] =" + errmsgs[i]); //. rep.transfercategory("/req1", "/REQ"); //. rep.transferitem(new String[] {"/test1.odi", "/test1.ozr", "/REQ"); //. rep.transfercategory("/req/req1", "/REQ2"); //. rep.transferitem(new String[] {"/REQ/test1.odi", "/REQ/test1.ozr", "/"); IOZCategoryInfo[] infos = rep.getcategorylistincategory("/",true).getcategoryinfos(); String[] d = new String[infos.length-1]; int index = 0; for(int i=0; i<d.length; i++) { if (!"/".equals(infos[i].getcategoryid())){ System.out.println("infos[i].getCategoryID()="+infos[i].getCategoryID()); d[index++] = infos[i].getcategoryid(); errcodes = new int[d.length]; errmsgs = new String[d.length]; boolean[] b = new boolean[d.length]; java.util.arrays.fill(b, true); isresult = rep.deletecategory(d, b, "comment", errcodes, errmsgs); for (int i = 0; i < isresult.length; i++) { System.out.println("final delete category success = " + isresult[i]); if (!isresult[i]) { System.out.println("error [" + errcodes[i] + "] =" + errmsgs[i]); FORCS Co., LTD 227
OZ API Developer's Guide (for Java) private static void download(inputstream[] in, String[] filename) throws Exception { for (int i = 0; i < in.length; i++) { if (in[i]!= null) { byte[] buf = new byte[1024]; int len; FileOutputStream fos = new FileOutputStream(fileName[i]); while ( (len = in[i].read(buf)) >= 0) { fos.write(buf, 0, len); in[i].close(); fos.flush(); fos.close(); System.out.println("ok downlod = " + filename[i]); else { System.out.println(fileName[i] + " stream is null"); 228 FORCS Co., LTD
API OZLauncherDll FORCS Co., LTD 229
OZ API Developer's Guide (for Java) OZLauncherDll. Function Summary void stdcall SetPath(LPCTSTR strpath) void stdcall SetCommand(LPCTSTR strcommand) BOOL stdcall CreateOZViewer(LPCTSTR str_param, int n_type) void stdcall Release() Function Detail SetPath void stdcall SetPath(LPCTSTR strpath). strpath SetCommand void stdcall SetCommand(LPCTSTR strcommand). strcommand Example SetCommand("/locale ko/kr /mode alone /slp true /launchstring"); CreateOZViewer BOOL stdcall CreateOZViewer(LPCTSTR str_param, int n_type). true false. 230 FORCS Co., LTD
str_param n_type. "n". 2. Example CreateOZViewer("connection.server=127.0.0.1\n connection.port=8003\n connection.reportname=/ozsample.ozr\n", 2); Release() Example void stdcall Release().. SetCommand("/String"); SetPath("./"); CreateOZViewer("connection.server=127.0.0.1\n toolbar.all=true\n information.debug=debug\n information.bmt=true\n connection.port=8003\n connection.reportname=/ozsample.ozr\n connection.compressedform=true",1); result = GetResult(); Release(); FORCS Co., LTD 231
OZ API Developer's Guide (for Java) RDB Store DataAction RDB Store DataAction RDB Store DataAction 232 FORCS Co., LTD
RDB DataAction. public interface IRDBDelegate extends IDelegate { public void init(string param) throws Exception; public void close(); public String insert(oz.framework.dac.ozdacitem dac, java.util.dictionary parameters) throws Exception; public String update(oz.framework.dac.ozdacitem dac, java.util.dictionary parameters) throws Exception; public String delete(oz.framework.dac.ozdacitem dac, java.util.dictionary parameters) throws Exception; public String commit() throws Exception; public void rollback() throws Exception; public void setconnection(java.sql.connection con); :. 1. setconnection() 2. init() 3. insert(), update(), delete() 4. commit(), rollback() 5. close() FORCS Co., LTD 233
OZ API Developer's Guide (for Java) DataAction DataAction. package com.forcs.sample.dataaction.rdb; import com.forcs.log4oz.ozlog; public class DelegateSample implements oz.udd.irdbdelegate, oz.udd.iloggerref { private OZLog cat; private java.sql.connection con; public DelegateSample() { public void init(string param) throws Exception { //. public void close() { //close. public String insert(oz.framework.dac.ozdacitem dac, java.util.dictionary parameters) throws Exception { //insert. return null; public String update(oz.framework.dac.ozdacitem dac, java.util.dictionary parameters) throws Exception { //Update. return null; public String delete(oz.framework.dac.ozdacitem dac, java.util.dictionary parameters) throws Exception { //Delete. return null; 234 FORCS Co., LTD
public String commit() throws Exception { //commit. return null; public void rollback() throws Exception { //rollback. public void setconnection(java.sql.connection con) { this.con = con; public void setlogger(ozlog cat) { this.cat = cat; FORCS Co., LTD 235
OZ API Developer's Guide (for Java) User Data Store UDS 236 FORCS Co., LTD
UDS(User Data Store) Non-DB Java Interface, CSV, XML EJB, Servlet, ASP, JSP, Applet. 1 Result Set OZ User Data Source Interface JDBC Driver ODBC Driver (, ) UDS ResultSet.. UDS SQL.. : UDS. FORCS Co., LTD 237
OZ API Developer's Guide (for Java) User Security Logic USL USL USL 238 FORCS Co., LTD
USL(User Security Logic). USL USL Server USL Client, I/O. USL Flow OZ Server Side Network I/O Module USL Server Module Req Respo USL Client Module Client Side Network I/O Module OZ Viewer FORCS Co., LTD 239
OZ API Developer's Guide (for Java) USL Web WAS Session Cookie ( ), Network I/O Stream, PKI. Session ( Session USL ) UseUserSecurityLogicVer30=true OZ Server Side Network I/O Module WAS 3. 4-1 USL Server Module 4-2 USL 2. USL USL Client Module 4-3 Exception 1. Connection Request Client Side Network I/O Module OZ Viewer <param name= "repository_agent.try_usl_check" value="true"> <param name= "repository_agent.usl_param.args1" value="param1=value1"> 240 FORCS Co., LTD
USL. - USL : OZ_HOME/lib/ozsfw50.jar - USL : OZ_HOME/conf/uslmngr.properties - ozsfw50.jar CLASSPATH. - uslmngr.properties USL,. # # use user security logic apply # UseUserSecurityLogicVer30=true # # default USL(Server&Client) class name (with package name) # OZDefault_SERVER=oz.usl.USL OZDefault_CLIENT=oz.usl.USL uslmngr.properties UseUserSecurityLogicVer30=true, USL. USL. OZDefault_SERVER=oz.usl.USL OZDefault_CLIENT=oz.usl.USL ex) OZDefault_SERVER=oz.usl.OZUSLServerSession OZDefault_CLIENT=oz.usl.OZUSLClientSession FORCS Co., LTD 241
OZ API Developer's Guide (for Java) OZ Report Viewer USL (OZR) USL "repository_agent.try_usl_check" "true". <param name="repository_agent.try_usl_check" value="true"> : "UseUserSecurityLogicVer30" "true" "repository_agent.try_usl_check" "true". USL USL "repository_agent.usl_param.pcount" USL, "repository_agent.usl_param.args#". : "UseUserSecurityLogicVer30" "true", "repository_agent.try_usl_check" "true" USL USL. HTML <html> <body> <object id="ozreportviewer" width="100%" height="100%" classid="clsid:64da633f-e73b- 4344-83BF-48483346CD53"> <param name="connection.servlet" value="http://127.0.0.1:8087/ozservlet/server"> <param name="viewer.configmode" value="html"> <param name="repository_agent.try_usl_check" value="true"> <param name="repository_agent.usl_param.pcount" value="2"> <param name="repository_agent.usl_param.args1" value="param1=value1"> <param name="repository_agent.usl_param.args2" value="param2=value2"> <param name="connection.reportname" value="sample.ozr"> </object> </body> </html> 242 FORCS Co., LTD
OZ Application Viewer USL (OZA) USL "repository_agent.try_usl_check" "true". : "UseUserSecurityLogicVer30" "true" "repository_agent.try_usl_check" "true". USL USL "repository_agent.usl_param.pcount" USL, "repository_agent.usl_param.args#". HTML <html> <body> <object id="ozapplicationviewer" width="100%" height="100%" classid="clsid:907a00f3-7390-4ef2-931b-360546587804"> <param name="repository_agent.type" value="from_ozserver"> <param name="repository_agent.ozserver.servlet" value="http://127.0.0.1:8087/ozservlet/server"> <param name="repository_agent.try_usl_check" value="true"> <param name="repository_agent.usl_param.pcount" value="2"> <param name="repository_agent.usl_param.args1" value="param1=value1"> <param name="repository_agent.usl_param.args2" value="param2=value2"> <param name="ozadoc.path" value="sample.oza"> </object> </body> </html> FORCS Co., LTD 243
OZ API Developer's Guide (for Java) USL USL USL Request Stream Response Stream.. USL oz.cp.ozuslserver createsecureoutputstream(), createsecureinputstream(). Request Stream createsecureinputstream(). Response Stream createsecureoutputstream(). InputStream ( ) InputStream. java.io.inputstream read(). USL DataInputStream read() DataInputStream. read. OutputStream ( ) OutputStream. java.io.outputstream write(), flush(). USL DataOutputStream write DataOutputStream. write() flush 244 FORCS Co., LTD
DataOutputStream. flush. USL USL Request Stream USL Response Stream.. USL OZ USL DLL USL. createsecureoutputstream(), createsecureinputstream(). Request Stream createsecureoutputstream(). Response Stream createsecureinputstream(). USL createsecureoutputstream() OutputStream writeutf() writeint(). InputStream ( ) CJDataInputStream.. USL CJDataInputStream read() CJDataInputStream. read. OutputStream ( ) CJDataOutputStream. CJDataOutputStream FORCS Co., LTD 245
OZ API Developer's Guide (for Java). USL CJDataOutputStream CJDataOutputStream. write flush CJDataOutputStream. flush. USL 1 - USL WAS Valid. OZUSLServerSession.jar, OZUSLClientSession.dll. USL OZ_HOME/conf/uslmngr.properties. # # use user security logic apply # UseUserSecurityLogicVer30=true # # default USL(Server&Client) class name (with package name) # OZDefault_SERVER=oz.usl.OZUSLServerSession OZDefault_CLIENT=oz.usl.OZUSLClientSession USL OZUSLServerSession OZUSLServer. OZUSLServerSession, WAS OZ Servlet.. <<OZUSLServerSession.java>> 246 FORCS Co., LTD
ppackage oz.usl; import java.io.*; import java.util.enumeration; import javax.servlet.http.httpsession; import oz.cp.message.ozcmexception; import oz.framework.cp.io.ozdatainputstream; import oz.framework.cp.io.ozdataoutputstream; import org.apache.log4j.*; public class OZUSLServerSession extends OZUSLServer { //////////////////////////////////////////////////////////////////// // Non-custom section. Leave below as is. static protected Category cat = Category.getInstance(oz.version.OZSERVERFRAMEWORKVER.getLogVer()+".server"); public OZUSLServerSession(){ super(); /////////////////////////////////////////////////////////////////// // custom section. add your codes & modify // invoked after set httpsession & clientip public void initialize(){ // invoked once per a transaction when prepare to read from client public InputStream createsecureinputstream(datainputstream raw_in) throws OzcmException { cat.debug("ozuslserversession::createsecureinputstream"); try{ params_from_client.read(new OZDataInputStream(raw_in)); for(int i=params_from_client.getlength()-1; i>=0; i--){ cat.debug("ozuslserversession::createsecureinputstream: " + params_from_client.getkey(i) + ", " + params_from_client.getvalue(i)); catch(exception e){ cat.error("ozuslserversession: read params from client:", e); throw new OzcmException(e.getMessage()); return null; FORCS Co., LTD 247
OZ API Developer's Guide (for Java) // invoked once per a transaction when prepare to write to client public OutputStream createsecureoutputstream(dataoutputstream raw_out) throws OzcmException { cat.debug("ozuslserversession::createsecureoutputstream"); try{ if(this.http_request!= null){ HttpSession http_session = http_request.getsession(false); if(http_session == null){ cat.debug("http_session is null"); http_session = http_request.getsession(true); http_session.setattribute("user_id", params_from_client.get("user_id")); http_session.setattribute("user_pw", params_from_client.get("user_pw")); else { cat.debug("http_session is not null"); for(int i = params_from_client.getlength()-1; i>=0; i--){ http_session.setattribute(params_from_client.getname(i), params_from_client.getvalue(i)); Enumeration e = http_session.getattributenames(); for (; e.hasmoreelements(); ) { String key = (String) e.nextelement(); Object value = (Object)http_session.getAttribute(key); if(value instanceof String){ params_to_client.put(key, (String)value); cat.debug("ozuslserversession::http_session: "+key+", "+value); params_to_client.write(new OZDataOutputStream(raw_out)); catch(exception e){ e.printstacktrace(); cat.error("ozuslserversession: write params to client:", e); throw new OzcmException(e.getMessage()); 248 FORCS Co., LTD
return null; Servlet WAS /oz (Servlet). WEB- INF WEB-INF\sessions., http://localhost:8100/setcookie.jsp /http://localhost:8100/test/getcookie.jsp WAS /oz, http://localhost:8100/oz/getcookie.jsp. OZ. WAS. Process /oz. Cookie. USL OZUSLClientSession OZUSLClient. createsecureinputstream InputStream. <<OZUSLClientSession.cpp>> #include <stdafx.h> #include <oz/usl/ozuslclient.h> #include <oz/usl/ozuslclientsession.h> #include <common/io/pc1encode128outputstream.h> #include <common/io/pc1decode128inputstream.h> #include <common/io/ozfuncinputstream.h> FORCS Co., LTD 249
OZ API Developer's Guide (for Java) #include <common/io/ozfuncoutputstream.h> #include <oz/usl/ozuslclientwrapper.h> #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = FILE ; #endif OZUSLClientSession::OZUSLClientSession() : OZUSLClient() { OZUSLClientSession::~OZUSLClientSession() { CJInputStream* OZUSLClientSession::createSecureInputStream(CJDataInputStream* raw_in, CJOZAttributeList& params_from_server_to_fillup, bool binit) { super::createsecureinputstream(raw_in, params_from_server_to_fillup, binit); return NULL; CJOutputStream * OZUSLClientSession::createSecureOutputStream(CJDataOutputStream* raw_out, CJOZAttributeList& params_from_client_to_send) { super::createsecureoutputstream(raw_out, params_from_client_to_send); return NULL; void OZUSLClientSession::destory() { delete this; /* * OZUSLClient_create: initialize User Secure Logic * * this function is called every time a trasaction with OZServer occured * * @param [in] tags null terminated UTF8 OZParameter tag string array to send to server * @param [in] values null terminated UTF8 OZParameter value string array to send to server * @param [in] env_raw environment variable used in OZClient. just forget about what is it. * however you must care about to pass env_raw to 250 FORCS Co., LTD
rawread(write)byte(barray) * functions. * * @param [in] rawreadbyte function to get the encryptied raw byte from server side USL to decrypt * @param [in] rawreadbarray function to get the encryptied raw byte array from server side USL to decrypt * @param [in] rawavailable function to get the tempory readable input buffer size * @param [in] rawreadclose function to close raw inputstream * * @param [in] rawwritebyte function to get the encryptied raw byte to send to server side USL * @param [in] rawwritebarray function to get the encryptied raw byte array to send to server side USL * @param [in] rawflush function to flush raw outputstream * @param [in] rawwriteclose function to close raw outputstream * * @param [in] rawgetlasterrormessage function to get error message from raw in/out stream * * @param [out] do_read_hook whether do input stream wrappering with OZUSLClient_read or not * @param [out] do_write_hook whether do output stream wrappering with OZUSLClient_write or not * @param [out] env the state variable if needs. * state variable is passed to all USL functions * to cover stateless function call interface. * * @return returns >= 0 if success returns returns < 0 if error. * if got error return, OZClient will call OZUSLClient_getLastErrorMessage * to get detailed error message. */ extern "C" declspec(dllexport) int OZUSLClient_create ( byte* params_bytes, int params_bytes_len, void* env_raw, int ( cdecl *rawreadbyte)(void* env_raw, byte* p_value, int *read_len), int ( cdecl *rawreadbarray)(void* env_raw, byte* array_value, int len, int *read_len), int ( cdecl *rawavailable)(void* env_raw, int *available_len), int ( cdecl *rawreadclose)(void* env_raw, BOOL do_not_close_raw_in), FORCS Co., LTD 251
OZ API Developer's Guide (for Java) int ( cdecl *rawwritebyte)(void* env_raw, byte value), int ( cdecl *rawwritebarray)(void* env_raw, byte* array_value, int len), int ( cdecl *rawflush)(void* env_raw), int ( cdecl *rawwriteclose)(void* env_raw), byte* ( cdecl *rawgetlasterrormessage)(void* env_raw), { void** env ) TRACE(_T("OZUSLClient_create\n")); OZUSLClientWrapper *uslw = NULL; uslw = new OZUSLClientWrapper(); uslw->raw_in = new CJDataInputStream (new OZFuncInputStream(env_raw, uslw, rawreadbyte, rawreadbarr uslw->raw_out = new CJDataOutputStream (new OZFuncOutputStream(env_raw, rawwritebyte, rawwritebarray, uslw->ozusl = new OZUSLClientSession(); CJOZAttributeList attrs; CJByteArrayInputStream bin((char*)params_bytes, params_bytes_len, FALSE); CJDataInputStream din(&bin, FALSE); attrs.read(din); uslw->ozusl->setserverip(attrs.get(_t("oz_server_ip"))); uslw->ozusl->setserverurl(attrs.get(_t("oz_server_url"))); *env = uslw; return OZUSLCLIENT_INTERFACE_VERSION; // all ok. USL (getuslserverparam) USL. USL. []-[ ] ( ). []-[]-[]-[ ] 252 FORCS Co., LTD
( ). []-[]-[]-[] ( ). [ ]. String str; str = getuslserverparam( OZUSL_SERVER_URL ); // name USL OZUSL_SERVER_URL setattr( caption,str); write( str ); // ( CTRL+Z) [] [] ( ) 'getuslserverparam.ozr'. 'D:\Repository'. html. <HTML> <BODY> <OBJECT id = "ozviewer" CLASSID="CLSID:0DEF32F8-170F-46f8-B1FF- 4BF7443F5F25" width="100%" height="100%"> <param name="connection.servlet" value="http://127.0.0.1:8080/oz50/server"> <param name="connection.reportname" value="/getuslserverparam.ozr"> <param name="connection.usingusl" value="true"> <param name="viewer.isframe" value="true"> <param name="information.debug" value="true"> </OBJECT> </body> </HTML> connection.usingusl true. caption USL. FORCS Co., LTD 253
OZ API Developer's Guide (for Java) 254 FORCS Co., LTD
User Defined Log UDL UDL UDL FORCS Co., LTD 255
OZ API Developer's Guide (for Java) UDL(User Defined Log) DB. UDL. OZ Server OZ UDL 2. DB Alias Search Interface OZ DB POOL 3. OZLog, Connection 1. DB Alias Name OZ UDL 1. OZServer init 2. tracelog 256 FORCS Co., LTD
UDL. OZUserDefinedLogger OZ UDL oz.udl.ozuserdefinedlogger, oz.udl.ozuserdefinedlogger init, tracelog, getozdbalias. init public void init(oz.framework.db.ozconnection ozconn, com.forcs.log4oz.ozlog cat) throws OZUserDefinedLogException. ozconn cat DB DB tracelog public void tracelog(oz.udl.ozuserdefinedlogtarget target, oz.framework.db.ozconnection ozconn, com.forcs.log4oz.ozlog cat) throws OZUserDefinedLogException. target ozconn cat OZUserDefinedLogTarget. DB DB FORCS Co., LTD 257
OZ API Developer's Guide (for Java) getozdbalias return public java.lang.string getozdbalias() DB. DB OZUserDefinedLogTarget oz.udl.ozuserdefinedlogtarget oz.udl.ozdmlogtarget oz.udl.ozrdblogtarget oz.udl.ozprocedurelogtarget oz.udl.ozudslogtarget oz.udl.ozfilestorelogtarget oz.udl.ozhttpstorelogtarget oz.udl.ozxmllogtarget oz.udl.ozsoaplogtarget oz.udl.ozsaplogtarget oz.udl.ozclearquestlogtarget oz.udl.ozuserdefinedlogtarget oz.udl.ozmonitorlogtarget OZUserDefinedLogTarget OZ UDL. getipaddress return public String getipaddress() IP IP gethttprequest public HttpServletRequest gethttprequest() HttpRequest. 258 FORCS Co., LTD
return HttpRequest : null. gethttpservlet return public HttpServlet gethttpservlet() HttpServlet. HttpServlet : null. getuserid return public String getuserid() ID. : UserID (" "). ID OZDMLogTarget OZ UDL. getodiname return public java.lang.string getodiname() ODI. ODI getdatasetname return public java.lang.string getdatasetname(). getdatastorename return public java.lang.string getdatastorename(). getozparam public java.util.hashmap getozparam() FORCS Co., LTD 259
OZ API Developer's Guide (for Java) return HashMap. key Value OZRDBLogTarget OZ UDL RDB. getdbalias return public String getdbalias() ODI DB. DB :. getdbexecutequery return public String getdbexecutequery(). getpreparedqueryvalue return public Vector getpreparedqueryvalue(). ( ) getexecutequerystate return public String getexecutequerystate(). true "false: false: ErrMsg " getqueryexecutetime return public long getqueryexecutetime(). ( : mesc) 260 FORCS Co., LTD
isprepared public boolean isprepared(). return true false getcrudflagname public String getcrudflagname(). return select insert update delete Select Insert Update Delete OZProcedureLogTarget OZ UDL. getdbalias return public String getdbalias() ODI DB. DB :. getprocedurename return public String getprocedurename(). getparameterlist return public ArrayList getparameterlist(). FORCS Co., LTD 261
OZ API Developer's Guide (for Java) getprocedureexecutetime return public long getprocedureexecutetime(). ( : mesc) getprocedurestate return public String getprocedurestate(). true false:errmsg "false: " OZUDSLogTarget OZ UDL. getexecutecommand return public String getexecutecommand(). getcrudflagname public String getcrudflagname(). return select insert update delete Select Insert Update Delete getcommandexecutetime return public long getcommandexecutetime(). ( : mesc) 262 FORCS Co., LTD
getcommandstate return public String getcommandstate(). true false:errmsg "false: " OZFileStoreLogTarget OZ UDL. getfilepath return public String getfilepath(). getfileaccesstime return public long getfileaccesstime(). ( : mesc) getfileaccessstate public String getfileaccessstate(). return true false:errmsg "false: " OZHTTPStoreLogTarget OZ UDL HTTP HTTP. geturl return public String geturl() URL. URL FORCS Co., LTD 263
OZ API Developer's Guide (for Java) gethttpaccesstime return public long gethttpaccesstime() HTTP. ( : mesc) gethttpaccessstate return public String gethttpaccessstate() HTTP. true false:errmsg "false: " OZXMLLogTarget OZ UDL XML XML. geturl return public String geturl() URL. URL geturlaccesstime return public long geturlaccesstime() URL. ( : mesc) geturlaccessstate return public String geturlaccessstate() URL. true false:errmsg "false: " OZSOAPLogTarget 264 FORCS Co., LTD
OZ UDL SOAP Service Response. getservicename return public String getservicename(). getport return public String getport(). getoperation return public String getoperation(). getendpoint return public String getendpoint() EndPoint. EndPoint getrequestxml return public String getrequestxml() XML. XML getserviceexecutetime return public long getserviceexecutetime(). ( : mesc) getservicestate FORCS Co., LTD 265
OZ API Developer's Guide (for Java) return public String getservicestate() SOAP. true false:errmsg "false: " OZSAPLogTarget OZ UDL SAP. getfunctionname return public String getfunctionname(). getfunctiontype return public String getfunctiontype(). getinputparameters return public HashMap getinputparameters() HashMap. key value getresultsettypes public String getresultsettypes() ResultSet. return Structure Table SimpleFields Structure Table SimpleFields getfunctionexecutetime public long getfunctionexecutetime() 266 FORCS Co., LTD
return. ( : mesc) getfunctionstate public String getfunctionstate(). return true false:errmsg "false: " OZClearQuestLogTarget OZ UDL Clear Quest Clear Quest. getexecutetype public String getexecutetype() Clear Quest. return ExecuteSQL ExecuteQuery ExecuteDynamicQuery SQL getquerysubtype public String getquerysubtype() QuerySub. return Query Chart Query Chart getquery return public String getquery(). getqueryexecutetime public long getqueryexecutetime(). FORCS Co., LTD 267
OZ API Developer's Guide (for Java) return ( : mesc) getquerystate return public String getquerystate(). true false:errmsg "false: " OZMonitorLogTarget OZ UDL. getmark public String getmark(). return start end getthreadname return public String getthreadname() Name. getservicetime return public long getservicetime(). ( : ms) : 1970 1 1 Millisecond. getfreememory return public long getfreememory(). ( : byte) 268 FORCS Co., LTD
gettotalmemory return public long gettotalmemory() JVM. ( : byte) getservicecode return public integer getservicecode(). MARK "end" "start" -1. ". ". getservicestatus return public integer getservicestatus(). MARK "end" "start" -1. "9001", "9002". 9001 9002 getserviceparameter return public String getserviceparameter(). : MARK "end" "start" -1. getdbsessionid public String getdbsessionid() DBMS ID. : MARK "end" "start" FORCS Co., LTD 269
OZ API Developer's Guide (for Java) -1. return DBMS ID getexecutetime return public String getexecutetime(). ( : ms) : MARK "end" "start" -1. geterrorcode return public String geterrorcode(). : conf/server_error_msg.xml. geterrormsg return public String geterrormsg() geterrorstacktrace return public String geterrorstacktrace() Stack Trace. getdbconns return public String getdbconns() Alias DB 270 FORCS Co., LTD
UDL. - UDL : OZ_HOME/lib/ozudl.jar - UDL : OZ_HOME/conf/ozudl.properties - ozudl.jar CLASSPATH. - ozudl.properties UDL. #--------------------------------- # configuraion of OZ User Defined log #--------------------------------- # OZ_USER_DEFINED_LOG.Active=true OZ_USER_DEFINED_LOG.Class=oz.udl.UDL OZ_UDL_MONITOR.Active= true OZ_UDL_MONITOR.Class=oz.udl.UDL ozudl.properties UDL. OZ_USER_DEFINED_LOG.Active=true OZ_UDL_MONITOR.Active= true UDL. OZ_USER_DEFINED_LOG.Class=oz.udl.UDL FORCS Co., LTD 271
OZ API Developer's Guide (for Java) OZ_UDL_MONITOR.Class=oz.udl.UDL ex) OZ_USER_DEFINED_LOG.Class=oz.udl.file.OZUserDefinedLogger OZ_UDL_MONITOR.Class=oz.udl.db.OZMonitorLogForDB UDL 1 - UDL. UDL. java oz.udl.file.ozuserdefinedloggerforfile "ozudl.jar". package oz.udl.file; import java.io.*; import java.util.*; import org.apache.log4j.*; import javax.servlet.http.*; import oz.udl.*; import oz.framework.db.*; import com.forcs.log4oz.ozlog; import oz.framework.dac.ozdacdata; import oz.dm.meta.ozprocedureparameter; public class OZUserDefinedLoggerForFile implements OZUserDefinedLogger{ Category logger = null; private final static String ROLLING_FILE_APPENDER = "RollingAppender"; private final static String DAILY_ROLLING_FILE_APPENDER = "DailyRollingAppender"; private String logpath; private String layouts; private String AppenderType; private String filesize; 272 FORCS Co., LTD
private String backupindex; private String dailytype; public OZUserDefinedLoggerForFile() { /** * * @param ozconn OZConnection Connection * @param cat OZLog trace * @throws OZUserDefinedLogException */ public void init(ozconnection ozconn, OZLog cat) throws OZUserDefinedLogException { try { load(cat); setappender(cat); catch(exception ex){ if (logger!= null) { logger.error(ex.getmessage(), ex); cat.error(ex.getmessage(), ex); throw new OZUserDefinedLogException(ex.getMessage()); private void load(ozlog cat) { Properties props = new Properties(); FileInputStream fis = null; try { fis = new FileInputStream("udl_file.properties"); props.load(fis); logpath=props.getproperty("logpath"); layouts=props.getproperty("layout"); AppenderType=props.getProperty("AppenderType"); filesize=props.getproperty("filesize"); backupindex=props.getproperty("backupindex"); dailytype=props.getproperty("dailytype"); catch(exception ex){ cat.error(ex.getmessage(), ex); finally{ if (fis!= null) try { fis.close(); catch(exception ex1){ FORCS Co., LTD 273
OZ API Developer's Guide (for Java) private void setappender(ozlog cat) throws Exception { PatternLayout layout = new PatternLayout(layoutS); if (ROLLING_FILE_APPENDER.equals(AppenderType)) { logpath, true); RollingFileAppender appender = new RollingFileAppender(layout, appender.setmaxfilesize(filesize); try { appender.setmaxbackupindex(integer.parseint(backupindex)); catch(exception ex){ appender.setmaxbackupindex(5); logger = Category.getInstance("oz.udl.file"); logger.setpriority(priority.debug); logger.addappender(appender); logger.debug("start..."); cat.debug("user db logger init..."); // trace else if (DAILY_ROLLING_FILE_APPENDER.equals(AppenderType)) { String datepattern = "'.'"+dailytype; DailyRollingFileAppender appender = new DailyRollingFileAppender(); appender.setdatepattern(datepattern); appender.setlayout(layout); appender.setfile(logpath,true); /** * trace target * @param target OZUserDefinedLogTarget * @param ozconn OZConnection * @param cat OZLog ( trace param )cat.debug(str);) * @throws OZUserDBLogException */ public void tracelog(ozuserdefinedlogtarget target, OZConnection ozconn, OZLog cat) throws OZUserDefinedLogException { StringBuffer sb = new StringBuffer(); 274 FORCS Co., LTD
try { if(target instanceof OZProcedureLogTarget) { sb.append(procedurestore(target)); else if(target instanceof OZRDBLogTarget){ sb.append(rdbstroe(target)); else if(target instanceof OZUDSLogTarget) { sb.append(udsstore(target)); else if(target instanceof OZFileStoreLogTarget) { sb.append(filestore(target)); else if(target instanceof OZHTTPStoreLogTarget) { sb.append(httpstore(target)); else if(target instanceof OZXMLLogTarget) { sb.append(xmlstore(target)); else if(target instanceof OZSOAPLogTarget) { sb.append(soapstore(target)); else if(target instanceof OZSAPLogTarget) { sb.append(sapstore(target)); else if(target instanceof OZClearQuestLogTarget) { sb.append(clearqueststore(target)); sb.append(commonfactor(target)); logger.info(sb.tostring()); catch(exception ex){ logger.error(ex.getmessage(), ex); cat.error(ex.getmessage(),ex); throw new OZUserDefinedLogException(ex.getMessage()); public String rdbstroe(ozuserdefinedlogtarget target){ OZRDBLogTarget ref = (OZRDBLogTarget)target; StringBuffer sb = new StringBuffer(); String dbalias = (ref.getdbalias() == null)? "" : ref.getdbalias(); sb.append("[db Alias="); sb.append(dbalias); sb.append("]"); FORCS Co., LTD 275
OZ API Developer's Guide (for Java) String crudflagname = (ref.getcrudflagname() == null)? "" : ref.getcrudflagname(); sb.append("[crudtype="); sb.append(crudflagname); sb.append("]"); sb.append("[isprepared="); sb.append(ref.isprepared()); sb.append("]"); if(ref.getpreparedqueryvalue()!= null){ sb.append("[querypreparedvalue="); Vector vec = ref.getpreparedqueryvalue(); if (crudflagname.equals("select")) { for (int i = 0; i < vec.size(); i++) { sb.append(vec.elementat(i)); else { for (int i = 0; i < vec.size(); i++) { OZDACData data = (OZDACData)vec.elementAt(i); sb.append(data.tostringdata()); sb.append(";"); sb.append("]"); String query = (ref.getdbexecutequery() == null)? "" : ref.getdbexecutequery(); sb.append("[query="); sb.append(query); sb.append("]"); long queryexec = ref.getqueryexecutetime(); sb.append("[query exec="); sb.append(queryexec); sb.append("]"); String querystate = (ref.getexecutequerystate() == null)? "" : ref.getexecutequerystate(); sb.append("[querystate="); sb.append(querystate); sb.append("]"); return sb.tostring(); public String udsstore(ozuserdefinedlogtarget target){ OZUDSLogTarget ref = (OZUDSLogTarget)target; StringBuffer sb = new StringBuffer(); sb.append("[executecommand="); sb.append(ref.getexecutecommand()); 276 FORCS Co., LTD
sb.append("]"); sb.append("[crudflagname="); sb.append(ref.getcrudflagname()); sb.append("]"); sb.append("[commandexecutetime="); sb.append(ref.getcommandexecutetime()); sb.append("]"); sb.append("[commandstate="); sb.append(ref.getcommandstate()); sb.append("]"); return sb.tostring(); public String procedurestore(ozuserdefinedlogtarget target){ OZProcedureLogTarget ref = (OZProcedureLogTarget)target; StringBuffer sb = new StringBuffer(); sb.append("[dbalias="); sb.append(ref.getdbalias()); sb.append("]"); sb.append("[procedurename="); sb.append(ref.getprocedurename()); sb.append("]"); sb.append("[parameterlist="); ArrayList list = ref.getparameterlist(); for(int i=0;i<list.size();i++){ OZProcedureParameter param = (OZProcedureParameter)list.get(i); sb.append(param.getvalue()); sb.append(","); sb.append(param.getdatatypename()); sb.append(";"); sb.append(ref.getparameterlist()); sb.append("]"); sb.append("[procedureexecutetime="); sb.append(ref.getprocedureexecutetime()); sb.append("]"); sb.append("[procedurestate="); sb.append(ref.getprocedurestate()); sb.append("]"); return sb.tostring(); public String xmlstore(ozuserdefinedlogtarget target){ StringBuffer sb = new StringBuffer(); OZXMLLogTarget ref = (OZXMLLogTarget)target; FORCS Co., LTD 277
OZ API Developer's Guide (for Java) sb.append("[url="); sb.append(ref.geturl()); sb.append("]"); sb.append("[urlaccesstime="); sb.append(ref.geturlaccesstime()); sb.append("]"); sb.append("[urlaccessstate="); sb.append(ref.geturlaccessstate()); sb.append("]"); return sb.tostring(); public String soapstore(ozuserdefinedlogtarget target){ StringBuffer sb = new StringBuffer(); OZSOAPLogTarget ref = (OZSOAPLogTarget)target; sb.append("[servicename="); sb.append(ref.getservicename()); sb.append("]"); sb.append("[port="); sb.append(ref.getport()); sb.append("]"); sb.append("[endpoint="); sb.append(ref.getendpoint()); sb.append("]"); sb.append("[serviceexecutetime="); sb.append(ref.getserviceexecutetime()); sb.append("]"); sb.append("[servicestate="); sb.append(ref.getservicestate()); sb.append("]"); sb.append("[requestxml="); sb.append(ref.getrequestxml()); sb.append("]"); return sb.tostring(); public String sapstore(ozuserdefinedlogtarget target){ StringBuffer sb = new StringBuffer(); OZSAPLogTarget ref = (OZSAPLogTarget)target; sb.append("[functionname="); sb.append(ref.getfunctionname()); sb.append("]"); sb.append("[functiontype="); 278 FORCS Co., LTD
sb.append(ref.getfunctiontype()); sb.append("]"); sb.append("[resultsettypes="); sb.append(ref.getresultsettypes()); sb.append("]"); sb.append("[inputparameters="); sb.append(ref.getinputparameters()); sb.append("]"); sb.append("[functionexecutetime="); sb.append(ref.getfunctionexecutetime()); sb.append("]"); sb.append("[functionstate="); sb.append(ref.getfunctionstate()); sb.append("]"); return sb.tostring(); public String clearqueststore(ozuserdefinedlogtarget target){ StringBuffer sb = new StringBuffer(); OZClearQuestLogTarget ref = (OZClearQuestLogTarget)target; sb.append("[executetype="); sb.append(ref.getexecutetype()); sb.append("]"); sb.append("[querysubtype="); sb.append(ref.getquerysubtype()); sb.append("]"); sb.append("[query="); sb.append(ref.getquery()); sb.append("]"); sb.append("[queryexecutetime="); sb.append(ref.getqueryexecutetime()); sb.append("]"); sb.append("[querystate="); sb.append(ref.getquerystate()); sb.append("]"); return sb.tostring(); public String httpstore(ozuserdefinedlogtarget target){ OZHTTPStoreLogTarget ref = (OZHTTPStoreLogTarget)target; StringBuffer sb = new StringBuffer(); sb.append("[url="); sb.append(ref.geturl()); sb.append("]"); FORCS Co., LTD 279
OZ API Developer's Guide (for Java) sb.append("[httpaccesstime="); sb.append(ref.gethttpaccesstime()); sb.append("]"); sb.append("[httpaccessstate="); sb.append(ref.gethttpaccessstate()); sb.append("]"); return sb.tostring(); public String filestore(ozuserdefinedlogtarget target){ StringBuffer sb = new StringBuffer(); OZFileStoreLogTarget ref = (OZFileStoreLogTarget)target; if(ref!=null){ sb.append("[filepath="); sb.append(ref.getfilepath()); sb.append("]"); sb.append("[fileaccesstime="); sb.append(ref.getfileaccesstime()); sb.append("]"); sb.append("[fileaccessstate="); sb.append(ref.getfileaccessstate()); sb.append("]"); else{ sb.append("filestore is null"); return sb.tostring(); public String commonfactor(ozuserdefinedlogtarget target){ OZDMLogTarget ref = (OZDMLogTarget)target; StringBuffer sb = new StringBuffer(); HttpServletRequest request = ref.gethttprequest(); if(request!= null){ sb.append("[request Parameter="); Enumeration en = request.getparameternames(); while(en.hasmoreelements()){ String key = (String)en.nextElement(); String value = request.getparameter(key); sb.append("("); sb.append(key + "," + value); sb.append(")"); sb.append("]"); 280 FORCS Co., LTD
HttpSession session = request.getsession(false); if(session!= null){ sb.append("[session Attribute="); en = session.getattributenames(); while(en.hasmoreelements()){ String key = (String)en.nextElement(); sb.append("("); sb.append(key); sb.append(","); sb.append(session.getattribute(key)); sb.append(")"); sb.append("]"); String ipaddress = (ref.getipaddress() == null)? "" : ref.getipaddress(); sb.append("[ip Address="); sb.append(ipaddress); sb.append("]"); String userid = (ref.getuserid() == null)? "" : ref.getuserid(); sb.append("[userid="); sb.append(userid); sb.append("]"); String odiname = (ref.getodiname() == null)? "" : ref.getodiname(); sb.append("[odiname="); sb.append(odiname); sb.append("]"); String datasetname = (ref.getdatasetname() == null)? "" : ref.getdatasetname(); sb.append("[datasetname="); sb.append(datasetname); sb.append("]"); String datastorename = (ref.getdatastorename() == null)? "" : ref.getdatastorename(); sb.append("[datastorename="); sb.append(datastorename); sb.append("]"); return sb.tostring(); /** * UDL DB OZ Server Pool alias * @return String */ public String getozdbalias() { FORCS Co., LTD 281
OZ API Developer's Guide (for Java) return ""; ozudl.jar \lib OZ_HOME/bin/ozcntrl.bat. rem --------------------------------- rem User Defined Log Class rem ---------------------------------- set OZLIB=%OZLIB%;%OZLIBALL%\ozudl.jar UDL OZ_HOME/conf/uslmngr.properties. #--------------------------------- # configuraion of OZ User Defined log #--------------------------------- OZ_USER_DEFINED_LOG.Active=true OZ_USER_DEFINED_LOG.Class=oz.udl.file.OZUserDefinedLoggerForFile \bin "udl_file.properties". logpath=c:/program Files/Forcs/OZ XStudio/OZ Server 5.0/logs/UDL.log layout=%d{yyyy-mm-dd HH:mm:ss.SSS [%-5p] %C{1.%M - %m%n AppenderType=RollingAppender filesize=100kb backupindex=5 #AppenderType=DailyRollingAppender #dailytype=yyyy-mm-dd : "logpath" "\" "/".. 282 FORCS Co., LTD
. [Data Action]. /log "UDL.log". UDL.log ODI. [INFO ] OZUserDefinedLoggerForFile.traceLog - [DB Alias=qa_ms][IP Address=127.0.0.1][UserID=admin][CRUDType=select][isPrepared=true][QueryP reparedvalue=][query=select * from REQ397][Query exec=16][querystate=true][odiname=/dataaction.odi][datasetname=sample][da tastorename=db] [INFO ] OZUserDefinedLoggerForFile.traceLog - [DB Alias=qa_ms][IP Address=127.0.0.1][UserID=admin][CRUDType=insert][isPrepared=true][QueryP FORCS Co., LTD 283
OZ API Developer's Guide (for Java) reparedvalue=4;; ;][Query=insert into REQ397 (id,name,address) values (?,?,?)][Query exec=16][querystate=true] [ODIName=/DataAction.odi][DataSetName=Sample][DataStoreName=DB] UDL 2 - UDL. UDL. java oz.udl.file.ozuserdefinedloggerfordb "ozudl.jar". ( db.properties DB "Sample" "OZDBHISTORY".) package oz.udl.db; import oz.udl.*; import oz.framework.db.*; import com.forcs.log4oz.ozlog; import oz.framework.dac.ozdacdata; import java.sql.*; import java.util.*; import java.text.*; import javax.servlet.http.*; import oz.dm.meta.ozprocedureparameter; public class OZUserDefinedLoggerForDB implements OZUserDefinedLogger{ private final static String TABLENAME = "OZDBHISTORY"; private final static String QUERY = "insert into "+TABLENAME + " values (?,?,?,?,?,?,?) "; public OZUserDefinedLoggerForDB(){ 284 FORCS Co., LTD
/** * * @throws OZUserDefinedLogException */ public void init(ozconnection ozconn, OZLog cat) throws OZUserDefinedLogException{ try{ Connection conn = ozconn.getconnection(); if(!isexiststable(conn, TABLENAME)){ String createquery = "create table "+TABLENAME+" ( " + "property text NOT NULL, "+ "SessionInfo text NULL, "+ "IP varchar(27) NULL, "+ // "USERID varchar(255) NULL, "+ // "ODINAME varchar(255) NOT NULL, "+ // "DataSetName varchar(255) NOT NULL, "+ // "DataStoreName varchar(255) NOT NULL "+ // " ) "; */ /* "create table "+TABLENAME+" ( " + "TIME_ID varchar(255) NOT NULL, "+ "DB_ALIAS varchar(128) NOT NULL, "+ "IP varchar(27) NULL, "+ "USERID varchar(255) NULL, "+ "CRUDNAME varchar(6) NULL, "+ "ISPrepared varchar(5) NULL, "+ "SessionInfo text NULL, "+ "preparedvalue text NULL, "+ "Query text NULL, "+ "exe_time int NOT NULL, "+ "querystate varchar(255) NOT NULL, "+ "ODINAME varchar(255) NOT NULL, "+ "DataSetName varchar(255) NOT NULL, "+ "DataStoreName varchar(255) NOT NULL "+ " ) "; PreparedStatement pstmt = conn.preparestatement(createquery); pstmt.executeupdate(); createquery = "CREATE INDEX " + TABLENAME + "_idx_time_id ON " + TABLENAME + " (TIME_ID)"; FORCS Co., LTD 285
OZ API Developer's Guide (for Java) pstmt.close(); pstmt = conn.preparestatement(createquery); pstmt.executeupdate(); pstmt.close(); catch(exception ex){ cat.error(ex.getmessage(), ex); throw new OZUserDefinedLogException(ex.getMessage()); /** * trace target * @param target OZUserDefinedLogTarget * @param ozconn OZConnection * @param cat OZLog ( trace param )cat.debug(str);) * @throws OZUserDefinedLogException */ public void tracelog(ozuserdefinedlogtarget target, OZConnection ozconn, OZLog cat) throws OZUserDefinedLogException{ try{ // OZRDBLogTarget ref = (OZRDBLogTarget)target; Connection conn = ozconn.getconnection(); PreparedStatement pstmt = conn.preparestatement(query); StringBuffer sb2 = new StringBuffer(); if(target instanceof OZProcedureLogTarget) { sb2.append(procedurestore(target)); else if(target instanceof OZRDBLogTarget){ sb2.append(rdbstroe(target)); else if(target instanceof OZUDSLogTarget) { sb2.append(udsstore(target)); else if(target instanceof OZFileStoreLogTarget) { sb2.append(filestore(target)); else if(target instanceof OZHTTPStoreLogTarget) { sb2.append(httpstore(target)); else if(target instanceof OZXMLLogTarget) { sb2.append(xmlstore(target)); else if(target instanceof OZSOAPLogTarget) { sb2.append(soapstore(target)); else if(target instanceof OZSAPLogTarget) { sb2.append(sapstore(target)); else if(target instanceof OZClearQuestLogTarget) { sb2.append(clearqueststore(target)); //// 286 FORCS Co., LTD
OZDMLogTarget ref = (OZDMLogTarget)target; StringBuffer sb = new StringBuffer(); HttpServletRequest request = ref.gethttprequest(); if(request!= null){ sb.append("[request Parameter="); Enumeration en = request.getparameternames(); while(en.hasmoreelements()){ String key = (String)en.nextElement(); String value = request.getparameter(key); sb.append("("); sb.append(key + "," + value); sb.append(")"); sb.append("]"); HttpSession session = request.getsession(false); if(session!= null){ sb.append("[session Attribute="); en = session.getattributenames(); while(en.hasmoreelements()){ String key = (String)en.nextElement(); sb.append("("); sb.append(key); sb.append(","); sb.append(session.getattribute(key)); sb.append(")"); sb.append("]"); String ipaddress = (ref.getipaddress() == null)? "" : ref.getipaddress(); String userid = (ref.getuserid() == null)? "" : ref.getuserid(); String odiname = (ref.getodiname() == null)? "" : ref.getodiname(); String datasetname = (ref.getdatasetname() == null)? "" : ref.getdatasetname(); String datastorename = (ref.getdatastorename() == null)? "" : ref.getdatastorename(); pstmt.setstring(1, sb2.tostring()); pstmt.setstring(2, sb.tostring()); pstmt.setstring(3, ipaddress); pstmt.setstring(4, userid); pstmt.setstring(5, odiname); pstmt.setstring(6, datasetname); pstmt.setstring(7, datastorename); FORCS Co., LTD 287
OZ API Developer's Guide (for Java) pstmt.executeupdate(); pstmt.close(); catch(exception ex){ cat.error(ex.getmessage(), ex); throw new OZUserDefinedLogException(ex.getMessage()); /** * UDL DB OZ Server Pool alias * @return String */ public String getozdbalias(){ return "qa_ms"; private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); /** * * @return String */ private String getdatetime() { return sdf.format(new java.util.date(system.currenttimemillis())); /** * * @param tablename String * @throws SQLException * @return boolean */ private boolean isexiststable(connection conn, String tablename) throws SQLException { DatabaseMetaData meta = null; ResultSet rs = null; try { ////////////////;;///////////// 288 FORCS Co., LTD
if (conn!= null) { meta = conn.getmetadata(); else { throw new SQLException("Connection is null"); String[] tmptype = {"TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM"; rs = meta.gettables(null, null, null, tmptype); while (rs.next()) { if (rs.getstring(3).equals(tablename)) { return true; catch (SQLException sqlex) { throw sqlex; finally { if (rs!= null) rs.close(); rs = null; meta = null; return false; public String rdbstroe(ozuserdefinedlogtarget target){ OZRDBLogTarget ref = (OZRDBLogTarget)target; StringBuffer sb = new StringBuffer(); String dbalias = (ref.getdbalias() == null)? "" : ref.getdbalias(); sb.append("[db Alias="); sb.append(dbalias); sb.append("]"); String crudflagname = (ref.getcrudflagname() == null)? "" : ref.getcrudflagname(); sb.append("[crudtype="); sb.append(crudflagname); sb.append("]"); sb.append("[isprepared="); sb.append(ref.isprepared()); sb.append("]"); if(ref.getpreparedqueryvalue()!= null){ sb.append("[querypreparedvalue="); Vector vec = ref.getpreparedqueryvalue(); if (crudflagname.equals("select")) { FORCS Co., LTD 289
OZ API Developer's Guide (for Java) for (int i = 0; i < vec.size(); i++) { sb.append(vec.elementat(i)); else { for (int i = 0; i < vec.size(); i++) { OZDACData data = (OZDACData)vec.elementAt(i); sb.append(data.tostringdata()); sb.append(";"); sb.append("]"); String query = (ref.getdbexecutequery() == null)? "" : ref.getdbexecutequery(); sb.append("[query="); sb.append(query); sb.append("]"); long queryexec = ref.getqueryexecutetime(); sb.append("[query exec="); sb.append(queryexec); sb.append("]"); String querystate = (ref.getexecutequerystate() == null)? "" : ref.getexecutequerystate(); sb.append("[querystate="); sb.append(querystate); sb.append("]"); return sb.tostring(); public String udsstore(ozuserdefinedlogtarget target){ OZUDSLogTarget ref = (OZUDSLogTarget)target; StringBuffer sb = new StringBuffer(); sb.append("[executecommand="); sb.append(ref.getexecutecommand()); sb.append("]"); sb.append("[crudflagname="); sb.append(ref.getcrudflagname()); sb.append("]"); sb.append("[commandexecutetime="); sb.append(ref.getcommandexecutetime()); sb.append("]"); sb.append("[commandstate="); sb.append(ref.getcommandstate()); sb.append("]"); return sb.tostring(); 290 FORCS Co., LTD
public String procedurestore(ozuserdefinedlogtarget target){ OZProcedureLogTarget ref = (OZProcedureLogTarget)target; StringBuffer sb = new StringBuffer(); sb.append("[dbalias="); sb.append(ref.getdbalias()); sb.append("]"); sb.append("[procedurename="); sb.append(ref.getprocedurename()); sb.append("]"); sb.append("[parameterlist="); ArrayList list = ref.getparameterlist(); for(int i=0;i<list.size();i++){ OZProcedureParameter param = (OZProcedureParameter)list.get(i); sb.append(param.getvalue()); sb.append(","); sb.append(param.getdatatypename()); sb.append(";"); sb.append(ref.getparameterlist()); sb.append("]"); sb.append("[procedureexecutetime="); sb.append(ref.getprocedureexecutetime()); sb.append("]"); sb.append("[procedurestate="); sb.append(ref.getprocedurestate()); sb.append("]"); return sb.tostring(); public String xmlstore(ozuserdefinedlogtarget target){ StringBuffer sb = new StringBuffer(); OZXMLLogTarget ref = (OZXMLLogTarget)target; sb.append("[url="); sb.append(ref.geturl()); sb.append("]"); sb.append("[urlaccesstime="); sb.append(ref.geturlaccesstime()); sb.append("]"); sb.append("[urlaccessstate="); sb.append(ref.geturlaccessstate()); sb.append("]"); return sb.tostring(); FORCS Co., LTD 291
OZ API Developer's Guide (for Java) public String soapstore(ozuserdefinedlogtarget target){ StringBuffer sb = new StringBuffer(); OZSOAPLogTarget ref = (OZSOAPLogTarget)target; sb.append("[servicename="); sb.append(ref.getservicename()); sb.append("]"); sb.append("[port="); sb.append(ref.getport()); sb.append("]"); sb.append("[endpoint="); sb.append(ref.getendpoint()); sb.append("]"); sb.append("[serviceexecutetime="); sb.append(ref.getserviceexecutetime()); sb.append("]"); sb.append("[servicestate="); sb.append(ref.getservicestate()); sb.append("]"); sb.append("[requestxml="); sb.append(ref.getrequestxml()); sb.append("]"); return sb.tostring(); public String sapstore(ozuserdefinedlogtarget target){ StringBuffer sb = new StringBuffer(); OZSAPLogTarget ref = (OZSAPLogTarget)target; sb.append("[functionname="); sb.append(ref.getfunctionname()); sb.append("]"); sb.append("[functiontype="); sb.append(ref.getfunctiontype()); sb.append("]"); sb.append("[resultsettypes="); sb.append(ref.getresultsettypes()); sb.append("]"); sb.append("[inputparameters="); sb.append(ref.getinputparameters()); sb.append("]"); sb.append("[functionexecutetime="); sb.append(ref.getfunctionexecutetime()); sb.append("]"); sb.append("[functionstate="); 292 FORCS Co., LTD
sb.append(ref.getfunctionstate()); sb.append("]"); return sb.tostring(); public String clearqueststore(ozuserdefinedlogtarget target){ StringBuffer sb = new StringBuffer(); OZClearQuestLogTarget ref = (OZClearQuestLogTarget)target; sb.append("[executetype="); sb.append(ref.getexecutetype()); sb.append("]"); sb.append("[querysubtype="); sb.append(ref.getquerysubtype()); sb.append("]"); sb.append("[query="); sb.append(ref.getquery()); sb.append("]"); sb.append("[queryexecutetime="); sb.append(ref.getqueryexecutetime()); sb.append("]"); sb.append("[querystate="); sb.append(ref.getquerystate()); sb.append("]"); return sb.tostring(); public String httpstore(ozuserdefinedlogtarget target){ OZHTTPStoreLogTarget ref = (OZHTTPStoreLogTarget)target; StringBuffer sb = new StringBuffer(); sb.append("[url="); sb.append(ref.geturl()); sb.append("]"); sb.append("[httpaccesstime="); sb.append(ref.gethttpaccesstime()); sb.append("]"); sb.append("[httpaccessstate="); sb.append(ref.gethttpaccessstate()); sb.append("]"); return sb.tostring(); public String filestore(ozuserdefinedlogtarget target){ StringBuffer sb = new StringBuffer(); FORCS Co., LTD 293
OZ API Developer's Guide (for Java) OZFileStoreLogTarget ref = (OZFileStoreLogTarget)target; if(ref!=null){ sb.append("[filepath="); sb.append(ref.getfilepath()); sb.append("]"); sb.append("[fileaccesstime="); sb.append(ref.getfileaccesstime()); sb.append("]"); sb.append("[fileaccessstate="); sb.append(ref.getfileaccessstate()); sb.append("]"); else{ sb.append("filestore is null"); return sb.tostring(); ozudl.jar \lib OZ_HOME/bin/ozcntrl.bat. rem --------------------------------- rem User Defined Log Class rem ---------------------------------- set OZLIB=%OZLIB%;%OZLIBALL%\ozudl.jar UDL OZ_HOME/conf/uslmngr.properties. #--------------------------------- # configuraion of OZ User Defined log #--------------------------------- OZ_USER_DEFINED_LOG.Active=true OZ_USER_DEFINED_LOG.Class=oz.udl.db.OZUserDefinedLoggerForFile OZ_HOME/conf/db.properties oz.udl.db.ozuserdefinedloggerfordb. # # Sample 294 FORCS Co., LTD
# Sample.vendor=MSSQL Sample.serverAddress=127.0.0.1 Sample.user=user Sample.password=userpw Sample.portNo=1433 Sample.dbName=DBName Sample.maxconns=20 Sample.initconns=5 Sample.timeout=5 Sample.doConnectionCheck=false.. [Data Action]. FORCS Co., LTD 295
OZ API Developer's Guide (for Java) ODI. UDL 3 - OZ UDL monitor.log. UDL monitor.log. java oz.udl.db.ozuserdefinedmonitorlogger "ozudl.jar". ( db.properties DB " Sample" "OZ_MONITOR_JAVA".) package oz.udl.db; import oz.udl.*; import oz.framework.db.*; import com.forcs.log4oz.ozlog; 296 FORCS Co., LTD