untitled

Size: px
Start display at page:

Download "untitled"

Transcription

1 API... 3 Class Cache... 5 Class ConnectionPool Class DataBind Class Log Class Module Class Monitor Class Repository Class Service Class Viewer API Class Program Class Publisher Class Scheduler API OZLauncherDll FORCS Co., LTD 1

2 OZ API Developer's Guide User Data Store UDS UDS UDS User Security Logic USL USL USL C SchedulerCom FORCS Co., LTD

3 API Class Cache Class ConnectionPool Class DataBind Class Log Class Module Class Monitor Class Repository Class Service Class Viewer FORCS Co., LTD 3

4 OZ API Developer's Guide API. API. Cache Connection Pool DataBind Log Module Monitor Repository Service Viewer.. Pool JDBC/ODBC,..,,....,,,.,. API. ozsfw35.jar log4.jar Scheduler server. Server Log. (API classpath "log4.jar" ) 4 FORCS Co., LTD

5 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) Argument url ip port id Servlet URL ex) String url = " Daemon IP ex) String ip = " "; Daemon ex) int port = 8003; ex) String id = "admin"; FORCS Co., LTD 5

6 OZ API Developer's Guide pw bautologin useusl ex) String pw = "admin"; ex) boolean bautologin = true; USL ex) boolean useusl = false; Method Detail getcacheconfigration public SortProperties getcacheconfigration() throws OZCPException. "SortProperties" key. setcacheconfiguration public void setcacheconfiguration(sortproperties p) throws OZCPException. "SortProperties" key. Argument p Class OZCPException(oz.framework.cp.OZCPException) API Exception. API OZCPException. - getmessage public String getmessage(). 6 FORCS Co., LTD

7 geterrorcode public int geterrorcode(). SortProperties(oz.util.SortProperties.java) getcacheconfigration(), setcacheconfiguration(). - getproperty public synchronized String getproperty(string key) key. setproperty public synchronized Object setproperty(string key, String value) key (value). - Key getproperty() setproperty() key. Key Value Active "true" "false" ex) p.setproperty("datamodule.active", "false"); CACHE_FILE_PAT H ex) p.setproperty("cache_file_path","%oz_home%/cac he"); DM_CACHE_FILE _PATH Data Module ex) p.setproperty("dm_cache_file_path","%oz_home% /cache_dm/"); FORCS Co., LTD 7

8 OZ API Developer's Guide memorycacheval idtime (:) ex) p.setproperty("datamodule.memorycachevalidtime", "100"); diskcachevalidti me (:) ex) p.setproperty("datamodule.diskcachevalidtime","100"); FreeMemoryPerc entage 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 = " "; // IP int PORT = 8003; // TCP /*/ // Servlet String URL = " //Servlet URL /**/ // User Info. String ID = "admin"; //default String PWD = "admin"; //default Cache cache = null; 8 FORCS Co., LTD

9 try { //* // 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.getcacheconfigration(); /**/ p.list(system.out); catch(exception e) { e.printstacktrace(); FORCS Co., LTD 9

10 OZ API Developer's Guide 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) Argument url ip Servlet URL ex) String url = " Daemon IP ex) String ip = " "; 10 FORCS Co., LTD

11 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". Argument pool ConnectionPool ConnectionPoolInfo removepool public void removepool(string pool) throws OZCPException ConnectionPool. Argument pool ConnectionPool getpoolinfolist public ConnectionPoolInfo[] getpoolinfolist() throws OZCPException ConnectionPool ConnectionPoolInfo. getpoolstatuslist public ConnectionPoolStatus[] getpoolstatuslist() throws OZCPException FORCS Co., LTD 11

12 OZ API Developer's Guide ConnectionPool. getpoolinfo public ConnectionPoolInfo getpoolinfo(string alias) throws OZCPException ConnectionPool ConnectionPoolInfo. Argument alias ConnectionPool save public void save() throws OZCPException ConnectionPool. Class ConnectionPoolInfo(oz.framework.db.ConnectionPoolInfo.class). ConnectionPoolStatus(oz.framework.db.ConnectionPoolStatus.class) ConnectionPool. - public final static int OK = 1; ConnectionPool.. Status OK ConnectionPool DRIVER_ERROR ConnectionPool JDBC CONNECTION_ERROR ConnectionPool DBMS public final static int DRIVER_ERROR = -1; public final static int CONNECTION_ERROR = -2; 12 FORCS Co., LTD

13 Sample : ConnectionSample.java package sample; 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 = " "; // IP int PORT = 8003; // TCP /*/ // Servlet String URL = " //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); /**/ // (addpool) ConnectionPoolInfo poolinfo = new ConnectionPoolInfo(); poolinfo.setalias("forcs"); // poolinfo.setvendor("mssql"); // ( MSSQL) poolinfo.setserveraddress(" ");// IP poolinfo.setportno(1433); // poolinfo.setdbname("db"); // poolinfo.setuser("admin"); // poolinfo.setpassword("admin"); // poolinfo.setmaxconns(20); // poolinfo.setinitconns(1); // FORCS Co., LTD 13

14 OZ API Developer's Guide poolinfo.settimeout(5); conpool.addpool(poolinfo); // // (getpoolinfo) poolinfo = conpool.getpoolinfo("forcs"); poolinfo._print(system.out); // (removepool) String conpoolname = "forcs"; // conpool.removepool(conpoolname); // ConnectionPoolInfo (getpoolinfolist) ConnectionPoolInfo[] poolinfolist = conpool.getpoolinfolist(); for (int i = 0; i < poolinfolist.length; i++) { poolinfolist[i]._print(system.out); // 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(); // (save) conpool.save(); catch(exception e) { e.printstacktrace(); 14 FORCS Co., LTD

15 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) Argument url ip port id Servlet URL ex) String url = " Daemon IP ex) String ip = " "; Daemon ex) int port = 8003; ex) String id = "admin"; FORCS Co., LTD 15

16 OZ API Developer's Guide 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". Argument 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. :,. 16 FORCS Co., LTD

17 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 = " "; // 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++) { String name = (String)vec.elementAt(i); System.out.println(name + "=" + p.getproperty(name)); FORCS Co., LTD 17

18 OZ API Developer's Guide catch (Exception e) { e.printstacktrace(); 18 FORCS Co., LTD

19 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) Argument url ip port Servlet URL ex) String url = " Daemon IP ex) String ip = " "; Daemon ex) int port = 8003; FORCS Co., LTD 19

20 OZ API Developer's Guide 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. Argument filename setconfigure public void setconfigure(string logs) throws OZCPException. Argument logs, "key=value" ex) String logs="priority=debug" ex) String logs="console.layout=%r[%t]%p%c{1%x-%m%n 20 FORCS Co., LTD

21 setpriority public void setpriority(string p) throws OZCPException.(INFO, DEBUG, ERROR) Argument 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 = " "; // IP int PORT = 8003; // TCP // Servlet String URL = " //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); // (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"; //. log.downloadlog(filename); FORCS Co., LTD 21

22 OZ API Developer's Guide catch(exception e) { e.printstacktrace(); 22 FORCS Co., LTD

23 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 getozd(string item, String category, Hashtable formparam, Hashtable odiparam, boolean memoallowed, String password, String id, String pw, HttpServletRequest request) 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 saveozd(string filename, String item, String category, String[] urls) void saveozu(string filename, String item, String category, String[] urls) Constructor Detail FORCS Co., LTD 23

24 OZ API Developer's Guide //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) Argument url ip port id pw bautologin useusl Servlet URL ex) String url = " Daemon IP ex) String ip = " "; 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 Argument public InputStream getozd(string item, String category, String[] urls) throws OZCPException SDM OZD. OZD urls. : API DM_TYPE="Momory", FetchType="Batch".. item ( OZR ) category 24 FORCS Co., LTD

25 urls OZD URL getozd protected final InputStream getozd(string item, String category, Hashtable formparam, Hashtable odiparam, boolean memoallowed, String password, String id, String pwd, HttpServletRequest request) throws Exception OZD, OZD.,. : "RequestOZDSample.java". : API DM_TYPE="MEMORY", FetchType="BATCH".. Argument item category formparam odiparam memoallowed password id pw request ( OZR ) : Hashtable (String), (String ). ODI : ODI Hashtable ODI(String), (Hashtable), Hashtable (String), (String). OZD OZD HttpServletRequest getozu public InputStream getozu(string item, String category, String[] urls) throws OZCPException FORCS Co., LTD 25

26 OZ API Developer's Guide SDM OZU. : API DM_TYPE="Momory", FetchType="Batch".. : "FetchUnit" "DM_PER_DATAMODULE". Argument item category urls ( OZA ) OZU URL addodiparameter public void addodiparameter(string odiname, String key, String value) SDM ODI ODI. ODI ODI. odiname ODI Argument key value ODI ODI addodiparameter public void addodiparameter(string odiname, String item, String category, Hashtable paramhash) throws IllegalArgumentException SDM ODI ODI. ODI ODI. ODI SDM SDM. Argument odiname item category paramhash ODI ODI ODI Key, Value Hashtable : OZU paramhash 26 FORCS Co., LTD

27 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.. Argument key value addapplicationparameter Argument public void addapplicationparameter(string key, String value) SDM. ODI ODI ODI. key ODI value ODI saveozd public void saveozd(string filename, String item, String category, String[] urls) throws OZCPException OZD. : API DM_TYPE="Momory", FetchType="Batch".. Argument filename item category Urls OZD (.ozr) (.ozr) OZD URL FORCS Co., LTD 27

28 OZ API Developer's Guide saveozu public void saveozu(string filename, String item, String category, String[] urls) throws OZCPException OZU. : API DM_TYPE="Momory", FetchType="Batch".. : "FetchUnit" "DM_PER_DATAMODULE". Argument filename item category Urls OZU (.oza) (.oza) OZU URL Sample : ModuleSample.java package sample; import java.io.*; import oz.framework.api.module; import org.apache.log4j.*; public class ModuleSample { public static void main(string[] args) { BasicConfigurator.configure(); // OZServer Info. //* // Daemon String IP = " "; // IP int PORT = 8003; // TCP /*/ // Servlet String URL = " /**/ // User Info. String ID = "admin"; //default String PWD = "admin"; //default Module module = null; InputStream stream = null; try { 28 FORCS Co., LTD

29 1"); 2"); //* // Daemon module = new Module(IP, PORT, ID, PWD, false, false); /*/ // Servlet module = new Module(URL, ID, PWD, false, false); /**/ //module.addodiparameter(" 100 ", "rowcount", "40000"); // module.addparameter("server", " "); // module.addparameter("port", "8003"); // module.addparameter("reportname", "// 100.ozr"); // ozd //stream = module.getozd(" 100.ozr", "/"); //FileOutputStream out = new FileOutputStream("D:/TEST_OZD.ozd"); // saveozd(file name, item name, category name) //module.saveozd("d:/test_ozd.ozd", " 100.ozr", "/" ); //out.flush(); //out.close(); // // OZD // set form parameters module.addparameter("form_param1", "COCO 1"); module.addparameter("form_param2", "COCO 2"); // set odi parameters module.addodiparameter("ozp_param", "ODI_PARAM1", " ODI module.addodiparameter("ozp_param", "ODI_PARAM2", " ODI module.addodiparameter("ozp_db", "condition", "KIA"); String[] urls = { " " "ozp://img/netiq.gif", // ozp:// image "ozp://img/credos.gif", // ozp:// image - table "ozp://img/enterprise.gif", // ozp:// image - table "ozp://img/sephia.gif" // ozp:// image - table ; module.setpassword("1234"); module.setmemoallowed(true); module.saveozd("d:/ozp_test01.ozd", "OZP_TEST.ozr", "/", urls); catch(exception e) { e.printstacktrace(); FORCS Co., LTD 29

30 OZ API Developer's Guide Sample : RequestOZDSample.java 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); 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(); 30 FORCS Co., LTD

31 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 { InputStream stream = null; try { // Info. String _ITEM = "parameter_test.ozr"; String _CATEGORY = "/"; boolean _MEMOALLOW = true; String _PASSWORD = "1234"; String _UID = "admin"; String _PWD = "admin"; FORCS Co., LTD 31

32 OZ API Developer's Guide //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); FileOutputStream out = new FileOutputStream(filename); copy(stream, out); out.flush(); out.close(); catch(exception e) { e.printstacktrace(); throw e; finally { if(stream!= null) { try { 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; 32 FORCS Co., LTD

33 Sample : ModuleOZUSample.java package sample; import java.io.*; import oz.framework.api.module; import org.apache.log4j.*; import java.util.hashtable; public class ModuleOZUSample{ public static void main(string[] args){ BasicConfigurator.configure(); // OZServer Info. String IP = " "; // IP int PORT = 8003; // TCP // User Info. String ID = "admin"; //default String PWD = "admin"; //default Module module = null; InputStream stream = null; try{ module = new Module(IP, PORT, ID, PWD, false, /*usl*/ false); //ozu module.addapplicationparameter("odi.fetchunit", "DM_PER_DATAMODULE"); module.addapplicationparameter("odi.odinames", "sample"); module.addapplicationparameter("odi.sample.pcount", "1"); module.addapplicationparameter("odi.sample.args1", "deptid=501"); Hashtable hash = new Hashtable(); hash.put("deptid", "501"); String[] urls = { " // paramhash NULL addapplication Parameter //. module.addodiparameter("sample", "sample.odi", "/sample", null); module.addodiparameter("sample", "sample.odi", "/sample", hash); //ozu, oza,, URL module.saveozu("d:/ozu.ozu", "sample.oza", "/sample", urls); catch(exception e){ e.printstacktrace(); FORCS Co., LTD 33

34 OZ API Developer's Guide 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) Argument url ip port Servlet URL ex) String url = " Daemon IP ex) String ip = " "; Daemon ex) int port = 8003; 34 FORCS Co., LTD

35 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 35

36 OZ API Developer's Guide Class MemoryStatus(oz.server.monitor.MemoryStatus) Server System. 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. //* // Daemon String IP = " "; // IP int PORT = 8003; // TCP /*/ 36 FORCS Co., LTD

37 // Servlet String URL = " //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) { e.printstacktrace(); FORCS Co., LTD 37

38 OZ API Developer's Guide Constructor Summary Repository(String ip, int port, String id, String pw, boolean bautologin, boolean useusl) Repository(String url, String id, String pw, boolean bautologin, boolean useusl) Method Summary // Configuration public void setrepositoryconfig(sortproperties prop) public SortProperties getrepositoryconfig() // User public int createuser(string username, String pwd, int gid, String description) public void deleteuser(int uid) public void updateusername(int uid, String username) public String getusernamebyid(int uid) // UserLogin public void disableuserlogin(string username) public void updatelogindefault(int logindval) public void enableuserlogin(string username) public void userlogout(int uid) public boolean isuserlogin(int uid) public boolean logintoserver() // UserPwd public boolean checkuserpwd(int uid, String pwd) 38 FORCS Co., LTD

39 public void updateuserpwd(int uid, String pwd) // UserDesc public void updateuserdescription(int uid, String description) public String getuserdescription(int uid) // UserID public int getgroupidofuser(int uid) public int getuseridbyname(string username) public void updategroupidofuser(int gid, int uid) // UserList public OZRepositoryUser[] getuserlist() public OZRepositoryUser[] getuserlistingroup(int gid) public OZRepositoryUser[] getuserlistauthtoitem(int itemid, byte perm) public OZRepositoryUser[] getuserlistauthtocategory(int categoryid, byte perm) // Group public int creategroup(string groupname, int uppergid) public void deletegroup(int gid) public void updateuppergroupid(int gid, int uppergid) public void updategroupname(int groupid, String groupname) // GroupAdmin public void updateusergroupadmin(int uid, int gid) public boolean isusergroupadmin(int uid, int gid) // GroupList public OZRepositoryGroup[] getgrouplistingroup(int gid) public OZRepositoryGroup getgroupinfo(int gid) public OZRepositoryGroup[] getgrouplistauthtoitem(int itemid, byte perm) public OZRepositoryGroup[] getgrouplistauthtocategory(int categoryid, byte perm) FORCS Co., LTD 39

40 OZ API Developer's Guide // Item public int createitem(string itemname, int itemtype, String itemdescription, int cid, InputStream itemin) public int createitem(string itemname, int itemtype, String itemdescription, String categoryname, InputStream itemin) public int getitemid(string itemname, int itemtype, int cid) public int getitemid(string itemname, int itemtype, String cname) public void deleteitem(int itemid) public InputStream getitem(int itemid) public void updateitemname(int itemid, String itemname) public InputStream getdirectitem(string itemname, int itemtype, String categoryname) public InputStream getdirectitem(string itemname, int itemtype, String categoryname, boolean compresseditem) public void updateitem(int itemid, InputStream input) public void updatedirectitem(string itemname, int itemtype, String categoryname, InputStream input) public boolean hasiteminrepository(string itemname, int itemtype, String categoryname) // InfoByItem public int getcategoryidofitem(int itemid) public void updatecategoryidofitem(int cid, int itemid) // ItemList public OZRepositoryItem[] getitemlist() public OZRepositoryItem getiteminfo(int itemid) public OZRepositoryItem[] getitemlistincategory(int cid) public OZRepositoryItem[] getitemlistincategory(string cname) public OZRepositoryItem[] getitemlistincategory(int cid, int uid, byte perm) public OZRepositoryItem[] getitemlistincategory(string categoryname, int uid, byte perm) public OZRepositoryItem[] getitemlistincategoryauthgroup(int cid, int gid, byte perm) 40 FORCS Co., LTD

41 public OZRepositoryItem[] getitemlistincategoryauthgroup(string categoryname, int gid, byte perm) public OZRepositoryItem[] getitemlistauthtouser(int uid, byte perm) public OZRepositoryItem[] getitemlistauthtogroup(int gid, byte perm) // Category public int createcategory(string categoryname, int uppercid) public int createcategory(string categorypath) public void deletecategory(int cid) public int getcategoryid(string fullpath) public void updateuppercategoryid(int cid, int uppercid) public void updatecategoryname(int cid, String categoryname) public int getitemcountincategory(int cid) public OZRepositoryCategory[] getcategorylistincategory(int cid) public OZRepositoryCategory[] getcategorylistincategory(int cid, int uid, byte perm) public OZRepositoryCategory[] getcategorylistincategoryauthgroup(int cid, int gid, byte perm) public OZRepositoryCategory getcategoryinfo(int cid) public OZRepositoryCategory[] getcategorylistauthtouser(int uid, int cid, byte perm) public OZRepositoryCategory[] getcategorylistauthtogroup(int gid, int cid, byte perm) // CheckInOut public void checkoutitem(int itemid, int uid, String checkoutfolder) public void undocheckoutitem(int itemid, int uid) public void checkinitem(boolean keepchkout, int itemid, int uid, InputStream itemin) public boolean ischeckoutuser(int itemid, int uid) // History public void rollbackitem(int itemid, int itemversion) public InputStream getspecifiedversionitem(int itemid, int itemversion) public OZRepositoryHistory[] gethistoryitemlist(int itemid) FORCS Co., LTD 41

42 OZ API Developer's Guide public void clearhistoryitem(int itemid, int itemversion) Constructor Detail //Daemon - TCP Server public Repository(String ip, int port, String id, String pw, boolean bautologin, boolean useusl) //Servlet - HTTP Server public Repository(String url, String id, String pw, boolean bautologin, boolean useusl) Argument url ip port id pw bautologin useusl Servlet URL ex) String url = " Daemon IP ex) String ip = " "; Daemon ex) int port = 8003; ex) String id = "admin"; ex) String pw = "admin"; ex) boolean bautologin = true; USL ex) boolean useusl = false; Method Detail // Configuration setrepositoryconfig public void setrepositoryconfig(sortproperties prop) throws OZCPException 42 FORCS Co., LTD

43 . "repository.properties", Key. Argument prop getrepositoryconfig public SortProperties getrepositoryconfig() throws OZCPException. "repository.properties", Key. - 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"); FORCS Co., LTD 43

44 OZ API Developer's Guide // User createuser public int createuser(string username, String pwd, int gid, String description) throws OZCPException, ID. Argument username pwd gid description ID deleteuser public void deleteuser(int uid) throws OZCPException ID. Argument uid ID updateusername public void updateusername(int uid, String username) throws OZCPException ID. Argument uid username ID getusernamebyid public String getusernamebyid(int uid) throws OZCPException ID. Argument uid ID // UserLogin disableuserlogin public void disableuserlogin(string username) throws OZCPException. Argument username 44 FORCS Co., LTD

45 updatelogindefault public void updatelogindefault(int logindval) throws OZCPException ID. Argument logindval ID enableuserlogin public void enableuserlogin(string username) throws OZCPException. Argument username userlogout public void userlogout(int uid) throws OZCPException ID,. Argument uid ID isuserlogin public boolean isuserlogin(int uid) throws OZCPException ID,. Argument uid ID logintoserver public boolean logintoserver() throws OZCPException. // UserPwd checkuserpwd public boolean checkuserpwd(int uid, String pwd) throws OZCPException. Argument uid pwd ID FORCS Co., LTD 45

46 OZ API Developer's Guide updateuserpwd public void updateuserpwd(int uid, String pwd) throws OZCPException ID. Argument uid pwd ID // UserDesc updateuserdescription public void updateuserdescription(int uid, String description) throws OZCPException ID. Argument uid description ID getuserdescription public String getuserdescription(int uid) throws OZCPException ID. Argument uid ID // UserID getgroupidofuser public int getgroupidofuser(int uid) throws OZCPException ID ID. Argument uid ID ID getuseridbyname public int getuseridbyname(string username) throws OZCPException ID. Argument username ID 46 FORCS Co., LTD

47 updategroupidofuser public void updategroupidofuser(int gid, int uid) throws OZCPException ID. Argument gid uid ID ID ID // UserList getuserlist public OZRepositoryUser[] getuserlist() throws OZCPException. getuserlistingroup public OZRepositoryUser[] getuserlistingroup(int gid) throws OZCPException ID. Argument gid ID getuserlistauthtoitem public OZRepositoryUser[] getuserlistauthtoitem(int itemid, byte perm) throws OZCPException ID perm. Argument itemid perm ID getuserlistauthtocategory public OZRepositoryUser[] getuserlistauthtocategory(int categoryid, byte perm) throws OZCPException ID perm. Argument categoryid perm ID FORCS Co., LTD 47

48 OZ API Developer's Guide // Group creategroup public int creategroup(string groupname, int uppergid) throws OZCPException, ID. Argument groupname uppergid ID deletegroup public void deletegroup(int gid) throws OZCPException ID. Argument gid ID updategroupname public void updategroupname(int gid, String groupname) throws OZCPException ID. Argument gid groupname ID // GroupAdmin updateusergroupadmin public void updateusergroupadmin(int uid, int gid) throws OZCPException ID. Argument uid gid ID ID isusergroupadmin public boolean isusergroupadmin(int uid, int gid) throws OZCPException ID. Argument uid ID 48 FORCS Co., LTD

49 gid ID // GroupList getgrouplistingroup public OZRepositoryGroup[] getgrouplistingroup(int gid) throws OZCPException ID. Argument gid ID getgroupinfo public OZRepositoryGroup getgroupinfo(int gid) throws OZCPException ID. Argument gid ID getgrouplistauthtoitem Argument public OZRepositoryGroup[] getgrouplistauthtoitem(int itemid, byte perm) throws OZCPException ID perm. itemid ID perm getgrouplistauthtocategory Argument public OZRepositoryGroup[] getgrouplistauthtocategory(int categoryid, byte perm) throws OZCPException ID perm. categoryid ID perm FORCS Co., LTD 49

50 OZ API Developer's Guide // Item createitem public int createitem(string itemname, int itemtype, String itemdescription, int cid, InputStream itemin) throws OZCPException public int createitem(string itemname, int itemtype, String itemdescription, String categoryname, InputStream itemin) throws OZCPException, ID. Argument itemname itemtype itemdescription cid itemin categoryname ID getitemid public int getitemid(string itemname, int itemtype, int cid) throws OZCPException public int getitemid(string itemname, int itemtype, String cname) throws OZCPException ID. Argument itemname itemtype cid cname ID deleteitem public void deleteitem(int itemid) throws OZCPException. Argument itemid ID 50 FORCS Co., LTD

51 getitem public InputStream getitem(int itemid) throws OZCPException ID. Argument itemid ID updateitemname public void updateitemname(int itemid, String itemname) throws OZCPException ID. Argument itemid itemname ID getdirectitem public InputStream getdirectitem(string itemname, int itemtype, String categoryname) throws OZCPException public InputStream getdirectitem(string itemname, int itemtype, String categoryname, boolean compresseditem) throws OZCPException. Argument itemname itemtype categoryname compresseditem updateitem public void updateitem(int itemid, InputStream input) throws OZCPException ID. Argument itemid input ID updatedirectitem public void updatedirectitem(string itemname, int itemtype, String categoryname, InputStream input) throws OZCPException FORCS Co., LTD 51

52 OZ API Developer's Guide ID. Argument itemname itemtype categoryname input hasiteminrepository public boolean hasiteminrepository(string itemname, int itemtype, String categoryname) throws OZCPException. Argument itemname itemtype categoryname // InfoByItem getcategoryidofitem public int getcategoryidofitem(int itemid) throws OZCPException ID ID. Argument itemid ID updatecategoryidofitem public void updatecategoryidofitem(int cid, int itemid) throws OZCPException ID. Argument cid itemid ID ID // ItemList getitemlist public OZRepositoryItem[] getitemlist() throws OZCPException. 52 FORCS Co., LTD

53 getiteminfo public OZRepositoryItem getiteminfo(int itemid) throws OZCPException ID. Argument itemid ID getitemlistincategory public OZRepositoryItem[] getitemlistincategory(int cid) throws OZCPException public OZRepositoryItem[] getitemlistincategory(string categoryfullpath) throws OZCPException public OZRepositoryItem[] getitemlistincategory(int cid, int uid, byte perm) throws OZCPException public OZRepositoryItem[] getitemlistincategory(string categoryfullpath, int uid, byte perm) throws OZCPException. Argument cid categoryfullpath uid perm ID ID getitemlistincategoryauthgroup public OZRepositoryItem[] getitemlistincategoryauthgroup(int cid, int gid, byte perm) throws OZCPException public OZRepositoryItem[] getitemlistincategoryauthgroup (String categoryfullpath, int gid, byte perm) throws OZCPException. Argument cid gid perm categoryfullpath ID ID FORCS Co., LTD 53

54 OZ API Developer's Guide getitemlistauthtouser public OZRepositoryItem[] getitemlistauthtouser(int uid, byte perm) throws OZCPException ID perm. Argument uid perm ID getitemlistauthtogroup public OZRepositoryItem[] getitemlistauthtogroup(int gid, byte perm) throws OZCPException ID perm. Argument gid perm ID // Category createcategory public int createcategory(string categoryname, int uppercid) throws OZCPException, ID. Argument categoryname uppercid ID createcategory public int createcategory(string categorypath) throws OZCPException, ID. Argument categorypath deletecategory public void deletecategory(int cid) throws OZCPException ID. 54 FORCS Co., LTD

55 Argument cid ID getcategoryid public int getcategoryid(string fullpath) throws OZCPException ID. Argument fullpath ID updateuppercategoryid public void updateuppercategoryid(int cid, int uppercid) throws OZCPException ID. Argument cid uppercid ID ID updatecategoryname public void updatecategoryname(int cid, String categoryname) throws OZCPException ID. Argument cid categoryname ID getitemcountincategory public int getitemcountincategory(int cid) throws OZCPException. Argument cid ID getcategorylistincategory public OZRepositoryCategory[] getcategorylistincategory(int cid) throws OZCPException public OZRepositoryCategory[] getcategorylistincategory(int cid, int uid, byte perm) throws OZCPException FORCS Co., LTD 55

56 OZ API Developer's Guide. Argument cid uid perm ID ID getcategoryinfo public OZRepositoryCategory getcategoryinfo(int cid) throws OZCPException. Argument cid ID getcategorylistauthtouser public OZRepositoryCategory[] getcategorylistauthtouser(int uid, int cid, byte perm) throws OZCPException ID perm. Argument uid cid perm ID ID getcategorylistauthtogroup public OZRepositoryCategory[] getcategorylistauthtogroup(int gid, int cid, byte perm) throws OZCPException ID perm. Argument gid cid perm ID ID // CheckInOut checkoutitem public void checkoutitem(int itemid, int uid, String checkoutfolder) throws OZCPException ID. 56 FORCS Co., LTD

57 Argument itemid uid checkoutfolder ID ID undocheckoutitem public void undocheckoutitem(int itemid, int uid) throws OZCPException ID. Argument itemid uid ID ID checkinitem public void checkinitem(boolean keepchkout, int itemid, int uid, InputStream itemin) throws OZCPException ID. Argument keepchkout itemid uid itemin ID ID ischeckoutuser public boolean ischeckoutuser(int itemid, int uid) throws OZCPException. Argument itemid uid ID ID // History getspecifiedversionitem public InputStream getspecifiedversionitem(int itemid, int itemversion) throws OZCPException ID. Argument itemid itemversion ID FORCS Co., LTD 57

58 OZ API Developer's Guide gethistoryitemlist public OZRepositoryHistory[] gethistoryitemlist(int itemid) throws OZCPException. Argument itemid ID clearhistoryitem public void clearhistoryitem(int itemid, int itemversion) throws OZCPException. Argument itemid itemversion ID rollbackitem public void rollbackitem(int itemid, int itemversion) throws OZCPException. Argument itemid itemversion ID Class OZRepositoryUser(oz.framework.repository.OZRepositoryUser),,,,. - getusername public String getusername(). getuserid public int getuserid() ID. 58 FORCS Co., LTD

59 getgrouplist public java.util.vector getgrouplist(). getdescription public String getdescription(). getpassword public String getpassword(). getpermission public byte getpermission(). 0 : None( ) 1 : View( ) 3 : Read( ) 7 : Write( ) getdirectpermission public byte getdirectpermission(). getindirectpermission public byte getindirectpermission(). getisloggedin public boolean getisloggedin(). getsessionid public int getsessionid() FORCS Co., LTD 59

60 OZ API Developer's Guide ID. getisloginenabled public boolean getisloginenabled(). OZRepositoryUser[](oz.framework.repository.OZRepositoryUser[]). OZRepositoryGroup(oz.framework.repository.OZRepositoryGroup),,,,. - getgroupname public String getgroupname(). getgroupid public int getgroupid() ID. getparentgroupid public int getparentgroupid() ID. getgroupadminlist public java.util.vector getgroupadminlist(). getdirectpermission public byte getdirectpermission(). 60 FORCS Co., LTD

61 getindirectpermission public byte getindirectpermission(). getpermission public byte getpermission(). getdescription public String getdescription(). getfullpath public String getfullpath(). OZRepositoryGroup[](oz.framework.repository.OZRepositoryGroup[]). OZRepositoryItem(oz.framework.repository.OZRepositoryItem),,,,. - getitemname public String getitemname(). getitemid public int getitemid() ID. getitemtype public int getitemtype() FORCS Co., LTD 61

62 OZ API Developer's Guide : ODI_FILE : OZR_FILE : SDM_FILE : USDM_FILE : OZD_FILE : UIMG_FILE getdescription public String getdescription(). getcheckoutuserid public int getcheckoutuserid() ID. getcheckoutusername public String getcheckoutusername(). getcheckoutfolder public String getcheckoutfolder(). getupdatetime public java.util.date getupdatetime(). getischeckedout public boolean getischeckedout(). getdirectpermission public byte getdirectpermission() 62 FORCS Co., LTD

63 . getindirectpermission public byte getindirectpermission(). getadminlist public java.util.vector getadminlist(). getcategorylist public java.util.vector getcategorylist(). OZRepositoryItem[](oz.framework.repository.OZRepositoryItem[]). OZRepositoryCategory(oz.framework.repository.OZRepositoryCategory). - getcategoryname public String getcategoryname(). getcategoryid public int getcategoryid() ID. getparentcategoryid public int getparentcategoryid() ID. FORCS Co., LTD 63

64 OZ API Developer's Guide getcategoryadminlist public java.util.vector getcategoryadminlist(). getdirectpermission public byte getdirectpermission(). getindirectpermission public byte getindirectpermission(). getpermission public byte getpermission(). getdescription public String getdescription(). getfullpath public String getfullpath(). OZRepositoryCategory[](oz.framework.repository.OZRepositoryCategory[] ). OZRepositoryHistory(oz.framework.repository.OZRepositoryHistory). - gethistoryitempath public String gethistoryitempath() 64 FORCS Co., LTD

65 . gethistoryitemversion public int gethistoryitemversion(). gethistorydate public String gethistorydate(). gethistorycheckinuser public String gethistorycheckinuser(). OZRepositoryHistory[](oz.framework.repository.OZRepositoryHistory[]). Sample : RepositorySample.java package sample; import oz.framework.api.repository; import oz.util.sortproperties; import oz.framework.repository.ozrepositoryitem; import oz.framework.repository.ozrepositoryuser; import oz.framework.repository.ozrepositoryhistory; import oz.framework.repository.ozrepositorygroup; import oz.framework.repository.ozrepositorycategory; import oz.framework.cp.ozcpexception; import oz.dm.hc.hcdatamodule; import oz.dm.dmconst; import java.io.*; import java.net.*; import org.apache.log4j.*; import java.io.ioexception; import java.util.*; FORCS Co., LTD 65

66 OZ API Developer's Guide public class RepositorySample { private static Repository repository = null; public static void main(string[] args) { BasicConfigurator.configure(); // OZServer Info. //* // Daemon String IP = " "; // IP int PORT = 8003; // TCP /*/ // Servlet String URL = " //Servlet URL /**/ // User Info. String ID = "admin"; //default String PWD = "admin"; //default try { // Daemon repository = new Repository(IP, PORT, ID, PWD, false, false); /*/ // Servlet repository = new Repository(URL, ID, PWD, false, false); /**/ repositoryconfiguration(); usertest(); grouptest(); itemtest(); catch (Exception e) { e.printstacktrace(); private static void repositoryconfiguration() throws Exception { //Repository configuration. System.out.println("Repository.getRepositoryConfig()"); SortProperties props = repository.getrepositoryconfig(); props.list(system.out); //Repository Configuration SortProperties prop = new SortProperties(); prop.setproperty("repository_type", "RDB"); //RDB, FILESYSTEM, USER prop.setproperty("repository_file_path", "c:/temp_repository"); 66 FORCS Co., LTD

67 prop.setproperty("repository_item_number_per_directory", "100"); prop.setproperty("repository_history_item_valid_days", "20"); //repository.setrepositoryconfig(prop); private static void historytest(int itemid) throws Exception { final int itemversion = 0; // itemversion, itemid System.out.println("Repository.getSpecifiedVersionItem( int itemid, int itemversion)"); InputStream in = repository.getspecifiedversionitem( itemid, itemversion); download(repository.getspecifiedversionitem(itemid, itemversion), "getspecifiedversionitem" + repository.getiteminfo(itemid).getitemname()); // itemid System.out.println("Repository.getHistoryItemList(int itemid)"); OZRepositoryHistory[] historyinfolist = repository.gethistoryitemlist(itemid); if (historyinfolist!= null) { for (int i = 0; i < historyinfolist.length; i++) { OZRepositoryHistory historyinfo = historyinfolist[i]; System.out.println("HistoryDate : " + historyinfo.gethistorydate()); System.out.println("HistoryItemPath : " + historyinfo.gethistoryitempath()); System.out.println("HistoryItemVersion : " + historyinfo.gethistoryitemversion()); // Item version history. // history // System.out.println("Repository.clearHistoryItem( // int itemid, int itemversion)"); // repository.clearhistoryitem(itemid, itemversion); // Item itemversion. System.out.println("Repository.rollBackItem( int itemid, int itemversion)"); repository.rollbackitem(itemid, itemversion); private static void checkinouttest(int itemid) throws Exception{ final int uid = repository.getuseridbyname("admin"); String filename = "check in out test.txt"; FORCS Co., LTD 67

68 OZ API Developer's Guide createfile(filename); // User(uid) Item(itemid) checkout. System.out.println("Repository.checkOutItem( int itemid, int uid, String checkoutfolder)"); String checkoutfolder = ".."; repository.checkoutitem(itemid, uid, checkoutfolder); // uid itemid checkout, checkout cancel. // System.out.println("Repository.undoCheckOutItem( // int itemid, int uid)"); // repository.undocheckoutitem(itemid, uid); // item checkin. keepchkout check-in check-out System.out.println( "Repository.checkInItem(boolean keepchkout, int itemid, int uid, InputStream item_in)"); boolean keepchkout = false; FileInputStream in = new FileInputStream(fileName); repository.checkinitem(keepchkout, itemid, uid, in); in.close(); // uid user itemid check out. System.out.println("Repository.isCheckOutUser(int itemid, int uid)"); System.out.println("Does UID[" + uid + "] check out the item[" + itemid + "]? " + repository.ischeckoutuser(itemid, uid)); removefile(filename); private static void categorytest() throws Exception { final int uid = repository.getuseridbyname("admin"); int gid = repository.getgroupidofuser(uid); int cid, parent_cid; final byte authread = 0x02, authview = 0x01; String categoryname = null; OZRepositoryCategory[] categoryinfolist = null; //. System.out.println("Repository.createCategory(String categorypath)"); categoryname = "/Poultry"; cid = repository.createcategory(categoryname); System.out.println( "categorypath [categoryid] : " + categoryname + "[" + cid + "]"); // upper_cid category_name. System.out.println("Repository.createCategory(String category_name, int upper_cid)"); String childcategoryname = "Chickens"; parent_cid = cid; 68 FORCS Co., LTD

69 cid = repository.createcategory(childcategoryname, parent_cid); System.out.println("New new_category_name [new_categoryid] : " + childcategoryname + "[" + cid + "]"); // cid. System.out.println("Repository.deleteCategory(int cid)"); repository.deletecategory(cid); cid = parent_cid; // Full Path. System.out.println("Repository.getCategoryID(String fullpath)"); System.out.println("the full Path [" + categoryname + "]'s category ID : " + repository.getcategoryid(categoryname)); //. System.out.println("Repository.updateCategoryName(int cid, String categoryname)"); categoryname = "Fishes"; System.out.println("Before Update CategoryName : " + (repository.getcategoryinfo(cid)).getcategoryname()); repository.updatecategoryname(cid, categoryname); System.out.println("After Update CategoryName : " + (repository.getcategoryinfo(cid)).getcategoryname()); //. System.out.println("Repository.updateUpperCategoryId( int cid, int uppercid)"); int new_cid = repository.createcategory("/category Test"); System.out.println("Before Update UpperCategoryID : " + repository.getcategoryinfo(cid)).getparentcategoryid()); repository.updateuppercategoryid(cid, new_cid); System.out.println("After Update UpperCategoryID : " + (repository.getcategoryinfo(cid)).getparentcategoryid()); // cid. System.out.println("Repository.getItemCountInCategory(String cid)"); System.out.println("Item count in the category id [" + cid + "] : " + repository.getitemcountincategory(cid) + ""); // cid. System.out.println("Repository.getCategoryListInCategory(int cid) "); categoryinfolist = repository.getcategorylistincategory(0); showcategoryinfolist(categoryinfolist); // id //. System.out.println("Repository.getCategoryListInCategory( int categoryid, int userid, byte perm)"); categoryinfolist = repository.getcategorylistincategory(cid, uid, FORCS Co., LTD 69

70 OZ API Developer's Guide authview); showcategoryinfolist(categoryinfolist); // gid //. System.out.println( "Repository.getCategoryListInCategoryAuthGroup(int categoryid, int groupid, byte perm)"); categoryinfolist = repository.getcategorylistincategoryauthgroup(cid, gid, authview); showcategoryinfolist(categoryinfolist); // id. System.out.println("Repository.getCategoryInfo(int cid))"); showcategory(repository.getcategoryinfo(cid)); // //. System.out.println( "Repository.getCategoryListAuthToUser(int userid,int categoryid, byte perm) "); categoryinfolist = repository.getcategorylistauthtouser(uid, cid, authread); showcategoryinfolist(categoryinfolist); // // System.out.println("Repository.getCategoryListAuthToGroup(int groupid, int categoryid, byte perm) "); categoryinfolist = repository.getcategorylistauthtogroup(gid, cid, authread); showcategoryinfolist(categoryinfolist); repository.deletecategory(cid); repository.deletecategory(new_cid); private static void showcategoryinfolist( OZRepositoryCategory[] categorylist) { if(categorylist == null) return; for(int i=0; i < categorylist.length; i++) { showcategory(categorylist[i]); private static void showcategory(ozrepositorycategory c) { System.out.println("CategoryId : " + c.getcategoryid()); 70 FORCS Co., LTD

71 System.out.println("CategoryName : " + c.getcategoryname()); System.out.println("CategoryUpperId : " + c.getparentcategoryid()); System.out.println("Permission : " + c.getpermission()); private static void itemlisttest(int itemid) throws Exception { FileOutputStream fos = null; InputStream in = null; OZRepositoryItem[] iteminfolist = null; OZRepositoryUser[] userinfolist = null; OZRepositoryCategory[] categoryinfolist = null; OZRepositoryGroup[] grouplist = null; final String username = "admin"; String itemname = repository.getiteminfo(itemid).getitemname(); int uid = repository.getuseridbyname(username); int cid = repository.getcategoryidofitem(itemid); int gid = repository.getgroupidofitem(itemid); String categoryname = "/" + repository.getcategoryinfo(cid).getcategoryname(); final byte authrw = 0x07, authread = 0x02; byte[] buf = null; /****************************************************************************. //. System.out.println("Repository.getItemList()"); iteminfolist = repository.getitemlist(); showiteminfolist(iteminfolist); ****************************************************************************/ //. System.out.println("Repository.getItemInfo(int itemid)"); OZRepositoryItem iteminfo = repository.getiteminfo(itemid); showitem(iteminfo); // id. System.out.println("Repository.getItemListInCategory(int cid)"); iteminfolist = repository.getitemlistincategory(cid); showiteminfolist(iteminfolist); //. System.out.println( "Repository.getItemListInCategory(String categoryname)"); iteminfolist = repository.getitemlistincategory(categoryname); showiteminfolist(iteminfolist); // userid //. FORCS Co., LTD 71

72 OZ API Developer's Guide System.out.println( "Repository.getItemListInCategory(String cname,int userid, byte perm)"); iteminfolist = repository.getitemlistincategory(categoryname, uid, authrw); showiteminfolist(iteminfolist); // categoryid userid //. System.out.println("Repository.getItemListInCategory(int cid, int userid, byte perm)"); iteminfolist = repository.getitemlistincategory(cid, uid, authread); showiteminfolist(iteminfolist); // ID GroupID //. System.out.println("Repository.getItemListInCategoryAuthGroup(int cid, int groupid, byte perm)"); iteminfolist = repository.getitemlistincategoryauthgroup(cid, gid, authread); showiteminfolist(iteminfolist); // GroupID //. System.out.println("Repository.getItemListInCategoryAuthGroup + (String categoryname, int groupid, byte perm)"); iteminfolist = repository.getitemlistincategoryauthgroup(categoryname, gid, authread); showiteminfolist(iteminfolist); // uid. System.out.println("Repository.getItemListAuthToUser(int uid, byte perm)"); iteminfolist = repository.getitemlistauthtouser(uid, authread); showiteminfolist(iteminfolist); // gid. System.out.println("Repository.getItemListAuthToGroup(int gid, byte perm)"); iteminfolist = repository.getitemlistauthtogroup(gid, authread); showiteminfolist(iteminfolist); /**************************************************************************** //. System.out.println( "Repository.findItemByItemIndex(String[] itemindex, int[] oper)"); String[] itemindex = {"index test 1", "index test 2", "index test 3"; 72 FORCS Co., LTD

73 int[] oper = {2, 2; //1 => AND, 2 => OR iteminfolist = repository.finditembyitemindex(itemindex, oper); showiteminfolist(iteminfolist); ****************************************************************************/ private static void showiteminfolist(ozrepositoryitem[] iteminfolist) { if(iteminfolist == null) return; System.out.println( "[i]categoryname:itemname:itemid "); OZRepositoryItem item; for(int i=0; i < iteminfolist.length; i++) { item = iteminfolist[i]; Vector v = item.getcategorylist(); Iterator iter = v.iterator(); while(iter.hasnext()) { System.out.println("[" + i + "]" + iter.next() + ":" + item.getitemname() + ":" + item.getitemid()); private static void showitem(ozrepositoryitem item) { Vector v = item.getcategorylist(); Iterator iter = v.iterator(); while(iter.hasnext()) { System.out.println(" " + iter.next() + ":" + item.getitemname() + ":" + item.getitemid()); private static void infobyitemtest(int itemid) throws Exception { // System.out.println("Repository.getCategoryIdOfItem(int itemid)"); System.out.println("the ItemID[" + itemid + "]'s category ID : " + repository.getcategoryidofitem(itemid)); System.out.println( "Repository.updateCategoryIdOfItem(int cid, int itemid)"); int cid = repository.getcategoryidofitem(itemid); System.out.println("Before Update CategoryID : " + repository.getcategoryidofitem(itemid)); repository.updatecategoryidofitem(cid, itemid); System.out.println("After Update CategoryID : " + repository.getcategoryidofitem(itemid)); FORCS Co., LTD 73

74 OZ API Developer's Guide private static void itemtest() throws Exception { final String itemfilename = " 100.odi"; String itemname = itemfilename; String categoryname = "/Item Test"; String itemdescription = "Test of item creation"; final int itemtype = 10000; // OZItemInfo.ODI_FILE int cid = repository.createcategory(categoryname); int itemid; // return. System.out.println( "Repository.createItem(name, type, desc, cid, input_stream)"); itemid = repository.createitem(itemfilename, itemtype, itemdescription, cid, new FileInputStream(itemFileName)); System.out.println("item_name [iid] : " + itemname + "[" + itemid + "]"); // return // System.out.println( // "Repository.createItem(name, type, desc, category_name, // input_stream)"); // itemid = repository.createitem(itemfilename, itemtype, // itemdescription, categoryname, // new FileInputStream(itemFileName)); // System.out.println("item_name [iid] : " + itemfilename + "[" + // itemid + "]"); //,, // ID System.out.println("Repository.getItemId(String item_name, int item_type, Sring categoryname)"); itemid = repository.getitemid(itemname, itemtype, categoryname); System.out.println("Item ID [" + itemid + "]"); //,, id // ID System.out.println( "Repository.getItemId(String item_name, int item_type, int cid)"); itemid = repository.getitemid(itemname, itemtype, cid); System.out.println("Item ID [" + itemid + "]"); //. System.out.println("Repository.getItem(int itemid, int cid)"); System.out.println("Read the item from server and create a new file."); download(repository.getitem(itemid, cid),"getitem" + itemname); 74 FORCS Co., LTD

75 //. System.out.println("Repository.updateItemName(int itemid, String itemname) "); itemname = "Changed item name.odi"; System.out.println("Before Update ItemName : " + (repository.getiteminfo(itemid)).getitemname()); repository.updateitemname(itemid, itemname); System.out.println("After Update ItemName : " + (repository.getiteminfo(itemid)).getitemname()); //. System.out.println("Repository.getDirectItem + (String itemname, int itemtype, String categoryname, boolean compresseditem)"); System.out.println("Read the item from server and create a new file."); boolean compress = true; download(repository.getdirectitem(itemname, itemtype, categoryname, compress), "getdirectitem_compressed" + itemname); //. System.out.println("Repository.getDirectItem(String itemname, int itemtype, String categoryname)"); System.out.println("Read the item from server and create a new file."); download(repository.getdirectitem(itemname, itemtype, categoryname), "getdirectitem_uncompressed" + itemname); FileInputStream fis; /**************************************************************************** //. System.out.println("Repository.updateItem(int itemid, InputStream input)"); fis = new FileInputStream(itemFileName); repository.updateitem(itemid, fis); fis.close(); //. System.out.println( "Repository.updateDirectItem(String itemname, int itemtype, String categoryname, InputStream input)"); fis = new FileInputStream(itemFileName); repository.updatedirectitem(itemname, itemtype, categoryname, fis); fis.close(); ****************************************************************************/ // System.out.println("Repository.hasItemInRepository( String itemname, int itemtype, String categoryname)"); System.out.println("Does item[" + itemname + "] exist in category[" + FORCS Co., LTD 75

76 OZ API Developer's Guide categoryname + "]? " + repository.hasiteminrepository(itemname, itemtype, categoryname)); infobyitemtest(itemid); itemlisttest(itemid); categorytest(); checkinouttest(itemid); historytest(itemid); //. System.out.println("Repository.deleteItem(int itemid)"); repository.deleteitem(itemid); repository.deletecategory(cid); private static void download(inputstream in, String filename) throws Exception { byte[] buf = new byte[in.available()]; in.read(buf); in.close(); FileOutputStream fos = new FileOutputStream(fileName); fos.write(buf); fos.flush(); fos.close(); private static void grouplisttest(int gid) throws Exception { // gid. System.out.println("Repository.getGroupListInGroup(int gid))"); OZRepositoryGroup[] groupinfolist = repository.getgrouplistingroup(0); showgrouplist(groupinfolist); // gid. System.out.println("Repository.getGroupInfo(int gid))"); OZRepositoryGroup groupinfo = repository.getgroupinfo(gid); showgroup(groupinfo); // itemid perm. System.out.println("Repository.getGroupListAuthToItem(int itemid, byte perm)"); String sdmname = "SDM for test.sdm"; final int itemtype = 20002; //OZFrameworkConst.SDM_FILE; createfile(sdmname); int cid = repository.createcategory("/user List Test"); int itemid = repository.createitem(sdmname, itemtype, "", cid, new FileInputStream(sdmName)); 76 FORCS Co., LTD

77 final byte authread = 0x02; groupinfolist = repository.getgrouplistauthtoitem(itemid, authread); showgrouplist(groupinfolist); // categoryid. System.out.println("Repository.getGroupListAuthToCategory( int categoryid, byte perm) "); groupinfolist = repository.getgrouplistauthtocategory(cid, authread); showgrouplist(groupinfolist); repository.deleteitem(itemid); repository.deletecategory(cid); removefile(sdmname); private static void showgrouplist(ozrepositorygroup[] grouplist) { if(grouplist == null) return; for(int i=0; i < grouplist.length; i++) { showgroup(grouplist[i]); private static void showgroup(ozrepositorygroup group) { System.out.println("GroupId : " + group.getgroupid()); System.out.println("GroupName : " + group.getgroupname()); System.out.println("GroupUpperId : " + group.getparentgroupid()); Vector v = group.getgroupadminlist(); showgroupadminusername(v); System.out.println("Permission : " + group.getpermission()); private static void showgroupadminusername(vector v) { Iterator it = v.iterator(); while (it.hasnext()) { System.out.println("GroupAdminUserName : " + it.next()); private static void groupadmintest(int gid) throws Exception{ // Group Admin uid. System.out.println("Repository.updateUserGroupAdmin(int uid, int gid)"); int uid = repository.createuser("test id", " ", gid, ""); System.out.println("Before : "); FORCS Co., LTD 77

78 OZ API Developer's Guide showgroupadminusername(repository.getgroupinfo(gid).getgroupadminlist ()); repository.updateusergroupadmin(uid, gid); System.out.println("After : "); showgroupadminusername(repository.getgroupinfo(gid).getgroupadminlist() ); // uid gid group admin. System.out.println("Repository.isUserGroupAdmin(int uid, int gid)"); System.out.println("Is this user[" + uid + "] a group admin in Group[" + gid + "]? " + repository.isusergroupadmin(uid, gid)); repository.deleteuser(uid); private static void grouptest() throws Exception { // upper_gid System.out.println("Repository.createGroup(String group_name, int upper_gid)"); String groupname = "forcs"; int root_gid = 0; int parent_gid = root_gid; int gid = repository.creategroup(groupname, parent_gid); System.out.println("group_name [upper_gid] : " + groupname + "[" + gid + "]"); // gid System.out.println("Repository.deleteGroup(int gid)"); int temp_gid = repository.creategroup("temporary group", root_gid); repository.deletegroup(temp_gid); //. System.out.println("Repository.updateUpperGroupId(int gid, int uppergid) "); parent_gid = repository.creategroup("temporary group", root_gid); System.out.println("Before Update UpperGroupID : " + (repository.getgroupinfo(gid)).getparentgroupid()); repository.updateuppergroupid(gid, parent_gid); System.out.println("After Update UpperGroupID : " + (repository.getgroupinfo(gid)).getparentgroupid()); //. System.out.println("Repository.updateGroupName(int groupid, String groupname)"); String newgroupname = "( "; 78 FORCS Co., LTD

79 System.out.println("Before Update GroupIDofUser : " + (repository.getgroupinfo(gid)).getgroupname()); repository.updategroupname(gid, newgroupname); System.out.println("After Update GroupIDofUser : " + (repository.getgroupinfo(gid)).getgroupname()); groupadmintest(gid); grouplisttest(gid); repository.deletegroup(parent_gid); private static void createfile(string filename) throws Exception { FileOutputStream fos = new FileOutputStream(new File(fileName)); fos.write("dummy data".getbytes()); fos.flush(); fos.close(); private static void removefile(string filename) { try { File f = new File(fileName); f.delete(); catch(exception e) { private static void userlisttest(int uid) throws Exception { OZRepositoryUser userinfo = null; OZRepositoryUser[] userinfolist = null; int gid = repository.getgroupidofuser(uid); final String sdmname = "SDM for test.sdm"; final int itemtype = 20002; //OZRepositoryItem.SDM_FILE; createfile(sdmname); int cid = repository.createcategory("/user List Test"); int itemid = repository.createitem(sdmname, itemtype, "", cid, new FileInputStream(sdmName)); final byte authread = 0x02; //. System.out.println("Repository.getUserList()"); userinfolist = repository.getuserlist(); showuserinfolist(userinfolist); //. System.out.println("Repository.getUserListInGroup(int gid)"); FORCS Co., LTD 79

80 OZ API Developer's Guide userinfolist = repository.getuserlistingroup(gid); showuserinfolist(userinfolist); //. System.out.println( "Repository.getUserListAuthToItem(int itemid, byte perm)"); userinfolist = repository.getuserlistauthtoitem(itemid, authread); showuserinfolist(userinfolist); //. System.out.println( "Repository.getUserListAuthToCategory(int categoryid, byte perm)"); userinfolist = repository.getuserlistauthtocategory(cid, authread); showuserinfolist(userinfolist); repository.deleteitem(itemid); repository.deletecategory(cid); removefile(sdmname); private static void showuserinfolist(ozrepositoryuser[] userinfolist) { if (userinfolist == null) return; OZRepositoryUser user; Iterator iter; System.out.println( "[i]groupname:username:userid "); for (int i = 0; i < userinfolist.length; i++) { user = userinfolist[i]; iter = user.getgrouplist().iterator(); while (iter.hasnext()) { System.out.println("[" + i + "]" + iter.next() + ":" + user.getusername() + ":" + user.getuserid()); private static void useridtest(int uid) throws Exception { // Group ID. System.out.println( "Repository.updateGroupIdOfUser(int gid, int uid)"); int old_gid = repository.getgroupidofuser(uid); int new_gid = repository.creategroup("group_for_test", old_gid); System.out.println("Before Update GroupIDofUser : " + repository.getgroupidofuser(uid)); repository.updategroupidofuser(new_gid, uid); System.out.println("After Update GroupIDofUser : " + 80 FORCS Co., LTD

81 repository.getgroupidofuser(uid)); //. System.out.println("Repository.getUserIdbyName(String user_name)"); String username = repository.getusernamebyid(uid); uid = repository.getuseridbyname(username); System.out.println("uid[" + uid + "]" + username); repository.updategroupidofuser(old_gid, uid); repository.deletegroup(new_gid); private static void userdesctest(int uid) throws Exception { //. System.out.println( "Repository.updateUserDescription(int uid, String description) "); String description = ".."; System.out.println("Before Update Description : " + repository.getuserdescription(uid)); repository.updateuserdescription(uid, description); System.out.println("After Update Description : " + repository.getuserdescription(uid)); private static void userpwdtest(int uid) throws Exception { // uid pwd check. System.out.println("Repository.checkUserPwd(int uid, String pwd)"); String pwd = "admin"; // uid pwd. System.out.println("Repository.updateUserPwd(int uid, String pwd)"); System.out.println("Before : UserName : " + repository.checkuserpwd(uid, pwd)); repository.updateuserpwd(uid, pwd); System.out.println("After : UserName : " + repository.checkuserpwd(uid, pwd)); private static void userlogintest(int uid) throws Exception { // default login user loginval. System.out.println("Repository.updateLoginDefault(int logindval)"); int logindval = uid; // uid user default login setting. repository.updatelogindefault(logindval); // username login disable. System.out.println("Repository.disableUserLogin(String username)"); String username = repository.getusernamebyid(uid); repository.disableuserlogin("'" + username + "'"); FORCS Co., LTD 81

82 OZ API Developer's Guide // username login enable. System.out.println("Repository.enableUserLogin(String username)"); repository.enableuserlogin("'" + username + "'"); //. System.out.println("Repository.loginToServer()"); System.out.println("loginToServer? " + repository.logintoserver()); // uid logout. System.out.println("Repository.userLogout(int uid)"); System.out.println("Before: Is this user[" + uid + "] logged on now? " + repository.isuserlogin(uid)); //repository.userlogout(uid); System.out.println("After: Is this user[" + uid + "] logged on now? " + repository.isuserlogin(uid)); private static void usertest() throws Exception { //. System.out.println( "Repository.createUser(String user_name, String pwd, int gid, String description)"); String username = "forcs"; String pwd = "111111"; int gid = 0; // String description = "() "; int uid = repository.createuser(username, pwd, gid, description); System.out.println("user_name [uid] : " + username + "[" + uid + "]"); //. System.out.println( "Repository.updateUserName(int userid, String username)"); String newusername = ""; System.out.println("Before : UserName : " + repository.getusernamebyid(uid)); repository.updateusername(uid, newusername); System.out.println("After : UserName : " + repository.getusernamebyid(uid)); userlogintest(uid); userdesctest(uid); useridtest(uid); userlisttest(uid); userpwdtest(uid); //. 82 FORCS Co., LTD

83 System.out.println("Repository.deleteUser(int uid)"); repository.deleteuser(uid); FORCS Co., LTD 83

84 OZ API Developer's Guide 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() 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) Argument url ip port Servlet URL ex) String url = " Daemon IP ex) String ip = " "; Daemon ex) int port = 8003; 84 FORCS Co., LTD

85 id pw bautologin useusl 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. Argument check true : false : restart public void restart() throws OZCPException. Sample : ServiceSample.java package sample; import oz.framework.api.service; import org.apache.log4j.*; FORCS Co., LTD 85

86 OZ API Developer's Guide public class ServiceSample { public static void main(string[] args) { BasicConfigurator.configure(); // OZServer Info. //* // Daemon String IP = " "; // IP int PORT = 8003; // TCP /*/ // Servlet String URL = " //Servlet URL /**/ // User Info. String ID = "admin"; //default String PWD = "admin"; //default Service service = null; try { //* // Daemon service = new Service(IP, PORT, ID, PWD, false, false); /*/ // Servlet service = new Service(URL, ID, PWD, false, false); /**/ System.out.println(service.getHandlerCount()); // garbagecollection (garbagecollects) service.garbagecollect(); // (restart) //service.restart(); // (serverstop) boolean check = true;// service.stop(check); catch(exception e) { 86 FORCS Co., LTD

87 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 getdatamodules(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) Constructor Detail FORCS Co., LTD 87

88 OZ API Developer's Guide //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) Argument url ip port id pw bautologin useusl Servlet URL ex) String url = " Daemon IP ex) String ip = " "; 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. Argument reportname categoryname getform public InputStream getform(string reportname, String categoryname, boolean iscompress) throws OZCPException 88 FORCS Co., LTD

89 . Argument reportname categoryname iscompress getuserparameterswithdefaultvalue public Parameter[] getuserparameterswithdefaultvalue(string itemname, int itemtype, String categoryname) throws OZCPException. itemname Argument itemtype (OZR : / ODI : 10000) categoryname iscompress gethcusdm public HCDataModule gethcusdm(string filename, String categoryname) throws OZCPException SDM. Argument filename categoryname getdatamodules public HCDataModule getdatamodule(inputstream sdminput) throws OZCPException SDM. FETCH (batch), DataModule 2.5 Normal. Argument sdminput SDM FORCS Co., LTD 89

90 OZ API Developer's Guide getdatamodules 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. Argument odiname categoryname parameters docompress forcerefresh invaliddataset maxrows Class Parameter(oz.dm.Parameter). - public String name : public String value : MaxRowsOfSet (oz.dm. MaxRowsOfSet). - SetSetName public void SetSetName(String v). 90 FORCS Co., LTD

91 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. Argument name PrintInfo public void PrintInfo(PrintStream out) FORCS Co., LTD 91

92 OZ API Developer's Guide PrintStream. Argument 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.framework.cp.ozcpexception; import oz.dm.maxrowsofset; import java.io.*; import org.apache.log4j.*; public class ViewerSample { public static void main(string[] args) { BasicConfigurator.configure(); // OZServer Info. //* // Daemon String IP = " "; // IP 92 FORCS Co., LTD

93 int PORT = 8003; // TCP /*/ // Servlet String URL = " //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 = "test.ozr"; String odiname = "test.odi"; //ODI String sdmname = "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]; // // SDM (gethcusdm) HCDataModule usdm = viewer.gethcusdm(sdmname, categoryname); //. (getbytearrayform) byte[] formbytes = viewer.getbytearrayform(ozrname, categoryname); // (getform) InputStream in = viewer.getform(ozrname, categoryname, compress); // //(getuserparameterswithdefaultvalue) param = viewer.getuserparameterswithdefaultvalue(odiname, ODI_FILE_TYPE, categoryname); // Input Stream SDM (getdatamodule) HCDataModule sdm = viewer.getdatamodule( new FileInputStream(sdmName)); FORCS Co., LTD 93

94 OZ API Developer's Guide // (getdatamodules) HCDataModule dmodule = viewer.getdatamodule( odiname, categoryname, param, compress, force); // (getdatamodules) HCDataModule dmodule2 = viewer.getdatamodule( odiname, categoryname, param,compress, force, invalidset, mx); catch (Exception e) { e.printstacktrace(); 94 FORCS Co., LTD

95 API Class Program Class Publisher Class Scheduler FORCS Co., LTD 95

96 OZ API Developer's Guide API. API. Program Publisher Scheduler... API. ozsfw35.jar log4.jar Scheduler server. Server Log. (API classpath "log4.jar" ) 96 FORCS Co., LTD

97 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) throws SchedulerException Argument ip port IP ex) String ip = " "; (:9521) ex) int port = 9521; Method Detail createfolder public void createfolder(serverinfo s, String folder) throws SchedulerException. FORCS Co., LTD 97

98 OZ API Developer's Guide Argument s folder downloadfile public byte[] downloadfile(serverinfo s, String file) throws SchedulerException. Argument s file getexternalprogramlist public FileInfo[] getexternalprogramlist(serverinfo s, String folder) throws SchedulerException. Argument s folder removefiles public void removefiles(serverinfo s, String folder, String[] files) throws SchedulerException. Argument s folder files removefolder public void removefolder(serverinfo s, String folder, boolean isall) throws SchedulerException. Argument s folder isall true : ( ) false : ( ) 98 FORCS Co., LTD

99 uploadfile public void uploadfile(serverinfo s, String file, byte[] b) throws SchedulerException (). Argument s file b Class SchedulerException(oz.scheduler.SchedulerException) Exception. ServerInfo(oz.scheduler.ServerInfo). - setisdaemon public final void setisdaemon(boolean isdaemon). Argument isdaemon Daemon true : Daemon false : Servlet setip public final void setip(string ip) IP. Server Daemon. Argument ip IP setportno public final void setportno(int portno) Port. Server Daemon. FORCS Co., LTD 99

100 OZ API Developer's Guide Argument portno Port seturl public final void seturl(string url) throws IllegalArgumentException URL. Server Servlet. Argument url URL URL, ' setid public final void setid(string id) ID. Argument id ID setpwd public final void setpwd(string pwd). Argument pwd FileInfo(oz.scheduler.FileInfo.class) (/,,, ). - public boolean isdirectory : () public String name : public long size : public long lastmodified :, :00:00 GMT 100 FORCS Co., LTD

101 Sample : ProgramSample.java package sample; import oz.scheduler.serverinfo; import oz.scheduler.fileinfo; import oz.framework.api.program; import org.apache.log4j.*; public class ProgramSample { public static void main(string[] args) { BasicConfigurator.configure(); String IP = " "; // 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, //' *. 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); FORCS Co., LTD 101

102 OZ API Developer's Guide // (getexternalprogramlist) FileInfo fileinfo[] = program.getexternalprogramlist(serverinfo, foldername); for(int i=0;i<fileinfo.length;i++){ 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(); 102 FORCS Co., LTD

103 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) throws SchedulerException Argument ip port IP ex) String ip = " "; (:9521) ex) int port = 9521; Method Detail createfolder public void createfolder(serverinfo s, String folder) throws SchedulerException. FORCS Co., LTD 103

104 OZ API Developer's Guide Argument s folder downloadfile public byte[] downloadfile(serverinfo s, String file) throws SchedulerException. Argument s file getpublishedfiles public FileInfo[] getpublishedfiles(serverinfo s, String folder) throws SchedulerException. Argument s folder removefiles public void removefiles(serverinfo s, String folder, String[] files) throws SchedulerException. Argument s folder fiels removefolder public void removefolder(serverinfo s, String folder, boolean isall) throws SchedulerException. Argument s folder isall true : ( ) false : ( ) 104 FORCS Co., LTD

105 Class 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 = " "; // 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, //' *. Server Servlet Type.*/ // (createfolder) FORCS Co., LTD 105

106 OZ API Developer's Guide 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) { 106 FORCS Co., LTD

107 Constructor Summary scheduler(string ip, int port) Method Summary void createtask(serverinfo s, SortProperties configmap, SortProperties exportmap) SortProperties getconfiguration(serverinfo s) Vector gettask(serverinfo s) Vector gettaskresult(serverinfo s, String from, String to, String taskid) void modifyconfiguration(serverinfo s, SortProperties configmap, SortProperties exportmap) void removetask(serverinfo s, String task) void stop(serverinfo s, boolean waittask) boolean taskpause(serverinfo s, String task) boolean taskresume(serverinfo s, String task) boolean makepdf(serverinfo s, SortProperties configmap, SortProperties exportmap) public boolean export(serverinfo s, SortProperties configmap, SortProperties exportmap) throws SchedulerException Constructor Detail ppublic scheduler(string ip, int port) Argument ip IP ex) String ip = " "; FORCS Co., LTD 107

108 OZ API Developer's Guide port (:9521) ex) int port = 9521; Method Detail createtask public void createtask(serverinfo s, SortProperties configmap, SortProperties exportmap) throws SchedulerException. Argument s configmap exportmap key "Option". key "Option". getconfiguration public SortProperties getconfiguration(serverinfo s) throws SchedulerException. Argument s gettask public Vector gettask(serverinfo s) throws SchedulerException. Argument s gettaskresult public Vector gettaskresult(serverinfo s, String from, String to, String taskid) throws SchedulerException. 108 FORCS Co., LTD

109 Argument s from to taskid modifyconfiguration public void modifyconfiguration(serverinfo s, SortProperties configmap) throws SchedulerException. Argument s configmap key "Option". removetask public void removetask(serverinfo s, String taskid) throws SchedulerException. Argument s taskid stop public void stop(serverinfo s, boolean waittaskid) throws SchedulerException. Argument s waittaskid taskpause public boolean taskpause(serverinfo s, String taskid) throws SchedulerException. Argument s FORCS Co., LTD 109

110 OZ API Developer's Guide taskid taskresume public boolean taskresume(serverinfo s, String taskid) throws SchedulerException. Argument s taskid makepdf public boolean makepdf(serverinfo s, SortProperties configmap, SortProperties exportmap) throws SchedulerException PDF. : "ViewType=None". Argument s configmap exportmap key "Option". creattask() PDF. PDF key "Option". creattask() PDF. : makepdf API COM ASP "Appendix 1. SchedulerCOM ". export public boolean export(serverinfo s, SortProperties configmap, SortProperties exportmap) throws SchedulerException 110 FORCS Co., LTD

111 . : "ViewType=None". :.pdf,.ozd,.html,.jpg,.xls,.doc,.svg,.txt,.ppt,.tif, csv. s Argument configmap exportmap key "Option". key "Option". : export API COM ASP "Appendix 1. SchedulerCOM ". Class ServerInfo(oz.scheduler.ServerInfo) Program class " class". SortProperties (oz.util.sortproperties) Cache class " class". Option - "ViewType" "None", API, OZD. -,. FORCS Co., LTD 111

112 OZ API Developer's Guide applet.mode viewer.mode applet.useprogressbar viewer.useprogressbar applet.allowmultiframe viewer.allowmultiframe export.mode export.confirmsave information.debug applet.showerrormessage viewer.showerrormessage export export false false true true silent false debug false false - Key Value report_name category_name ex) setproperty("report_name", "crosstab") ex) setproperty("category _name", "temp") - Key Value dm_server_check dm_server_name odi_name odi_category_na me "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") 112 FORCS Co., LTD

113 - Key Value task_type "viewertag",. "SchedulerViewerTagSample.java". ex) setproperty("task_type ", "viewertag") - Key Value external_progra m_check external_progra m_command "check" "null" ex) setproperty("external_program_check", "check") ("SCH_HOME/External" ) ex) SetProperty("external_program_command", "notepad.bat") Key Value mail_check mail_notify_error _check 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") FORCS Co., LTD 113

114 OZ API Developer's Guide mail_recipient_b cc mail_subject mail_text_messa ge mail_html_comm ent html_mail_conte nt mail_attach_list "check" "null" "check" "null" ex) setproperty("mail_recipient_bcc", ex) setproperty("mail_subject", "") ex) setproperty("mail_text_message", "") HTML ex) setproperty("mail_html_comment","check") 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") 114 FORCS Co., LTD

115 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". ODI Key Value odi_parameter_ count ex) setproperty("odi_parameter_count", "1") odi_parameter_n ame_1... odi_parameter_n ame_n odi_parameter_v alue_1... odi_parameter_v alue_n (n : ) ex) setproperty("odi_parameter_name_1", "id") (n : ) ex) setproperty("odi_parameter_value_1", " 10") : ODI, ODI ODI. FORCS Co., LTD 115

116 OZ API Developer's Guide - Key Value launch_type "once" "immediately" "periodically" once : immediately : periodically : ex) setproperty("launch_type", "once") launch_ type = once Key Value execution_year execution_month execution_day execution_hour execution_min ex) setproperty("execution_year", "2005") 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_exec ution_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") 116 FORCS Co., LTD

117 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_w eeks weekly_monday_ check weekly_tuesday_ check weekly_wednesd ay_check weekly_thursday _check weekly_friday_ch eck weekly_saturday _check weekly_sunday_ check "check" "null" "check" "null" "check" "null" "check" "null" "check" "null" "check" "null" "check" "null" ex) setproperty("weekly_every_weeks", "2") ex) setproperty("weekly_monday_check", "check") 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_ months monthly_type "specific_day", "day_of_week", "user_defined" ( ) ex) setproperty("monthly_every_months", "2") ex) setproperty("monthly_type", "specific_day") FORCS Co., LTD 117

118 OZ API Developer's Guide monthly_days monthly_which_ week monthly_which_ week_day monthly_user_de fined_days "T1" "T2" "T3"" T4" "T5" "sunday" "monday" "tuesday" "wednesday" "thursday" "friday" "saturday" ex) setproperty("monthly_days", "2") T1 : T2 : T3 : T4 : T5 : ex) setproperty("monthly_which_week", "T2") ex) : setproperty("monthly_which_week_day", "monday") (,) 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") 118 FORCS Co., LTD

119 periodically_ execution_time_ type = repeat Key Value repeat_every_ho urs repeat_every_mi nutes repeat_start_hou r repeat_start_min ute repeat_end_hour repeat_end_minu te 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") : periodically_ execution_time_ type = user_defined Key Value user_defined_tim e (:) (,) ex) setproperty("user_defined_time", "01:30,13:30") CSV Key Value csv.filename csv.pagetitle csv.pageline "page" CSV ex) setproperty("csv.filename","test.csv") ex) setproperty("csv.pagetitle", "<<Page>>") ex) setproperty("csv.pageline ", "7") FORCS Co., LTD 119

120 OZ API Developer's Guide csv.pagestyle csv.separator csv.removerange csv.exceptfirstpa ge csv.savetointeger "none" "# <page>" "# <page> ---" "--- #<page>" "<page> #" "Tab" "Space" "Comma" "true" "false" "true" "false" (:none - ) ex) setproperty("csv.pagestyle", "none") CSV ex) setproperty("csv.separator", "Tab") (", " ) ex) setproperty("csv.removerage", "1, 3") true : false : () ex) setproperty("csv.exceptfirstpage", "true") true : false : () ex) setproperty("csv.savetointeger", "true") Excel Key Value Excel.filename ex) setproperty("excle. filename ", "test.xls") Excel.numberfor mat Excel.savefont Excel.matchmode "columnpersheet" "paperpersheet" ex) setproperty("excel.numberformat ", "#,##0.00") ex) setproperty("excel.savefont", "Arial, Courier") columnpersheet : Sheet () paperpersheet : Sheet ex) setproperty("excel.matchmode", "columnpersheet") 120 FORCS Co., LTD

121 Excel.matchsubm ode excel.removeran ge excel.removeopti on "RowFirst" "ColumnFirst" "FirstPageOnly" "FirstPageExcept" "AllPage" (:RowFirst) ex) setproperty("excel.matchsubmode", "rowfirst") (", " ) ex) setproperty("excel.removerange", "1,3") excel.removerange FirstPageOnly : FirstPageExcept: AllPage : () ex) setproperty("excel.removeoption", "AllPage") excel.removeblan k "true" "false" (:false) ex) setproperty("excel.removeblank", "Yes") HTML Key Value html.filename HTML ex) setproperty("html.filename", "test.html") html.imagepath Html (URL ) ex) setproperty("html.imagepath","file://c:/image"); html.vertical (:) ex) setproperty("html.vertical","1") html.horizontal (:) ex) setproperty("html.horizontal","1") html.savebypage "true" "false" HTML true : false : () ex) setproperty("html.savebypage","true") FORCS Co., LTD 121

122 OZ API Developer's Guide html.offsetx x (:) ex) setproperty("html.offsetx","1") html.offsety y (:) ex) setproperty("html.offsety","1") Jpeg Key Value jpg.filename JPEG ex) setproperty("jpg.filename", "test.jpg") OZD Key Value ozd.filename ozd.memoallowe d ozd.saveall ozd.password "true" "false" "true" "false" OZD ex) setproperty("ozd. filename ", "test.ozd") true : () false : ex) setproperty("ozd. memoallowed ", "true") : Direct true : () false : ex) setproperty("ozd.saveall ", "true") ex) setproperty("ozd.password", "admin") PDF Key Value pdf.filename PDF ex) setproperty("pdf.filename", "test.pdf") 122 FORCS Co., LTD

123 pdf.saverange pdf.title pdf.subject pdf.creator pdf.author pdf.keyword pdf.userpasswor d pdf.masterpassw ord (", " ) ex) setproperty("pdf.saverange ", "1.3") PDF ex) setproperty("pdf.title", "Report") PDF ex) setproperty("pdf.title", "Report") ex) setproperty("pdf.creator", "Forcs") ex) setproperty("pdf.author", "Forcs") PDF ex) setproperty("pdf.keyword", "oz") PDF ex) setproperty("pdf.userpassword", "user") PDF ex) setproperty("pdf.masterpassword", "admin") pdf.printable PDF (:true) ex) setproperty("pdf.printable", "true") PPT Key Value ppt.filename PPT ex) setproperty("ppt.filename", "test.ppt") SVG Key Value svg.filename SVG ex) setproperty("svg.filename", "test.svg") FORCS Co., LTD 123

124 OZ API Developer's Guide Text Key Value text.filename Text ex) setproperty("text.filename","test.txt") text.pagetitle "page" ex) setproperty("csv.pagetitle", "<<Page>>") text.pageline ex) setproperty("text.pageline ", "7") text.pagestyle "none" "# <page>" "# <page> ---" "--- #<page>" "<page> #" (:none - ) ex) setproperty("text.pagestyle", "none") text.separator "Tab" "Space" "Comma" Text ex) setproperty("text.separator", "Tab") text.removerage (", " ) ex) setproperty("text.removerage", "1, 3") text.exceptfirstp age text.savetointege r "true" "false" "true" "false" true : false : () ex) setproperty("text.exceptfirstpage", "true") true : false : () ex) setproperty("text.savetointeger", "true") Tiff Key Value tiff.filename Tiff ex) setproperty("tiff.filename", "test.tif") 124 FORCS Co., LTD

125 tiff.encode "G3" "G4" Tiff G3: fax G3 Tiff () G4 : fax G4 Tiff ex) setproperty("tiff.encode", "G3") Word Key Value word.filename ex) setproperty("word.filename", "test.doc") 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"); SMTPServerProt SMTP ex) p.setproperty("smtpserverprot", "25"); MailFrom ex) p.setproperty("mailfrom", "mail@forcs.com"); FORCS Co., LTD 125

126 OZ API Developer's Guide TempRepositoryF ilepath ex) p.setproperty("temprepositoryfilepath", "%SCH_HOME%/Te mp Repository"); RepositoryFileRo otpath ex) p.setproperty("repositoryfilerootpath", "%SCH_HOME%/Repository"); ExternalProgram FilePath ex) p.setproperty("externalprogramfilepath", "%SCH_HOME%/External"); ErrorNotifyToSen der "true" "false" true : false : ex) p.setproperty("errornotifytosender", "false"); Sample : SchedulerSample.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.*; public class SchedulerSample { private static String[][] mailrelatedproperties = { // {"report_name", "test.ozr",// {"category_name","/", // {"cfg.type","new", // Task new, edit // {"odi_name","testodi.odi", {"odi_category_name","/test", {"dm_server_check", "check", // {"dm_server_name", "test1.sdm",// 126 FORCS Co., LTD

127 // {"odi_name","testodi.odi", // odi {"odi_category_name","/test",// odi {"external_program_check", "check", {"external_program_command", "notepad.bat", //. // {"parameter_count", "1", // {"parameter_name_1", "[FORM].empNo", // {"parameter_value_1", "10", // // ODI {"odi_parameter_count", "1", // {"odi_parameter_name_1", "id", // {"odi_parameter_value_1", "12",// // {"launch_type", "once", //("immediately","periodically") {"execution_year", "2003",//- {"execution_month", "12", //- {"execution_day", "17", //- {"execution_hour", "10", //- {"execution_min", "30", //- {"periodically_execution_day_type","daily", //("weekly", "monthly") {"daily_type", "weekday", //("specific_day") {"periodically_execution_time_type", "once", // ( "repeat", "user_defined") {"once_hour", "01", // - {"once_min", "00", // - // {"mail_check", "check", //- {"html_mail_content", "check", // html {"mail_notify_error_check", "null", // - {"mail_recipient_to", "gil_dong@forcs.com", // {"mail_recipient_cc", "abc@forcs.com", // {"mail_recipient_bcc", "lan@forcs.com",// {"mail_subject", "", // {"mail_text_message", "", // {"mail_attach_list", "csv/excel/html/ozd/pdf/text/tiff/word/ppt/jpg/svg", // {"file_export_list", "csv/xls/html/ozd/pdf/txt/tif/doc/ppt/jpg/svg" FORCS Co., LTD 127

128 OZ API Developer's Guide ; // Export private static String[][] attachrelatedproperties = { // CSV {"csv.filename ", "test.csv", // csv {"csv.pagetitle ", "page", // {"csv.pageline ", "7", // {"csv.pagestyle", "none", // {"csv.separator ", "Tab", // CSV {"csv.removerange ", "1,3", // CSV {"csv.exceptfirstpage ", "true",// {"csv.savetointeger ", "true", // // {"excel.filename ", "test.xls", // excel {"excel.numberformat ", "#,##0.00",// {"excel.savefont", "Arial", // {"excel.matchmode", "columnpersheet", // {"excel.matchsubmode", "rowfirst", // {"excel.removerange", "1,3", // {"excel.removeoption ", " firstpageonly", // {"excel.removeblank ", " true", // // html {"html.filename ", "test.html", // html {"html.imagepath ", "file://c:/image", // html {"html.vertical ", "1", // html {"html.horizontal ", "1", // html {"html.savebypage ", "true", // html {"html.offsetx ", "1", // x offset {"html.offsety ", "1", // y offset // ozd {"ozd.filename ", "test.ozd", //OZD {"ozd.memoallowed ", "true", // {"ozd.password", "admin", // ozd // pdf {"pdf.filename ", "test.pdf", {"pdf.saverange ", "1.3", {"pdf.title ", "Report", {"pdf.subject ", "OZ", {"pdf.creator ", "hong", //pdf //pdf //pdf //pdf //pdf 128 FORCS Co., LTD

129 {"pdf.author ", "hong", //pdf {"pdf.keyword ", "oz", //pdf {"pdf.userpassword", "user", //pdf {"pdf.masterpassword ", "admin",//pdf {"pdf.printprotected ", "true", //pdf // text {"text.filename ", "test.txt", //text {"text.pagetitle ", "page", // {"text.pageline ", "7", // {"text.pagestyle", "none", // {"text.separator ", "Tab", //text {"text.removerange ", "1,3", //text {"text.exceptfirstpage ", "true", // {"text.savetointeger ", "true", // // Tiff {"tiff.filename ", "test.tif",//tiff {"tiff.encode ", "G3", //tiff // word {"word.filename ", "test.doc", //word // ppt {"ppt.filename ", "test.ppt ", //ppt // jpg {"jpg.filename ", "test.jpg ", //jpg ; // svg {"svg.filename ", "test.svg" //svg private static String[][] schedulerrelatedproperties = { {"SchedulerPort", "9521", // {"schedulerserver", "%SCH_HOME%/ScheduledTask", // {"SMTPServer", "mail.forcs.com", //SMTP {"SMTPServerPort", "25", //SMTP {"MailFrom", "kil_dong@forcs.com",// {"TempRepositoryFilePath", "%SCH_HOME%/TempRepository", // {"RepositoryFileRootPath", "%SCH_HOME%/Repository", //PDF {"ExternalProgramFilePath", "%SCH_HOME%/External", // {"ErrorNotifyToSender", "false" // FORCS Co., LTD 129

130 OZ API Developer's Guide ; public static void main(string[] args) { BasicConfigurator.configure(); String IP = " "; // IP int PORT = 9521; // TCP String[][] values = null; Scheduler scheduler = null; try { scheduler = new Scheduler(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, //' *. Server Servlet Type.*/ // (createtask) // //. //check, uncheck "check", "null". SortProperties props = new SortProperties(); setproperties(props, mailrelatedproperties); SortProperties exportmap = new SortProperties(); setproperties(exportmap, attachrelatedproperties); scheduler.createtask(serverinfo, props, exportmap); scheduler.makepdf(serverinfo, props, exportmap); scheduler.makepdfbypooling(serverinfo, props, exportmap); // (modifyconfiguration) SortProperties pro = new SortProperties(); setproperties(pro, schedulerrelatedproperties); scheduler.modifyconfiguration(serverinfo, pro); // (getconfiguration) pro = scheduler.getconfiguration(serverinfo); 130 FORCS Co., LTD

131 pro.list(system.out); /* * (gettask) * *, *. */ ScheduledTask stask = new ScheduledTask(); // setting stask.taskid = "parameter_test.ozs"; // stask.reportname = "/parameter_test"; // stask.schedulingtypestr = "Periodically"; // stask.lastruntimestr = ""; // stask.nextruntimestr = " :00";// stask.status = 'W'; //(WAITING,RUNNING,PAUSE.) ScheduledTask[] tasklist = scheduler.gettask(serverinfo); for (int i = 0; i < tasklist.length; i++) { showtask(tasklist[i]); /* * (gettaskresult) * *, *. */ // TaskResult tr = new TaskResult(); tr.taskid = "parameter_test.ozs"; // tr.completedtime = " :00"; // tr.issuccessful = "true"; // tr.formfilename = "/parameter_test"; // tr.paraminfo = "0{"; // tr.schedulingtype = "Periodically"; // //-. //. tr.errormsg = "Fail to execute scheduling task with OZServer. :"; String from = " "; // String to = " "; // TaskResult[] trlist = scheduler.gettaskresult(serverinfo, from, to, tr.taskid); for (int i = 0; i < trlist.length; i++) { showtaskresult(trlist[i]); FORCS Co., LTD 131

132 OZ API Developer's Guide String task = stask.taskid; // // (taskpause) boolean b = scheduler.taskpause(serverinfo, task); // (taskresume) boolean bool = scheduler.taskresume(serverinfo, task); // (removetask) scheduler.removetask(serverinfo, task); //.(stop) boolean waittask = true; // boolean scheduler.stop(serverinfo, waittask); 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]); private static void showtask(scheduledtask t) { System.out.println(" " + t.taskid); System.out.println(" " + t.reportname); System.out.println(" " + t.schedulingtypestr); System.out.println(" " + t.lastruntimestr); System.out.println(" " + t.nextruntimestr); System.out.println(" " + t.status); System.out.println(""); private static void showtaskresult(taskresult tr) { System.out.println(" " + tr.taskid); System.out.println(" " + tr.completedtime); System.out.println(" " + tr.issuccessful); System.out.println(" " + tr.formfilename); System.out.println(" " + tr.paraminfo); System.out.println(" " + tr.schedulingtype); System.out.println(" " + tr.errormsg); System.out.println(""); 132 FORCS Co., LTD

133 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) throws SchedulerException { BasicConfigurator.configure(); Scheduler scheduler = null; scheduler = new Scheduler(" ", 9521); // ServerInfo serverinfo = new ServerInfo(); serverinfo.setid("admin"); // serverinfo.setpwd("admin"); // serverinfo.setisdaemon(true); serverinfo.setip(" "); //OZ Server IP. daemon serverinfo.setportno(8003); SortProperties config = new SortProperties(); //. config.setproperty("task_type", "viewertag"); // Task new, edit config.setproperty("cfg.type", "new"); // (:"immediately", :"periodically") config.setproperty("launch_type", "immediately"); SortProperties export = new SortProperties(); // export.setproperty("connection.server", " "); export.setproperty("connection.port", "8003"); export.setproperty("connection.reportname", "/parameter_test.ozr"); FORCS Co., LTD 133

134 OZ API Developer's Guide 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"); 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("viewer.childcount", "1"); export.setproperty("child1.connection.server", " "); 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"); 134 FORCS Co., LTD

135 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"); 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"); // API EM. String taskid = scheduler.createtask(serverinfo, config, export); FORCS Co., LTD 135

136 OZ API Developer's Guide API OZLauncherDll 136 FORCS Co., LTD

137 OZLauncherDll. Function Summary void_stdcall SetPath(LPCTSTR strpath) void_stdcall SetClassNameForJava(LPCTSTR strclassname) void_stdcall SetPackageNameForJava(LPCTSTR strpackages) void_stdcall SetMSViewerTypeForJava(int type) void_stdcall SetCommand(LPCTSTR strcommand) void_stdcall SetDataForJava(LPCTSTR strdata) BOOL_stdcall CreateOZViewer(LPCTSTR str_param, int n_type) LPCTSTR_stdcall GetResult() void_stdcall Release() Function Detail SetPath void_stdcall SetPath(LPCTSTR strpath) Applet ActiveX. Argument strpath Applet ActiveX SetClassNameForJava void_stdcall SetClassNameForJava(LPCTSTR strclassname) Applet Main Class.( Applet ) Argument strclassname Main Class FORCS Co., LTD 137

138 OZ API Developer's Guide Example SetClassNameForJava("oz.application.OZIEApplication"); SetCommand("/string"); SetPackageNameForJava void_stdcall SetPackageNameForJava(LPCTSTR strpackages). [;].( Applet ). Argument strpackages Example SetPackageNameForJava("ozapp.zip; ozviewer.jar"); SetMSViewerTypeForJava void_stdcall SetMSViewerTypeForJava(int type) MS VM.( Applet ) Argument type Wjview. 2 Jview. SetCommand void_stdcall SetCommand(LPCTSTR strcommand). Argument strcommand Example SetCommand("/locale ko/kr /mode alone /slp true /launchstring"); SetDataForJava void_stdcall SetDataForJava(LPCTSTR strdata) Heavy client. SDM.( Applet ) Argument strdata CreateOZViewer BOOL_stdcall CreateOZViewer(LPCTSTR str_param, int n_type). true false. 138 FORCS Co., LTD

139 Argument str_param n_type. "n" Applet, 2 ActiveX. Example CreateOZViewer("connection.server= \n toolbar.all=true\n information.debug=debug\n information.bmt=true\n connection.port=8003\n connection.reportname=ozcar.xml\n connection.compressedform=true\n", 1); GetResult LPCTSTR_stdcall GetResult() Export. Applet.printcommand Applet.exportcommand... - Return GetResult(). Export Print <oz export dlg> code path file name </oz export dlg> <oz printer> message code report name printer name print copy print pages print range user name </oz printer> code : 0 =, 1 = path : file name : message : code : 0 =, 1 = report name : printer name : print copy : print pages : print range : user name : FORCS Co., LTD 139

140 OZ API Developer's Guide Release() void stdcall Release().. ActiveX SetCommand("/string"); SetPath("./"); CreateOZViewer("connection.server= \n toolbar.all=true\n information.debug=debug\n information.bmt=true\n connection.port=8003\n connection.reportname=ozcar.xml\n connection.compressedform=true",1); result = GetResult(); Release(); Example Applet SetPath("./"); SetClassNameForJava("oz.application.OZIEApplication"); SetPackageNameForJava("ozapp.zip"); SetMSViewerTypeForJava(2); SetCommand("/locale ko/kr /mode alone /slp true /launchstring"); CreateOZViewer("connection.server= \n toolbar.all=true\n information.debug=debug\n information.bmt=true\n connection.port=8003\n connection.reportname=ozcar.xml\n connection.compressedform=true\n", 1); result = GetResult(); Release(); 140 FORCS Co., LTD

141 User Data Store UDS UDS UDS FORCS Co., LTD 141

142 OZ API Developer's Guide UDS(User Data Store) Non-DB Java Interface, CSV, XML EJB, Servlet, ASP, JSP, Applet Result Set OZ User Data Source Interface JDBC Driver ODBC Driver (, ) UDS ResultSet.. UDS SQL FORCS Co., LTD

143 JDBC UDS. OZ Server OZ Designer Query String ResultSet JDBC Driver DBMS JDBC Driver DBMS JDBC Driver DBMS ResultSet. ResultSet Java JDBC java.sql.resultset Interface (implement)., DBMS DBMS JDBC Driver java.sql.resultset Interface Concrete ResultSet. JDBC Driver java.sql.resultset Interface. OZ Server OZ Designer () Custom ResultSet Custom JDBC Driver UDS(User Data Store) JDBC Driver Custom Driver java.sql.resultset interface ResultSet. JDBC Driver. oz.uds. UserDataStore Interface UserDataStore Interface ResultSet Interface. oz.uds.userdatastore interface 4. FORCS Co., LTD 143

144 OZ API Developer's Guide package oz.uds; import java.sql.*; public interface OZUserDataStore { public void init() throws OZUserDataStoreException; public ResultSet getresultset(string argument) throws OZUserDataStoreException; public void freeresultset(resultset rst); public void close();. void init() ResultSet getresultset(string argument) void freeresultset(resultset rst) void close() UDS,. Argument() ResultSet. ResultSet, getresultset ResultSet. UDS,. : init(), close(). 144 FORCS Co., LTD

145 UDS getresultset. UDS Source UDS Main Argument. import oz.uds.*; import java.sql.resultset; public class Extdata implements OZUserDataStore{ public void init() throws OZUserDataStoreException { // UDS. DB. public ResultSet getresultset(string argument) throws OZUserDataStoreException { // Argument Resultset. // Argument OZ. public void freeresultset(resultset rst){ // getresultset ResultSet. // ResultSet Close. public void close() { // UserDataSet. // DB Disconnection. FORCS Co., LTD 145

146 OZ API Developer's Guide ResultSet ResultSet ResultSet. ResultSet. (.) JDBC javasql.resultset Interface 30 UDS. import java.sql.*; import java.math.bigdecimal; import java.util.calendar; import java.util.enumeration; public class ResultSet_User implements ResultSet{ public ResultSet_User( ) { public boolean next() throws SQLException{ //. public String getstring(string columnname) throws SQLException{ //. // getstring // Method. // getboolean(string columnname) // getbyte(string columnname) // getshort(string columnname) // getint(string columnname // getlong(string columnname // getfloat(string columnname) // getdouble(string columnname // getbigdecimal(string columnname) // getdate(string columnname) // gettime(string columnname) // gettimestamp(string columnname) // getblob(string columnname) // getclob(string columnname) // getbinarystream(string columnname) public ResultSetMetaData getmetadata() throws SQLException{ 146 FORCS Co., LTD

147 // ResultSetMetaData // ResultSetMetaData Method. ResultSetMetaData ResultSetMetaData. import java.sql.sqlexception; import java.sql.types; import java.util.*; public class ResultSetMetaData_User implements ResultSetMetaData{ public ResultSetMetaData_LGeds(String[] meta) { public int getcolumncount() throws SQLException{ //. public String getcolumnname(int column) throws SQLException{ // (column). public int getcolumntype(int column) throws SQLException{ // (column) UDS, UDS. <UdsFile.java> import oz.uds.*; import java.sql.resultset; import java.io.filereader; import java.io.ioexception; import java.util.stringtokenizer; import java.util.vector; FORCS Co., LTD 147

148 OZ API Developer's Guide public class UdsFile implements OZUserDataStore{ private StringBuffer Sbuffer; private Vector mainv; //subv. private Vector subv; private String[][] data; private String[] meta; private static final String rootfilename = ""; private static final String maindiv = "\n"; private static final String subdiv = "\,"; public void init() throws OZUserDataStoreException { mainv = new Vector(); public ResultSet getresultset(string command) throws OZUserDataStoreException { FileReader in = null; Sbuffer = new StringBuffer(); try{ in = new FileReader(rootFileName + command); char[] buffer = new char[256]; int n; while((n = in.read(buffer)) > -1){ Sbuffer.append(new String(buffer, 0, n)); catch(ioexception e){ e.printstacktrace(); throw new OZUserDataStoreException(e.getMessage()); finally { try{ if(in!= null)in.close(); catch(ioexception e){ finally{ in = null; String s = Sbuffer.toString(); ////////////////////////////////////////////////////////////////////////////// StringTokenizer st1 = new StringTokenizer(s,mainDiv); StringTokenizer st2; String tmpstring; /////////////////////meta////////////////////// if(st1.hasmoretokens()){ tmpstring = st1.nexttoken().trim(); st2 = new StringTokenizer(tmpString,subDiv); subv = new Vector(); 148 FORCS Co., LTD

149 while (st2.hasmoretokens()){ subv.addelement(st2.nexttoken().trim()); meta = new String[subV.size()]; subv.copyinto(meta); //////////////////////////////////////////////// while (st1.hasmoretokens()) { tmpstring = st1.nexttoken().trim(); st2 = new StringTokenizer(tmpString,subDiv); subv = new Vector(); while (st2.hasmoretokens()){ subv.addelement(st2.nexttoken().trim()); mainv.addelement(subv); data = new String[mainV.size()][]; for(int i = 0; i < mainv.size(); i++){ subv = (Vector)mainV.elementAt(i); data[i] = new String[subV.size()]; subv.copyinto(data[i]); Sbuffer = null; mainv.clear(); //////////////////////////////////////////////////////// if(meta == null data == null){ throw new OZUserDataStoreException("Data is Invalide"); return new ResultSet_File(meta, data); public void freeresultset(resultset rst){ Sbuffer = null; data = null; meta = null; mainv.clear(); public void close() { Sbuffer = null; data = null; meta = null; mainv = null; <ResultSet_File.java> import java.sql.*; import java.math.bigdecimal; FORCS Co., LTD 149

150 OZ API Developer's Guide import java.util.calendar; import java.util.enumeration; public class ResultSet_File implements ResultSet{ private String[][] data; private String[] meta; private int index; private int size; public ResultSet_File(String[] meta, String[][] data) { this.meta = meta; this.data = data; size = data.length; index = -1; public boolean next() throws SQLException{ index++; if(index == size) return false; return true; public String getstring(string columnname) throws SQLException{ int i = findindex(columnname); if(i > -1){ try{ return data[index][i]; catch(exception e){ throw new SQLException("Internal Error"); else{ return null; private final int findindex(string columnname){ for(int i = 0; i < meta.length; i++){ if(columnname.equals(meta[i])){ return i; return -1; public String getstring(int columnindex) throws SQLException{ return null; public ResultSetMetaData getmetadata() throws SQLException{ return new ResultSetMetaData_File(meta); ////////////////////////////////////////////////////////////////////////////// 150 FORCS Co., LTD

151 //. public boolean getboolean(string columnname) throws SQLException{ return false; public byte getbyte(string columnname) throws SQLException{ return -1; public short getshort(string columnname) throws SQLException{ return -1; public int getint(string columnname) throws SQLException{ return -1; public long getlong(string columnname) throws SQLException{ return -1; public float getfloat(string columnname) throws SQLException{ return -1; public double getdouble(string columnname) throws SQLException{ return -1; public BigDecimal getbigdecimal(string columnname) throws SQLException{ return null; public java.sql.date getdate(string columnname) throws SQLException{ return null; public java.sql.time gettime(string columnname) throws SQLException{ return null; public java.sql.timestamp gettimestamp(string columnname) throws SQLException{ return null; public Blob getblob(string columnname) throws SQLException{ return null; public Clob getclob(string columnname) throws SQLException{ return null; public java.io.inputstream getbinarystream(string columnname) throws SQLException{ return null; /////////////////////////////////////////////////////////////////////////////// public boolean getboolean(int columnindex) throws SQLException{return false; FORCS Co., LTD 151

152 OZ API Developer's Guide public byte getbyte(int columnindex) throws SQLException{return -1; public short getshort(int columnindex) throws SQLException{return -1; public int getint(int columnindex) throws SQLException{return -1; public long getlong(int columnindex) throws SQLException{return -1; public float getfloat(int columnindex) throws SQLException{return -1; public double getdouble(int columnindex) throws SQLException{return -1; public BigDecimal getbigdecimal(int columnindex) throws SQLException{return null; public java.sql.date getdate(int columnindex) throws SQLException{return null; public java.sql.time gettime(int columnindex) throws SQLException{return null; public java.sql.timestamp gettimestamp(int columnindex) throws SQLException{return null; public Blob getblob(int columnindex) throws SQLException{return null; public Clob getclob(int columnindex) throws SQLException{return null; public java.io.inputstream getbinarystream(int columnindex) throws SQLException{return null; /////////////////////////////////////////////////////////////////////////////// public void close() throws SQLException{ public boolean wasnull() throws SQLException{return false; public byte[] getbytes(int columnindex) throws SQLException{return null; public java.io.inputstream getasciistream(int columnindex) throws SQLException{ return null; public java.io.inputstream getunicodestream(int columnindex) throws SQLException{return null; public byte[] getbytes(string columnname) throws SQLException{return null; public java.io.inputstream getasciistream(string columnname) throws SQLException{return null; public java.io.inputstream getunicodestream(string columnname) throws SQLException{return null; public SQLWarning getwarnings() throws SQLException{return null; public void clearwarnings() throws SQLException{ public String getcursorname() throws SQLException{return null; public Object getobject(int columnindex) throws SQLException{return null; public Object getobject(string columnname) throws SQLException{return null; public int findcolumn(string columnname) throws SQLException{return -1; public java.io.reader getcharacterstream(int columnindex) throws SQLException{return null; public java.io.reader getcharacterstream(string columnname) throws SQLException{return null; public BigDecimal getbigdecimal(int columnindex, int scale) throws SQLException{return null; public BigDecimal getbigdecimal(string columnname, int scale) throws SQLException{return null; public boolean isbeforefirst() throws SQLException{return false; public boolean isafterlast() throws SQLException{return false; public boolean isfirst() throws SQLException{return false; 152 FORCS Co., LTD

153 public boolean islast() throws SQLException{return false; public void beforefirst() throws SQLException{ public void afterlast() throws SQLException{ public boolean first() throws SQLException{return false; public boolean last() throws SQLException{return false; public int getrow() throws SQLException{return -1; public boolean absolute( int row ) throws SQLException{return false; public boolean relative( int rows ) throws SQLException{return false; public boolean previous() throws SQLException{return false; public void setfetchdirection(int direction) throws SQLException{ public int getfetchdirection() throws SQLException{return -1; public void setfetchsize(int rows) throws SQLException{ public int getfetchsize() throws SQLException{return -1; public int gettype() throws SQLException{return -1; public int getconcurrency() throws SQLException{return -1; public boolean rowupdated() throws SQLException{return false; public boolean rowinserted() throws SQLException{return false; public boolean rowdeleted() throws SQLException{return false; public Statement getstatement() throws SQLException{return null; public Object getobject(int i, java.util.map map) throws SQLException{return null; public Ref getref(int i) throws SQLException{return null; public Array getarray(int i) throws SQLException{return null; public Object getobject(string colname, java.util.map map) throws SQLException{return null; public Ref getref(string colname) throws SQLException{return null; public Array getarray(string colname) throws SQLException{return null; public java.sql.date getdate(int columnindex, Calendar cal) throws SQLException{return null; public java.sql.date getdate(string columnname, Calendar cal) throws SQLException{return null; public java.sql.time gettime(int columnindex, Calendar cal) throws SQLException{return null; public java.sql.time gettime(string columnname, Calendar cal) throws SQLException{return null; public java.sql.timestamp gettimestamp(int columnindex, Calendar cal) throws SQLException{return null; public java.sql.timestamp gettimestamp(string columnname, Calendar cal) throws SQLException{return null; /////////////////////////////////////////////////////////////////////////////// public void updatenull(int columnindex) throws SQLException{ public void updateboolean(int columnindex, boolean x) throws SQLException{ public void updatebyte(int columnindex, byte x) throws SQLException{ public void updateshort(int columnindex, short x) throws SQLException{ public void updateint(int columnindex, int x) throws SQLException{ public void updatelong(int columnindex, long x) throws SQLException{ public void updatefloat(int columnindex, float x) throws SQLException{ public void updatedouble(int columnindex, double x) throws SQLException{ FORCS Co., LTD 153

154 OZ API Developer's Guide public void updatebigdecimal(int columnindex, BigDecimal x) throws SQLException{ public void updatestring(int columnindex, String x) throws SQLException{ public void updatebytes(int columnindex, byte x[]) throws SQLException{ public void updatedate(int columnindex, java.sql.date x) throws SQLException{ public void updatetime(int columnindex, java.sql.time x) throws SQLException{ public void updatetimestamp(int columnindex, java.sql.timestamp x) throws SQLException{ public void updateasciistream(int columnindex, java.io.inputstream x, int length) throws SQLException{ public void updatebinarystream(int columnindex, java.io.inputstream x, int length) throws SQLException{ public void updatecharacterstream(int columnindex, java.io.reader x, int length) throws SQLException{ public void updateobject(int columnindex, Object x, int scale) throws SQLException{ public void updateobject(int columnindex, Object x) throws SQLException{ public void updatenull(string columnname) throws SQLException{ public void updateboolean(string columnname, boolean x) throws SQLException{ public void updatebyte(string columnname, byte x) throws SQLException{ public void updateshort(string columnname, short x) throws SQLException{ public void updateint(string columnname, int x) throws SQLException{ public void updatelong(string columnname, long x) throws SQLException{ public void updatefloat(string columnname, float x) throws SQLException{ public void updatedouble(string columnname, double x) throws SQLException{ public void updatebigdecimal(string columnname, BigDecimal x) throws SQLException{ public void updatestring(string columnname, String x) throws SQLException{ public void updatebytes(string columnname, byte x[]) throws SQLException{ public void updatedate(string columnname, java.sql.date x) throws SQLException{ public void updatetime(string columnname, java.sql.time x) throws SQLException{ public void updatetimestamp(string columnname, java.sql.timestamp x) throws SQLException{ public void updateasciistream(string columnname, java.io.inputstream x, int length) throws SQLException{ public void updatebinarystream(string columnname, java.io.inputstream x, int length) throws SQLException{ public void updatecharacterstream(string columnname, java.io.reader reader, int length) throws SQLException{ public void updateobject(string columnname, Object x, int scale) throws SQLException{ public void updateobject(string columnname, Object x) throws SQLException{ public void insertrow() throws SQLException{ 154 FORCS Co., LTD

155 public void updaterow() throws SQLException{ public void deleterow() throws SQLException{ public void refreshrow() throws SQLException{ public void cancelrowupdates() throws SQLException{ public void movetoinsertrow() throws SQLException{ public void movetocurrentrow() throws SQLException{ ////////////////////////////////////////////////////////////////////////////// <ResultMetaData_File.java> import java.sql.resultsetmetadata; import java.sql.sqlexception; import java.sql.types; import java.util.*; public class ResultSetMetaData_File implements ResultSetMetaData{ String[] meta; public ResultSetMetaData_File(String[] meta) { this.meta = meta; public int getcolumncount() throws SQLException{ return meta.length; public String getcolumnname(int column) throws SQLException{ if(0 < column && column < getcolumncount()+1){ return meta[column-1]; else{ throw new SQLException(); public int getcolumntype(int column) throws SQLException{ return Types.VARCHAR; public int isnullable(int column) throws SQLException{return -1; public int getcolumndisplaysize(int column) throws SQLException{return -1; public int getprecision(int column) throws SQLException{return -1; public int getscale(int column) throws SQLException{return -1; public boolean isautoincrement(int column) throws SQLException{ return false; public boolean iscasesensitive(int column) throws SQLException{ return false; public boolean issearchable(int column) throws SQLException{return false; public boolean iscurrency(int column) throws SQLException{return false; public boolean issigned(int column) throws SQLException{return false; public boolean isreadonly(int column) throws SQLException{return false; public boolean iswritable(int column) throws SQLException{return false; public boolean isdefinitelywritable(int column) throws SQLException{ FORCS Co., LTD 155

156 OZ API Developer's Guide return false; public String getcolumnlabel(int column) throws SQLException{return null; public String getschemaname(int column) throws SQLException{return null; public String gettablename(int column) throws SQLException{return null; public String getcatalogname(int column) throws SQLException{return null; public String getcolumntypename(int column) throws SQLException{ return null; public String getcolumnclassname(int column) throws SQLException{ return null; 156 FORCS Co., LTD

157 User Security Logic UDS UDS UDS FORCS Co., LTD 157

158 OZ API Developer's Guide USL(User Security Logic). USL USL Server USL Client, I/O. USL Flow OZ Server Server Side Network I/O Module USL Server Module Request Response USL Client Module Client Side Network I/O Module OZ Viewer 158 FORCS Co., LTD

159 USL Web WAS Session Cookie ( ), Network I/O Stream, PKI. Session ( Session USL ) UseUserSecurityLogic=true OZ Server Server Side Network I/O Module WAS USL Server Module 4-2 USL Client 2. USL USL Client Module 4-3 Exception 1. Connection Request Client Side Network I/O Module <param name="connection.usingusl" value="true"> OZ Viewer <param name="connection.args1" value="session_name=oz_session"> FORCS Co., LTD 159

160 OZ API Developer's Guide USL. - USL : OZ_HOME/lib/ozsfw35.jar - USL : OZ_HOME/conf/uslmngr.properties - ozsfw35.jar CLASSPATH. - uslmngr.properties. <<uslmngr.properties>> # # use user security logic apply # UseUserSecurityLogicVer30=true # # default USL(Server&Client) class name (with package name) # OZDefault_SERVER= ozusl.defozuslserver OZDefault_CLIENT=DefOZUSLClient # # group level USL setting # %GROUP_NAME%_SERVER=%USLServer class name with package% # %GROUP_NAME%_CLIENT=%USLClient class name with package% # categoryname1_server=ozusl.category1ozserver categoryname1_client=category1ozclient category2_server=ozusl.category2ozserver category2_client=category2ozclient uslmngr.properties UseUserSecurityLogicVer30=true. 160 FORCS Co., LTD

161 . USL USL (DLL ). OZDefault_SERVER=USL OZDefault_CLIENT=USL DLL. PKI DLL.. Report_group_SERVER=USL Report_group_CLIENT=USL DLL :. OZ Viewer Tag <param name="connection.usingusl" value="true">. UseUserSecurityLogicVer30=true. HTML <<.html>> <html> <body> <object id="ozviewer" width="800" height="600" classid="clsid:64da633f-e73b bf CD53" <param name="viewer.namespace" value="activex30ozviewer"> <param name="connection.servlet" value=" :9080/oz/server"> <param name="connection.reportname" value="group1/test.xml"> <param name="viewer.configmode" value="html"> <param name="connection.usingusl" value="true"> <param name="connection.pcount" value="3"> <param name="connection.args1" value="session_name=oz_session"> <param name="connection.args2" value="fromdate= "> <param name="connection.args3" value="todate= "> </object> </body> </html> FORCS Co., LTD 161

162 OZ API Developer's Guide 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 162 FORCS Co., LTD

163 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 163

164 OZ API Developer's Guide. USL CJDataOutputStream CJDataOutputStream. write flush CJDataOutputStream. flush. USL USL WAS Valid. OZ_HOME/usl/sample/DefOZUSLServer. java, OZ USL DLL. DefOZUSLClient DLL. Server Side USL Module DefOZUSLServer OZUSLServer. DefOZUSLServer Client, WAS OZ Servlet.. createsecureinputstream getsecureoutput Stream. HttpSession,, DataOutputStream write(int b), close(), flush() DataOutputStream Byte ArrayOutputStream flush. <<DefOZUSLServer.java>> package ozusl; import java.io.*; import oz.cp.ozuslserver; import javax.servlet.http.httpsession; 164 FORCS Co., LTD

165 import oz.cp.message.ozcmexception; public class DefOZUSLServer extends OZUSLServer { String share_key_tag, share_key_value; public DefOZUSLServer() { class DefOZServerOutputStream extends OutputStream { ByteArrayOutputStream bout; DataOutputStream out_org=null; int b_length=0; public DefOZServerOutputStream(HttpSession _http_session, String _report_name, DataOutputStream _out_org) throws OzcmException { share_key_value = (String)_http_session.getValue(share_key_tag); if(share_key_value==null) throw new OzcmException("session was not found"); bout = new ByteArrayOutputStream(); out_org = _out_org; public void write(int b) throws IOException { bout.write(b); b_length++; public void close() throws IOException { public void flush() throws IOException { byte[] b_org = bout.tobytearray(); System.out.println("bout.reset();"); bout.reset(); out_org.writeint(b_org.length); out_org.write(b_org, 0, b_org.length); out_org.flush(); FORCS Co., LTD 165

166 OZ API Developer's Guide public InputStream createsecureinputstream(datainputstream org_in) { try { share_key_tag = org_in.readutf(); catch(exception e) { share_key_tag = null; System.out.println("\nDefOZUSLServer: can't get share_key! check USL configuration for " + report_name); e.printstacktrace(); return null; public OutputStream createsecureoutputstream(dataoutputstream out_org) throws OzcmException { return new DefOZServerOutputStream(http_session, report_name, out_org); Servlet WAS /oz (Servlet). WEB- INF WEB-INF\sessions., / WAS /oz, OZ. WAS. Process /oz. 166 FORCS Co., LTD

167 Cookie. Client Side USL Module DefOZUSLClient OZUSLClient., USL connection.usingusl true USL USL DefOZUSLServer. createsecureinputstream getsecureoutput Stream. createsecureoutputstream "session_name" DataOutputStream. createsecureinputstream InputStream. << Tag>> <html> <body> <<object id="ozviewer" width="800" height="600" classid="clsid:64da633f-e73b BF CD53" <param name="viewer.namespace" value="activex30\ozviewer"> <param name="connection.servlet" value=" :9080/oz/server"> <param name="connection.reportname" value="group1/test.xml"> <param name="viewer.configmode" value="html"> <param name="connection.usingusl" value="true"> <param name="connection.pcount" value="3"> <param name="connection.args1" value="session_name=oz_session"> <param name="connection.args2" value="fromdate= "> <param name="connection.args3" value="todate= "> </object> </body> </html> <<USLClient.cpp>> // USLClient.cpp: implementation of the CUSLClient class. // ////////////////////////////////////////////////////////////////////// #include <stdafx.h> #include <ozuslclient/ozuslclient.h> #include <ozuslclient/uslclient.h> #include <ozuslclient/jusldatainputstream.h> #include <ozuslclient/jusldataoutputstream.h> #ifdef _DEBUG #undef THIS_FILE FORCS Co., LTD 167

168 OZ API Developer's Guide static char THIS_FILE[]= FILE ; #define new DEBUG_NEW #endif ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// CUSLClient::CUSLClient() { m_str_ip = _T(""); m_str_url = _T(""); m_parameters = NULL; CUSLClient::~CUSLClient() { void CUSLClient::SetServerIP(CString str_ip) { m_str_ip = str_ip; void CUSLClient::SetServerURL(CString str_url) { m_str_url = str_url; void CUSLClient::SetParameter(Parameter * parameters) { m_parameters = parameters; CJDataInputStream * CUSLClient::GetSecuredInputStream(CJDataInputStream *pin) { return new CJUSLDataInputStream(pIn,TRUE, m_str_pub_key_path); CJDataOutputStream * CUSLClient::GetSecuredOutputStream (CJDataOutputStream *pout) { CJUSLDataOutputStream out(pout,false, m_parameters); out.writesessionkeytoserver(); return pout; <<JUSLDataInputStream.cpp>> // JUSLDataInputStream.cpp: implementation of the CJUSLDataInputStream class. 168 FORCS Co., LTD

169 ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "JUSLDataInputStream.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = FILE ; #endif _DEBUG ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// CJUSLDataInputStream::CJUSLDataInputStream(CJDataInputStream *pin, BOOL _isshoulddelete, CString str_pub_key) : CJDataInputStream(pIn, _isshoulddelete) { try{ Jint jsize = pin->readint(); CJArray<Jbyte>* arraybuffer; char * buf = new char[2048]; int readsize = -1; CJByteArrayOutputStream bout; try{ while(true) { readsize = pin->read(buf,0,2048); if (readsize ==0) break; bout.write(buf,0,readsize); arraybuffer = bout.tobytearray(); in->close(); delete buf; catch(czexception *eof){ throw eof; m_pin = new CJDataInputStream (new CJByteArrayInputStream(arrayBuffer->getBuffer(), 0, arraybuffer->length(), TRUE), TRUE); in = m_pin; delete arraybuffer; catch(czexception * ex){ throw ex; FORCS Co., LTD 169

170 OZ API Developer's Guide CJUSLDataInputStream::~CJUSLDataInputStream() { void CJUSLDataInputStream::GetBytes (const CString str, byte* b, int len) { for (int i = 0 ; i < len ; i++) { b[i] =str.getat (i); Jint CJUSLDataInputStream::available() { return m_pin->available(); Jbyte CJUSLDataInputStream::readByte()//throw (CJIOException *) { return m_pin->readbyte(); Jlong CJUSLDataInputStream::readLong()//throw (CJIOException *) { return m_pin->readlong(); Jdouble CJUSLDataInputStream::readDouble()//throw (CJIOException *) { return m_pin->readdouble(); Jfloat CJUSLDataInputStream::readFloat()//throw (CJIOException *) { return m_pin->readfloat(); Jboolean CJUSLDataInputStream::readBoolean()//throw (CJIOException *) { return m_pin->readboolean(); Jshort CJUSLDataInputStream::readShort()//throw (CJIOException *) { return m_pin->readshort(); 170 FORCS Co., LTD

171 Jchar CJUSLDataInputStream::readChar()//throw (CJIOException *) { return m_pin->readchar(); Jint CJUSLDataInputStream::readInt()//throw (CJIOException *) { return m_pin->readint(); CString CJUSLDataInputStream::readUTF()//throw (CJIOException *) { return m_pin->readutf(); CString CJUSLDataInputStream::readString()//throw (CJIOException *) { return m_pin->readstring(); Jint CJUSLDataInputStream::read(CJArray<Jbyte> &b)//throw (CJIOException *) { return m_pin->read(b); Jint CJUSLDataInputStream::read(CJArray<Jbyte> &b, Jint off, Jint len) //throw (CJIOException *) { return m_pin->read(b, off, len); int CJUSLDataInputStream::getRemainSize() { return m_pin->getremainsize(); Jbyte * CJUSLDataInputStream::getBufferPointer() { return m_pin->getbufferpointer(); <<JUSLDataOutputStream.cpp>> // JUSLDataOutputStream.cpp: implementation of the CJUSLDataOutputStream class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" FORCS Co., LTD 171

172 OZ API Developer's Guide #include "JUSLDataOutputStream.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = FILE ; #endif _DEBUG ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// CJUSLDataOutputStream::CJUSLDataOutputStream(CJDataOutputStream *pout, BOOL _isshoulddelete, Parameter *parameter) : CJDataOutputStream(pOut, _isshoulddelete) { m_pout = pout; m_parameter = parameter; CJUSLDataOutputStream::~CJUSLDataOutputStream() { void CJUSLDataOutputStream::WriteSessionKeyToServer() { try{ BOOL b = TRUE; for (int i=0; i<m_parameter->getsize(); i++) { // Read session key from viewer's parameter to wriete this information to //. if(m_parameter->elementat(i).name.comparenocase(_t("session_name")) == 0){ m_pout->writeutf(m_parameter->elementat(i).value); b=false; catch(czexception * e){ throw e; 172 FORCS Co., LTD

173 PKI USL PKI. USL PKI.. Output Stream write(), flush(), flush().., PKI. package ozusl; import java.io.*; import oz.cp.ozuslserver; import javax.servlet.http.httpsession; import java.security.*; import java.security.spec.*; import oz.cp.message.ozcmexception; import pki.lib.*; // PKI import public class PKIUSLServer extends OZUSLServer { protected String share_key_tag = null; protected String share_key_value = null; protected Secure _secu = null; protected EnvelopedMessage _se = null; public PKIUSLServer() { class PKIUSLServerOutputStream extends OutputStream { ByteArrayOutputStream bout; DataOutputStream out_org = null; int b_length = 0; FORCS Co., LTD 173

174 OZ API Developer's Guide public PKIUSLServerOutputStream(HttpSession _http_session, String _report_name, DataOutputStream _out_org) throws OzcmException { ////////////////////// Session ////////////////////// share_key_value = (String)_http_session.getValue(share_key_tag); if (share_key_value==null) throw new OzcmException("session was not found"); /////////////////////////////////////////// bout = new ByteArrayOutputStream(); out_org = _out_org; public void write(int b) throws IOException { bout.write(b); b_length++; public void close() throws IOException { public void flush() throws IOException { try{ ///////////////////// ////////////////////// _secu = Secure.getInstance(); _se = new EnvelopedMessage( _secu); String dummy=_se.encryptinit(secu.web, secu.km, share_key_value); bout.flush(); byte[] b_org = bout.tobytearray(); byte[] encrypt_base64 = _se.encryptupdate(b_org).getbytes(); /////////////////////////////////////// out_org.writeint(encrypt_base64.length); out_org.write(encrypt_base64, 0, encrypt_base64.length); out_org.flush(); catch(exception e){ e.printstacktrace(); throw new IOException("PKI: error... " + e.tostring()); public InputStream createsecureinputstream(datainputstream org_in) throws OzcmException { try{ 174 FORCS Co., LTD

175 share_key_tag = org_in.readutf(); if(share_key_tag.equals("param is null") share_key_tag.equals("") share_key_tag==null) share_key_tag="session_id"; catch(exception e){ share_key_tag = null; e.printstacktrace(); throw new OzcmException( "PKI: can't get share_key! check USL configuration for " + report_name); return null; public OutputStream createsecureoutputstream(dataoutputstream out_org) throws OzcmException { return new AAUSLServerOutputStream(http_session, report_name, out_org); USL USL PKI COM. CJDataInputStream.. <<USLClient.cpp>> // USLClient.cpp: implementation of the CUSLClient class. // ////////////////////////////////////////////////////////////////////// #include <stdafx.h> #include <ozuslclient/ozuslclient.h> #include <ozuslclient/uslclient.h> #include <ozuslclient/axmofe.h> #include <ozuslclient/jusldatainputstream.h> #include <ozuslclient/jusldataoutputstream.h> #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]= FILE ; #define new DEBUG_NEW #endif ////////////////////////////////////////////////////////////////////// // Construction/Destruction FORCS Co., LTD 175

176 OZ API Developer's Guide ////////////////////////////////////////////////////////////////////// CUSLClient::CUSLClient() { m_str_ip = _T(""); m_str_url = _T(""); m_str_pub_key_path = _T(""); m_parameters = NULL; CUSLClient::~CUSLClient() { void CUSLClient::SetServerIP(CString str_ip) { m_str_ip = str_ip; void CUSLClient::SetServerURL(CString str_url) { m_str_url = str_url; void CUSLClient::SetParameter(Parameter * parameters) { m_parameters = parameters; CJDataInputStream * CUSLClient::GetSecuredInputStream(CJDataInputStream *pin) { return new CJUSLDataInputStream(pIn,TRUE, m_str_pub_key_path); CJDataOutputStream * CUSLClient::GetSecuredOutputStream( CJDataOutputStream *pout) { CJUSLDataOutputStream out(pout,false, m_parameters); out.writesessionkeytoserver(); m_str_pub_key_path = out.getpublickeypath(); return pout; <<JUSLDataInputStream.cpp>> // JUSLDataInputStream.cpp: implementation of the CJUSLDataInputStream class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" 176 FORCS Co., LTD

177 #include "JUSLDataInputStream.h" #include <ozuslclient/axmofe.h> #include <ozuslclient/base64.h> #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = FILE ; #endif _DEBUG ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// CJUSLDataInputStream::CJUSLDataInputStream(CJDataInputStream *pin, BOOL _isshoulddelete, CString str_pub_key) : CJDataInputStream(pIn, _isshoulddelete) { try{ Jint jsize = pin->readint(); //byte* b_org = new byte[size]; CJArray<Jbyte>* arraybuffer; char * buf = new char[2048]; int readsize = -1; CJByteArrayOutputStream bout; try{ while(true ) { readsize = pin->read(buf,0,2048); if (readsize ==0) break; bout.write(buf,0,readsize); arraybuffer = bout.tobytearrayforsign(); in->close(); delete buf; catch(czexception *eof){ throw eof; IAxMOFE_NCA pki; if(!pki.createdispatch(_t("axmofe.axmofe_nca.1"), NULL)) { char * tmp = arraybuffer->getbuffer(); int ssize = arraybuffer->length(); CString decrypt_base64 = pki.symmdecryptdataex(tmp, pki.readdatafile(str_pub_key), _T("SEED")); FORCS Co., LTD 177

178 OZ API Developer's Guide byte* tmpbyte2 = new byte[decrypt_base64.getlength()]; int dsie = decrypt_base64.getlength(); int size = 0; CTP_Base64Decode((unsigned char*) decrypt_base64.getbuffer(decrypt_base64.getlength()), tmpbyte2, &size); m_pin = new CJDataInputStream(new CJByteArrayInputStream((char*)tmpByte2,0,size, TRUE), TRUE); in = m_pin; delete arraybuffer; catch(czexception * ex){ throw ex; CJUSLDataInputStream::~CJUSLDataInputStream() { /* if(m_pin) { m_pin->close(); delete m_pin; */ void CJUSLDataInputStream::GetBytes (const CString str, byte* b, int len) { for (int i = 0 ; i < len ; i++) { b[i] =str.getat (i); Jint CJUSLDataInputStream::available() { return m_pin->available(); Jbyte CJUSLDataInputStream::readByte()//throw (CJIOException *) { return m_pin->readbyte(); 178 FORCS Co., LTD

179 Jlong CJUSLDataInputStream::readLong()//throw (CJIOException *) { return m_pin->readlong(); Jdouble CJUSLDataInputStream::readDouble()//throw (CJIOException *) { return m_pin->readdouble(); Jfloat CJUSLDataInputStream::readFloat()//throw (CJIOException *) { return m_pin->readfloat(); Jboolean CJUSLDataInputStream::readBoolean()//throw (CJIOException *) { return m_pin->readboolean(); Jshort CJUSLDataInputStream::readShort()//throw (CJIOException *) { return m_pin->readshort(); Jchar CJUSLDataInputStream::readChar()//throw (CJIOException *) { return m_pin->readchar(); Jint CJUSLDataInputStream::readInt()//throw (CJIOException *) { return m_pin->readint(); CString CJUSLDataInputStream::readUTF()//throw (CJIOException *) { return m_pin->readutf(); CString CJUSLDataInputStream::readString()//throw (CJIOException *) { return m_pin->readstring(); Jint CJUSLDataInputStream::read(CJArray<Jbyte> &b)//throw (CJIOException *) { return m_pin->read(b); FORCS Co., LTD 179

180 OZ API Developer's Guide Jint CJUSLDataInputStream::read(CJArray<Jbyte> &b, Jint off, Jint len) //throw (CJIOException *) { return m_pin->read(b, off, len); int CJUSLDataInputStream::getRemainSize() { return m_pin->getremainsize(); Jbyte * CJUSLDataInputStream::getBufferPointer() { return m_pin->getbufferpointer(); <<JUSLDataOutputStream.cpp>> // JUSLDataOutputStream.cpp: implementation of the CJUSLDataOutputStream class. ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "JUSLDataOutputStream.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = FILE ; #endif _DEBUG ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// CJUSLDataOutputStream::CJUSLDataOutputStream(CJDataOutputStream *pout, BOOL _isshoulddelete, Parameter *parameter) : CJDataOutputStream(pOut, _isshoulddelete) { m_pout = pout; m_parameter = parameter; m_str_pub_key_path = _T(""); CJUSLDataOutputStream::~CJUSLDataOutputStream() { void CJUSLDataOutputStream::WriteSessionKeyToServer() 180 FORCS Co., LTD

181 { try{ BOOL b = TRUE; for (int i=0; i<m_parameter->getsize(); i++) { // Read session key from viewer's parameter to wriete this information to // if(m_parameter->elementat(i).name.comparenocase(_t("session_name")) == 0){ m_pout->writeutf(m_parameter->elementat(i).value); b=false; //Read ksign's key path to decode the ecoded data from if (m_parameter->elementat(i).name.comparenocase(_t("ksign_path")) == 0) { m_str_pub_key_path = m_parameter->elementat(i).value; catch(czexception * e){ throw e; CString CJUSLDataOutputStream::GetPublicKeyPath() { return m_str_pub_key_path; PKI PKI ActiveX. PKI ActiveX byte[]. String PKI String. byte[] byte[]. String base64.. Client PKI ActiveX PC ActiveX. VJ++ COM Wrapper PKI. FORCS Co., LTD 181

182 OZ API Developer's Guide PKI Import USL. 182 FORCS Co., LTD

untitled

untitled API... 3 Class Cache... 5 Class ConnectionPool... 10 Class DataBind... 15 Class Log... 19 Class Module... 23 Class Monitor... 36 Class Repository... 40 Class Service... 86 Class Viewer... 89 API... 97

More information

untitled

untitled API... 5 Class Cache... 7 Class ConnectionPool... 12 Class DataBind... 17 Class Log... 21 Class Module... 25 Class Monitor... 43 Class Repository... 47 Class Service... 92 Class Viewer... 96 API... 105

More information

untitled

untitled 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......

More information

untitled

untitled A Leader of Enterprise e-business Solution API... 3 Class Cache... 5 Class ConnectionPool... 9 Class DataBind... 13 Class Log... 16 Class Module... 19 Class Monitor... 24 Class Repository... 27 User Data

More information

untitled

untitled A Leader of Enterprise e-business Solution API... 3 Class Cache... 5 Class ConnectionPool... 9 Class DataBind... 13 Class Log... 16 Class Module... 19 Class Monitor... 25 Class Repository... 28 User Data

More information

untitled

untitled API... 3 Class Cache... 5 Class ConnectionPool... 9 Class DataBind... 13 Class Log... 16 Class Mail... 19 Class Module... 26 Class Monitor... 35 Class Repository... 38 API... 71 Class Program... 73 Class

More information

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET 135-080 679-4 13 02-3430-1200 1 2 11 2 12 2 2 8 21 Connection 8 22 UniSQLConnection 8 23 8 24 / / 9 3 UniSQL 11 31 OID 11 311 11 312 14 313 16 314 17 32 SET 19 321 20 322 23 323 24 33 GLO 26 331 GLO 26

More information

untitled

untitled A Leader of Enterprise e-business Solution API... 3 Class Cache... 5 Class ConnectionPool... 9 Class DataBind... 16 Class Log... 19 Class Mail... 22 Class Module... 29 Class Monitor... 40 API... 43 Class

More information

자바-11장N'1-502

자바-11장N'1-502 C h a p t e r 11 java.net.,,., (TCP/IP) (UDP/IP).,. 1 ISO OSI 7 1977 (ISO, International Standards Organization) (OSI, Open Systems Interconnection). 6 1983 X.200. OSI 7 [ 11-1] 7. 1 (Physical Layer),

More information

14-Servlet

14-Servlet JAVA Programming Language Servlet (GenericServlet) HTTP (HttpServlet) 2 (1)? CGI 3 (2) http://jakarta.apache.org JSDK(Java Servlet Development Kit) 4 (3) CGI CGI(Common Gateway Interface) /,,, Client Server

More information

untitled

untitled Push... 2 Push... 4 Push... 5 Push... 13 Push... 15 1 FORCS Co., LTD A Leader of Enterprise e-business Solution Push (Daemon ), Push Push Observer. Push., Observer. Session. Thread Thread. Observer ID.

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 2... ( ). ( ). @ vs. logic data method variable behavior attribute method field Flow (Type), ( ) member @ () : C program Method A ( ) Method B ( ) Method C () program : Java, C++, C# data @ Program

More information

Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Cras

Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Cras Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Crash Unity SDK... Log & Crash Search. - Unity3D v4.0 ios

More information

12-file.key

12-file.key 11 (String).. java.lang.stringbuffer. s String s = "abcd"; s = s + "e"; a b c d e a b c d e ,., "910359,, " "910359" " " " " (token) (token),, (delimiter). java.util.stringtokenizer String s = "910359,,

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 3 if, if else, if else if, switch case for, while, do while break, continue : System.in, args, JOptionPane for (,, ) @ vs. logic data method variable Data Data Flow (Type), ( ) @ Member field

More information

Mobile Service > IAP > Android SDK [ ] IAP SDK TOAST SDK. IAP SDK. Android Studio IDE Android SDK Version (API Level 10). Name Reference V

Mobile Service > IAP > Android SDK [ ] IAP SDK TOAST SDK. IAP SDK. Android Studio IDE Android SDK Version (API Level 10). Name Reference V Mobile Service > IAP > Android SDK IAP SDK TOAST SDK. IAP SDK. Android Studio IDE 2.3.3 Android SDK Version 2.3.3 (API Level 10). Name Reference Version License okhttp http://square.github.io/okhttp/ 1.5.4

More information

rmi_박준용_final.PDF

rmi_박준용_final.PDF (RMI) - JSTORM http://wwwjstormpekr (RMI)- Document title: Document file name: Revision number: Issued by: Document Information (RMI)- rmi finaldoc Issue Date: Status:

More information

02 C h a p t e r Java

02 C h a p t e r Java 02 C h a p t e r Java Bioinformatics in J a va,, 2 1,,,, C++, Python, (Java),,, (http://wwwbiojavaorg),, 13, 3D GUI,,, (Java programming language) (Sun Microsystems) 1995 1990 (green project) TV 22 CHAPTER

More information

<4D F736F F F696E74202D20C1A63234C0E520C0D4C3E2B7C228B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20C1A63234C0E520C0D4C3E2B7C228B0ADC0C729205BC8A3C8AF20B8F0B5E55D> Power Java 제 24 장입출력 이번장에서학습할내용 스트림이란? 스트림의분류 바이트스트림 문자스트림 형식입출력 명령어행에서입출력 파일입출력 스트림을이용한입출력에대하여살펴봅시다. 스트림 (stream) 스트림 (stream) 은 순서가있는데이터의연속적인흐름 이다. 스트림은입출력을물의흐름처럼간주하는것이다. 스트림들은연결될수있다. 중간점검문제 1. 자바에서는입출력을무엇이라고추상화하는가?

More information

신림프로그래머_클린코드.key

신림프로그래머_클린코드.key CLEAN CODE 6 11st Front Dev. Team 6 1. 2. 3. checked exception 4. 5. 6. 11 : 2 4 : java (50%), javascript (35%), SQL/PL-SQL (15%) : Spring, ibatis, Oracle, jquery ? , (, ) ( ) 클린코드를 무시한다면 . 6 1. ,,,!

More information

Microsoft PowerPoint - Supplement-03-TCP Programming.ppt [호환 모드]

Microsoft PowerPoint - Supplement-03-TCP Programming.ppt [호환 모드] - Socket Programming in Java - 목차 소켓소개 자바에서의 TCP 프로그램작성방법 주요클래스와메소드 HTTP 프로토콜을이용한예제 에코프로그램 Q/A 에코프로그램 - EchoServer 에코프로그램 - EchoClient TCP Programming 1 소켓소개 IP, Port, and Socket 포트 (Port): 전송계층에서통신을수행하는응용프로그램을찾기위한주소

More information

I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r

I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r Jakarta is a Project of the Apache

More information

JMF2_심빈구.PDF

JMF2_심빈구.PDF JMF JSTORM http://wwwjstormpekr Issued by: < > Document Information Document title: Document file name: Revision number: Issued by: JMF2_ doc Issue Date: Status: < > raica@nownurinet

More information

Microsoft PowerPoint - 04-UDP Programming.ppt

Microsoft PowerPoint - 04-UDP Programming.ppt Chapter 4. UDP Dongwon Jeong djeong@kunsan.ac.kr http://ist.kunsan.ac.kr/ Dept. of Informatics & Statistics 목차 UDP 1 1 UDP 개념 자바 UDP 프로그램작성 클라이언트와서버모두 DatagramSocket 클래스로생성 상호간통신은 DatagramPacket 클래스를이용하여

More information

Microsoft PowerPoint - 03-TCP Programming.ppt

Microsoft PowerPoint - 03-TCP Programming.ppt Chapter 3. - Socket in Java - 목차 소켓소개 자바에서의 프로그램작성방법 주요클래스와메소드 HTTP 프로토콜을이용한예제 에코프로그램 에코프로그램 - EchoServer 에코프로그램 - EchoClient Q/A 1 1 소켓소개 IP,, and Socket 포트 (): 전송계층에서통신을수행하는응용프로그램을찾기위한주소 소켓 (Socket):

More information

歯JavaExceptionHandling.PDF

歯JavaExceptionHandling.PDF (2001 3 ) from Yongwoo s Park Java Exception Handling Programming from Yongwoo s Park 1 Java Exception Handling Programming from Yongwoo s Park 2 1 4 11 4 4 try/catch 5 try/catch/finally 9 11 12 13 13

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 1,..... @ 1 Green Project 1991 Oak Java 1995. 5 December '90 by Patrick Naughton, Mike Sheridan and James Gosling Embedded in various consumer electronic device 1992. 9. 3 Star 7 1993 www portability

More information

자바 프로그래밍

자바 프로그래밍 5 (kkman@mail.sangji.ac.kr) (Class), (template) (Object) public, final, abstract [modifier] class ClassName { // // (, ) Class Circle { int radius, color ; int x, y ; float getarea() { return 3.14159

More information

untitled

untitled OZ Framework Manual OZ Framework... 2 POST... 3 DataModule POST... 3 FXDataModule POST Custom... 5 Servlet API (for OZ Java Server)... 12 DataModuleFactory... 12 DataModule... 13 FXDataModule... 19 Servlet

More information

FileMaker ODBC and JDBC Guide

FileMaker ODBC and JDBC Guide FileMaker 13 5 5 5 6 6 6 7 7 8 8 8 8 9 9 10 10 11 11 12 12 12 12 12 12 13 13 14 14 16 16 18 4 19 19 20 20 21 21 21 23 23 23 23 25 26 26 26 26 27 28 28 28 28 29 31 31 32 33 33 33 33 34 34 35 35 35 36 1

More information

<4D F736F F F696E74202D20C1A63235C0E520B3D7C6AEBFF6C5A920C7C1B7CEB1D7B7A1B9D628B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20C1A63235C0E520B3D7C6AEBFF6C5A920C7C1B7CEB1D7B7A1B9D628B0ADC0C729205BC8A3C8AF20B8F0B5E55D> Power Java 제 25 장네트워크프로그래밍 이번장에서학습할내용 네트워크프로그래밍의개요 URL 클래스 TCP를이용한통신 TCP를이용한서버제작 TCP를이용한클라이언트제작 UDP 를이용한통신 자바를이용하여서 TCP/IP 통신을이용하는응응프로그램을작성하여봅시다. 서버와클라이언트 서버 (Server): 사용자들에게서비스를제공하는컴퓨터 클라이언트 (Client):

More information

Interstage5 SOAP서비스 설정 가이드

Interstage5 SOAP서비스 설정 가이드 Interstage 5 Application Server ( Solaris ) SOAP Service Internet Sample Test SOAP Server Application SOAP Client Application CORBA/SOAP Server Gateway CORBA/SOAP Gateway Client INTERSTAGE SOAP Service

More information

JavaGeneralProgramming.PDF

JavaGeneralProgramming.PDF , Java General Programming from Yongwoo s Park 1 , Java General Programming from Yongwoo s Park 2 , Java General Programming from Yongwoo s Park 3 < 1> (Java) ( 95/98/NT,, ) API , Java General Programming

More information

04장

04장 20..29 1: PM ` 199 ntech4 C9600 2400DPI 175LPI T CHAPTER 4 20..29 1: PM ` 200 ntech4 C9600 2400DPI 175LPI T CHAPTER 4.1 JSP (Comment) HTML JSP 3 home index jsp HTML JSP 15 16 17 18 19 20

More information

05-class.key

05-class.key 5 : 2 (method) (public) (private) (interface) 5.1 (Method), (public method) (private method) (constructor), 3 4 5.2 (client). (receiver)., System.out.println("Hello"); (client object) (receiver object)

More information

untitled

untitled OZ Framework Manual OZ Framework... 2 POST... 3 DataModule POST... 3 FXDataModule POST Custom... 5 Servlet API (for OZ Java Server)... 12 DataModuleFactory... 12 DataModule... 13 FXDataModule... 19...

More information

API STORE 키발급및 API 사용가이드 Document Information 문서명 : API STORE 언어별 Client 사용가이드작성자 : 작성일 : 업무영역 : 버전 : 1 st Draft. 서브시스템 : 문서번호 : 단계 : Docum

API STORE 키발급및 API 사용가이드 Document Information 문서명 : API STORE 언어별 Client 사용가이드작성자 : 작성일 : 업무영역 : 버전 : 1 st Draft. 서브시스템 : 문서번호 : 단계 : Docum API STORE 키발급및 API 사용가이드 Document Information 문서명 : API STORE 언어별 Client 사용가이드작성자 : 작성일 : 2012.11.23 업무영역 : 버전 : 1 st Draft. 서브시스템 : 문서번호 : 단계 : Document Distribution Copy Number Name(Role, Title) Date

More information

Chap12

Chap12 12 12Java RMI 121 RMI 2 121 RMI 3 - RMI, CORBA 121 RMI RMI RMI (remote object) 4 - ( ) UnicastRemoteObject, 121 RMI 5 class A - class B - ( ) class A a() class Bb() 121 RMI 6 RMI / 121 RMI RMI 1 2 ( 7)

More information

untitled

untitled FORCS Co., LTD 1 2 FORCS Co., LTD . Publishing Wizard Publishing Wizard Publishing Wizard Publishing Wizard FORCS Co., LTD 3 Publishing Wizard Publidhing Wizard HTML, ASP, JSP. Publishing Wizard [] []

More information

mytalk

mytalk 한국정보보호학회소프트웨어보안연구회 총괄책임자 취약점분석팀 안준선 ( 항공대 ) 도경구 ( 한양대 ) 도구개발팀도경구 ( 한양대 ) 시큐어코딩팀 오세만 ( 동국대 ) 전체적인 그림 IL Rules Flowgraph Generator Flowgraph Analyzer 흐름그래프 생성기 흐름그래프 분석기 O parser 중간언어 O 파서 RDL

More information

13-Java Network Programming

13-Java Network Programming JAVA Programming Language JAVA Network Programming IP Address(Internet Protocol Address) URL(Uniform Resource Location) TCP(Transmission Control Protocol) Socket UDP(User Datagram Protocol) Client / Server

More information

FileMaker ODBC and JDBC Guide

FileMaker ODBC and JDBC Guide FileMaker 14 5 5 5 5 6 6 6 7 7 7 8 8 8 9 9 10 10 11 11 12 12 12 12 12 13 13 14 15 16 17 18 18 19 19 20 20 20 21 21 21 22 22 22 22 23 24 24 24 24 25 27 27 28 29 29 29 29 30 30 31 31 31 32 1 1 1 1 1 1 1

More information

PWR PWR HDD HDD USB USB Quick Network Setup Guide xdsl/cable Modem PC DVR 1~3 1.. DVR DVR IP xdsl Cable xdsl Cable PC PC DDNS (

PWR PWR HDD HDD USB USB Quick Network Setup Guide xdsl/cable Modem PC DVR 1~3 1.. DVR DVR IP xdsl Cable xdsl Cable PC PC DDNS ( PWR PWR HDD HDD USB USB Quick Network Setup Guide xdsl/cable Modem PC DVR 1~3 1.. DVR DVR IP xdsl Cable xdsl Cable PC PC DDNS (http://ddns.hanwha-security.com) Step 1~5. Step, PC, DVR Step 1. Cable Step

More information

교육자료

교육자료 THE SYS4U DODUMENT Java Reflection & Introspection 2012.08.21 김진아사원 2012 SYS4U I&C All rights reserved. 목차 I. 개념 1. Reflection 이란? 2. Introspection 이란? 3. Reflection 과 Introspection 의차이점 II. 실제사용예 1. Instance의생성

More information

슬라이드 1

슬라이드 1 UNIT 16 예외처리 로봇 SW 교육원 3 기 최상훈 학습목표 2 예외처리구문 try-catch-finally 문을사용핛수있다. 프로그램오류 3 프로그램오류의종류 컴파일에러 (compile-time error) : 컴파일실행시발생 럮타임에러 (runtime error) : 프로그램실행시발생 에러 (error) 프로그램코드에의해서해결될수없는심각핚오류 ex)

More information

untitled

untitled - -, (insert) (delete) - - (insert) (delete) (top ) - - (insert) (rear) (delete) (front) A A B top A B C top push(a) push(b) push(c) A B top pop() top A B D push(d) top #define MAX_STACK_SIZE 100 int

More information

Cluster management software

Cluster management software 자바네트워크프로그래밍 (OCJP 국제공인자격취득중심 ) 충북대학교 최민 기본예제 예외클래스를정의하고사용하는예제 class NewException extends Exception { public class ExceptionTest { static void methoda() throws NewException { System.out.println("NewException

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 4 (Object) (Class) (Instance) (Method) (Constructor) Memory 1 UML 1 @ & 1 (Real World) (Software World) @ &.. () () @ & 2 (Real World) (Software World) OOA/ Modeling Abstraction Instantiation

More information

PowerPoint Presentation

PowerPoint Presentation 객체지향프로그래밍 오류처리 손시운 ssw5176@kangwon.ac.kr 오류메시지를분석한다. 오류메시지에서많은내용을알수있다. 2 디버깅 디버거를사용하면프로그램에서쉽게오류를감지하고진단할수있다. 디버거는중단점을설정하여서프로그램의실행을제어할수있으며문장 단위로실행하거나변수의값을살펴볼수있다. 3 이클립스에서디버깅 4 이클립스에서디버깅 5 이클립스의디버깅명령어 6 예외처리

More information

07 자바의 다양한 클래스.key

07 자바의 다양한 클래스.key [ 07 ] . java.lang Object, Math, String, StringBuffer Byte, Short, Integer, Long, Float, Double, Boolean, Character. java.util Random, StringTokenizer Calendar, GregorianCalendar, Date. Collection, List,

More information

비긴쿡-자바 00앞부속

비긴쿡-자바 00앞부속 IT COOKBOOK 14 Java P r e f a c e Stay HungryStay Foolish 3D 15 C 3 16 Stay HungryStay Foolish CEO 2005 L e c t u r e S c h e d u l e 1 14 PPT API C A b o u t T h i s B o o k IT CookBook for Beginner Chapter

More information

J2EE Concepts

J2EE Concepts ! Introduction to J2EE (1) - J2EE Servlet/JSP/JDBC iseminar.. 1544-3355 ( ) iseminar Chat. 1 Who Are We? Business Solutions Consultant Oracle Application Server 10g Business Solutions Consultant Oracle10g

More information

thesis

thesis CORBA TMN Surveillance System DPNM Lab, GSIT, POSTECH Email: mnd@postech.ac.kr Contents Motivation & Goal Related Work CORBA TMN Surveillance System Implementation Conclusion & Future Work 2 Motivation

More information

PowerPoint Presentation

PowerPoint Presentation 객체지향프로그래밍 오류처리 손시운 ssw5176@kangwon.ac.kr 오류메시지를분석한다. 오류메시지에서많은내용을알수있다. 2 디버깅 디버거를사용하면프로그램에서쉽게오류를감지하고진단할수있다. 디버거는중단점을설정하여서프로그램의실행을제어할수있으며문장 단위로실행하거나변수의값을살펴볼수있다. 3 이클립스에서디버깅 4 이클립스에서디버깅 5 이클립스의디버깅명령어 6 예외처리

More information

ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE (Online Upgrade) ORANGE CONFIGURATION ADMIN O

ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE (Online Upgrade) ORANGE CONFIGURATION ADMIN O Orange for ORACLE V4.0 Installation Guide ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE...1 1....2 1.1...2 1.2...2 1.2.1...2 1.2.2 (Online Upgrade)...11 1.3 ORANGE CONFIGURATION ADMIN...12 1.3.1 Orange Configuration

More information

untitled

untitled A Leader of Enterprise e-business Solution FORCS Co., LTD 1 OZ Application Getting Started (ver 5.1) 2 FORCS Co., LTD A Leader of Enterprise e-business Solution FORCS Co., LTD 3 OZ Application Getting

More information

MasoJava4_Dongbin.PDF

MasoJava4_Dongbin.PDF JSTORM http://wwwjstormpekr Issued by: < > Revision: Document Information Document title: Document file name: MasoJava4_Dongbindoc Revision number: Issued by: < > SI, dbin@handysoftcokr

More information

NoSQL

NoSQL MongoDB Daum Communications NoSQL Using Java Java VM, GC Low Scalability Using C Write speed Auto Sharding High Scalability Using Erlang Read/Update MapReduce R/U MR Cassandra Good Very Good MongoDB Good

More information

Network seminar.key

Network seminar.key Intro to Network .. 2 4 ( ) ( ). ?!? ~! This is ~ ( ) /,,,???? TCP/IP Application Layer Transfer Layer Internet Layer Data Link Layer Physical Layer OSI 7 TCP/IP Application Layer Transfer Layer 3 4 Network

More information

PowerPoint Presentation

PowerPoint Presentation Package Class 1 Heeseung Jo 목차 section 1 패키지개요와패키지의사용 section 2 java.lang 패키지의개요 section 3 Object 클래스 section 4 포장 (Wrapper) 클래스 section 5 문자열의개요 section 6 String 클래스 section 7 StringBuffer 클래스 section

More information

JMF3_심빈구.PDF

JMF3_심빈구.PDF JMF JSTORM http://wwwjstormpekr Issued by: < > Revision: Document Information Document title: Document file name: Revision number: Issued by: JMF3_ doc Issue Date:

More information

09-interface.key

09-interface.key 9 Database insert(record r): boolean find(key k): Record 1 Record getkey(): Key * Record Key Database.? Key equals(key y): boolean Database insert(record r): boolean find(key k): Record * Database OK 1

More information

untitled

untitled OZ User Data Store Manual... 6 UDS... 6 JDBC UDS... 12 Connection UDS... 17 Connection UDS... 23 DataAction... 31 DataAction... 31 - DataAction... 46... 68 HttpRequest... 76 ResultSet... 83 OZ User Data

More information

Java

Java Java http://cafedaumnet/pway Chapter 1 1 public static String format4(int targetnum){ String strnum = new String(IntegertoString(targetNum)); StringBuffer resultstr = new StringBuffer(); for(int i = strnumlength();

More information

USB USB DV25 DV25 REC SRN-475S REC SRN-475S LAN POWER LAN POWER Quick Network Setup Guide xdsl/cable Modem PC DVR 1~3 1.. DVR DVR IP xdsl Cable xdsl C

USB USB DV25 DV25 REC SRN-475S REC SRN-475S LAN POWER LAN POWER Quick Network Setup Guide xdsl/cable Modem PC DVR 1~3 1.. DVR DVR IP xdsl Cable xdsl C USB USB DV25 DV25 REC SRN-475S REC SRN-475S LAN POWER LAN POWER Quick Network Setup Guide xdsl/cable Modem PC DVR 1~3 1.. DVR DVR IP xdsl Cable xdsl Cable PC PC Step 1~5. Step, PC, DVR Step 1. Cable Step

More information

Microsoft PowerPoint - 18-DataSource.ppt

Microsoft PowerPoint - 18-DataSource.ppt 18 장 : JDBC DataSource DataSource JDBC 2.0의 javax.sql 패키지에포함되어도입됨 DataSource 인터페이스는데이터베이스커넥션을만들거나사용하는데좀더유연한아키텍처를제공하기위해도입됨 DataSource를이용할경우, 클라이언트코드는한줄도바꾸지않고서도다른데이터베이스에접속할수있도록해줌 즉 DataSource 는커넥션상세사항들을캡슐화

More information

Network Programming

Network Programming Part 4 자바네트워크프로그래밍 1. Java IO 2. 스레드 (Thread) 클래스의소개 3. Java Socket 1. 자바입출력 Java_source->src->ch11 1.0 I/O Stream

More information

untitled

untitled A Leader of Enterprise e-business Solution FORCS Co., LTD 1 OZ Application Designer Getting Started 2 FORCS Co., LTD A Leader of Enterprise e-business Solution FORCS Co., LTD 3 OZ Application Designer

More information

untitled

untitled A Leader of Enterprise e-business Solution FORCS Co., LTD 1 OZ Application Designer Getting Started 2 FORCS Co., LTD A Leader of Enterprise e-business Solution FORCS Co., LTD 3 OZ Application Designer

More information

FileMaker 15 ODBC 및 JDBC 설명서

FileMaker 15 ODBC 및 JDBC 설명서 FileMaker 15 ODBC JDBC 2004-2016 FileMaker, Inc.. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker FileMaker Go FileMaker, Inc.. FileMaker WebDirect FileMaker, Inc... FileMaker.

More information

1

1 1 1....6 1.1...6 2. Java Architecture...7 2.1 2SDK(Software Development Kit)...8 2.2 JRE(Java Runtime Environment)...9 2.3 (Java Virtual Machine, JVM)...10 2.4 JVM...11 2.5 (runtime)jvm...12 2.5.1 2.5.2

More information

JAVA PROGRAMMING 실습 09. 예외처리

JAVA PROGRAMMING 실습 09. 예외처리 2015 학년도 2 학기 예외? 프로그램실행중에발생하는예기치않은사건 예외가발생하는경우 정수를 0으로나누는경우 배열의크기보다큰인덱스로배열의원소를접근하는경우 파일의마지막부분에서데이터를읽으려고하는경우 예외처리 프로그램에문제를발생시키지않고프로그램을실행할수있게적절한조치를취하는것 자바는예외처리기를이용하여예외처리를할수있는기법제공 자바는예외를객체로취급!! 나뉨수를입력하시오

More information

untitled

untitled A Leader of Enterprise e-business Solution FORCS Co., LTD 1 OZ Application Getting Started 2 FORCS Co., LTD A Leader of Enterprise e-business Solution FORCS Co., LTD 3 OZ Application Getting Started 'OZ

More information

untitled

untitled FORCS Co., LTD 1 OZ Scheduler User's Guide 2 FORCS Co., LTD .,. Manual Getting Started Getting Started Description....... FORCS Co., LTD 3 OZ Scheduler User's Guide API,,. API, UDS, USL, API API... 4 FORCS

More information

11 템플릿적용 - Java Program Performance Tuning (김명호기술이사)

11 템플릿적용 - Java Program Performance Tuning (김명호기술이사) Java Program Performance Tuning ( ) n (Primes0) static List primes(int n) { List primes = new ArrayList(n); outer: for (int candidate = 2; n > 0; candidate++) { Iterator iter = primes.iterator(); while

More information

쉽게 풀어쓴 C 프로그래밊

쉽게 풀어쓴 C 프로그래밊 Power Java 제 27 장데이터베이스 프로그래밍 이번장에서학습할내용 자바와데이터베이스 데이터베이스의기초 SQL JDBC 를이용한프로그래밍 변경가능한결과집합 자바를통하여데이터베이스를사용하는방법을학습합니다. 자바와데이터베이스 JDBC(Java Database Connectivity) 는자바 API 의하나로서데이터베이스에연결하여서데이터베이스안의데이터에대하여검색하고데이터를변경할수있게한다.

More information

Microsoft PowerPoint - java1-lab5-ImageProcessorTestOOP.pptx

Microsoft PowerPoint - java1-lab5-ImageProcessorTestOOP.pptx 2018 학년도 1 학기 JAVA 프로그래밍 II 514760-1 2018 년봄학기 5/10/2018 박경신 Lab#1 (ImageTest) Lab#1 은영상파일 (Image) 을읽어서정보를출력 Java Tutorials Lesson: Working with Images https://docs.oracle.com/javase/tutorial/2d/images/index.html

More information

Java ...

Java ... 컴퓨터언어 1 Java 제어문 조성일 조건문 : if, switch 어떠한조건을조사하여각기다른명령을실행 if 문, switch 문 if 문 if - else 문형식 if 문형식 if ( 조건식 ) { 명령문 1; 명령문 2;... if ( 조건식 ) { 명령문 1; 명령문 2;... else { 명령문 a; 명령문 b;... 예제 1 정수를입력받아짝수와홀수를판별하는프로그램을작성하시오.

More information

파일로입출력하기II - 파일출력클래스중에는데이터를일정한형태로출력하는기능을가지고있다. - PrintWriter와 PrintStream을사용해서원하는형태로출력할수있다. - PrintStream은구버전으로가능하면 PrintWriter 클래스를사용한다. PrintWriter

파일로입출력하기II - 파일출력클래스중에는데이터를일정한형태로출력하는기능을가지고있다. - PrintWriter와 PrintStream을사용해서원하는형태로출력할수있다. - PrintStream은구버전으로가능하면 PrintWriter 클래스를사용한다. PrintWriter 파일로입출력하기II - 파일출력클래스중에는데이터를일정한형태로출력하는기능을가지고있다. - PrintWriter와 PrintStream을사용해서원하는형태로출력할수있다. - PrintStream은구버전으로가능하면 PrintWriter 클래스를사용한다. PrintWriter 클래스의사용법은다음과같다. PrintWriter writer = new PrintWriter("output.txt");

More information

목차 INDEX JSON? - JSON 개요 - JSONObject - JSONArray 서울시공공데이터 API 살펴보기 - 요청인자살펴보기 - Result Code - 출력값 HttpClient - HttpHelper 클래스작성 - JSONParser 클래스작성 공공

목차 INDEX JSON? - JSON 개요 - JSONObject - JSONArray 서울시공공데이터 API 살펴보기 - 요청인자살펴보기 - Result Code - 출력값 HttpClient - HttpHelper 클래스작성 - JSONParser 클래스작성 공공 메신저의새로운혁신 채팅로봇 챗봇 (Chatbot) 입문하기 소 이 메 속 : 시엠아이코리아 름 : 임채문 일 : soulgx@naver.com 1 목차 INDEX JSON? - JSON 개요 - JSONObject - JSONArray 서울시공공데이터 API 살펴보기 - 요청인자살펴보기 - Result Code - 출력값 HttpClient - HttpHelper

More information

03-JAVA Syntax(2).PDF

03-JAVA Syntax(2).PDF JAVA Programming Language Syntax of JAVA (literal) (Variable and data types) (Comments) (Arithmetic) (Comparisons) (Operators) 2 HelloWorld application Helloworldjava // class HelloWorld { //attribute

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 배효철 th1g@nate.com 1 목차 표준입출력 파일입출력 2 표준입출력 표준입력은키보드로입력하는것, 주로 Scanner 클래스를사용. 표준출력은화면에출력하는메소드를사용하는데대표적으로 System.out.printf( ) 를사용 3 표준입출력 표준출력 : System.out.printlf() 4 표준입출력 Example 01 public static void

More information

1217 WebTrafMon II

1217 WebTrafMon II (1/28) (2/28) (10 Mbps ) Video, Audio. (3/28) 10 ~ 15 ( : telnet, ftp ),, (4/28) UDP/TCP (5/28) centralized environment packet header information analysis network traffic data, capture presentation network

More information

[ 정보 ] 과학고 R&E 결과보고서 Monte Carlo Method 를이용한 고교배정시뮬레이션 연구기간 : ~ 연구책임자 : 강대욱 ( 전남대전자컴퓨터공학부 ) 지도교사 : 최미경 ( 전남과학고정보 컴퓨터과 ) 참여학생 : 박진명 ( 전

[ 정보 ] 과학고 R&E 결과보고서 Monte Carlo Method 를이용한 고교배정시뮬레이션 연구기간 : ~ 연구책임자 : 강대욱 ( 전남대전자컴퓨터공학부 ) 지도교사 : 최미경 ( 전남과학고정보 컴퓨터과 ) 참여학생 : 박진명 ( 전 [ 정보 ] 과학고 R&E 결과보고서 Monte Carlo Method 를이용한 고교배정시뮬레이션 연구기간 : 2013. 3 ~ 2014. 2 연구책임자 : 강대욱 ( 전남대전자컴퓨터공학부 ) 지도교사 : 최미경 ( 전남과학고정보 컴퓨터과 ) 참여학생 : 박진명 ( 전남과학고 1학년 ) 박수형 ( 전남과학고 1학년 ) 서범수 ( 전남과학고 1학년 ) 김효정

More information

자바GUI실전프로그래밍2_장대원.PDF

자바GUI실전프로그래밍2_장대원.PDF JAVA GUI - 2 JSTORM http://wwwjstormpekr JAVA GUI - 2 Issued by: < > Document Information Document title: JAVA GUI - 2 Document file name: Revision number: Issued by: Issue Date:

More information

chapter1,2.doc

chapter1,2.doc JavaServer Pages Version 08-alpha copyright2001 B l u e N o t e all rights reserved http://jspboolpaecom vesion08-alpha, UML (?) part1part2 Part1 part2 part1 JSP Chapter2 ( ) Part 1 chapter 1 JavaServer

More information

FileMaker ODBC 및 JDBC 가이드

FileMaker ODBC 및 JDBC 가이드 FileMaker ODBC JDBC 2004-2019 FileMaker, Inc.. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker, FileMaker Cloud, FileMaker Go FileMaker, Inc.. FileMaker WebDirect FileMaker,

More information

ch09

ch09 9 Chapter CHAPTER GOALS B I G J A V A 436 CHAPTER CONTENTS 9.1 436 Syntax 9.1 441 Syntax 9.2 442 Common Error 9.1 442 9.2 443 Syntax 9.3 445 Advanced Topic 9.1 445 9.3 446 9.4 448 Syntax 9.4 454 Advanced

More information

10.ppt

10.ppt : SQL. SQL Plus. JDBC. SQL >> SQL create table : CREATE TABLE ( ( ), ( ),.. ) SQL >> SQL create table : id username dept birth email id username dept birth email CREATE TABLE member ( id NUMBER NOT NULL

More information

untitled

untitled CAN BUS RS232 Line Ethernet CAN H/W FIFO RS232 FIFO IP ARP CAN S/W FIFO TERMINAL Emulator COMMAND Interpreter ICMP TCP UDP PROTOCOL Converter TELNET DHCP C2E SW1 CAN RS232 RJ45 Power

More information

ilist.add(new Integer(1))과 같이 사용하지 않고 ilist.add(1)과 같이 사용한 것은 자바 5.0에 추가된 기본 자료형과 해당 객체 자료 형과의 오토박싱/언박싱 기능을 사용한 것으로 오토박싱이란 자바 컴파일러가 객체를 요구하는 곳에 기본 자료형

ilist.add(new Integer(1))과 같이 사용하지 않고 ilist.add(1)과 같이 사용한 것은 자바 5.0에 추가된 기본 자료형과 해당 객체 자료 형과의 오토박싱/언박싱 기능을 사용한 것으로 오토박싱이란 자바 컴파일러가 객체를 요구하는 곳에 기본 자료형 바에 제네릭스(generics)를 도입하기 위한 연구는 이미 8년 전인 1996년부터라고 한다. 실제로 자바에 제네릭스를 도입하 는 몇 가지 방안들이 논문으로 나오기 시작한 것이 1998년 초임을 감 안하면 무려 8년이 지난 후에야 자바 5.0에 전격 채택되었다는 것은 이것이 얼마나 어려운 일이었나 하는 것을 보여준다. 자바의 스펙을 결정하는 표준화 절차인

More information

untitled

untitled OZ User Data Store Manual OZ User Data Store Manual,,,,, DataAction,, Http Request.. DLL DLL lib launch.cfg. // lib OZUDSSample_Csharp.dll, OZUDSSample_VBNET.dll lib. // config assembly.properties OZUDSSample_Csharp.dll,

More information

초보자를 위한 자바 2 21일 완성 - 최신개정판

초보자를 위한 자바 2 21일 완성 - 최신개정판 .,,.,. 7. Sun Microsystems.,,. Sun Bill Joy.. 15... ( ), ( )... 4600. .,,,,,., 5 Java 2 1.4. C++, Perl, Visual Basic, Delphi, Microsoft C#. WebGain Visual Cafe, Borland JBuilder, Sun ONE Studio., Sun Java

More information

Chap7.PDF

Chap7.PDF Chapter 7 The SUN Intranet Data Warehouse: Architecture and Tools All rights reserved 1 Intranet Data Warehouse : Distributed Networking Computing Peer-to-peer Peer-to-peer:,. C/S Microsoft ActiveX DCOM(Distributed

More information

Java ~ Java program: main() class class» public static void main(string args[])» First.java (main class ) /* The first simple program */ public class

Java ~ Java program: main() class class» public static void main(string args[])» First.java (main class ) /* The first simple program */ public class Linux JAVA 1. http://java.sun.com/j2se/1.4.2/download.html J2SE 1.4.2 SDK 2. Linux RPM ( 9 ) 3. sh j2sdk-1_4_2_07-linux-i586-rpm.bin 4. rpm Uvh j2sdk-1_4_2_07-linux-i586-rpm 5. PATH JAVA 1. vi.bash_profile

More information

03장

03장 CHAPTER3 ( ) Gallery 67 68 CHAPTER 3 Intent ACTION_PICK URI android provier MediaStore Images Media EXTERNAL_CONTENT_URI URI SD MediaStore Intent choosepictureintent = new Intent(Intent.ACTION_PICK, ë

More information

01-OOPConcepts(2).PDF

01-OOPConcepts(2).PDF Object-Oriented Programming Concepts Tel: 02-824-5768 E-mail: hhcho@selabsoongsilackr? OOP (Object) (Encapsulation) (Message) (Class) (Inheritance) (Polymorphism) (Abstract Class) (Interface) 2 1 + = (Dependency)

More information

fundamentalOfCommandPattern_calmglow_pattern_jstorm_1.0_f…

fundamentalOfCommandPattern_calmglow_pattern_jstorm_1.0_f… Command JSTORM http://www.jstorm.pe.kr Command Issued by: < > Revision: Document Information Document title: Command Document file name: Revision number: Issued by: Issue

More information

5장.key

5장.key JAVA Programming 1 (inheritance) 2!,!! 4 3 4!!!! 5 public class Person {... public class Student extends Person { // Person Student... public class StudentWorker extends Student { // Student StudentWorker...!

More information

목차 JEUS EJB Session Bean가이드 stateful session bean stateful sample 가이드 sample source 결과확인 http session에

목차 JEUS EJB Session Bean가이드 stateful session bean stateful sample 가이드 sample source 결과확인 http session에 개념정리및샘플예제 EJB stateful sample 문서 2016. 01. 14 목차 JEUS EJB Session Bean가이드... 3 1. stateful session bean... 3 1.1 stateful sample 가이드... 3 1.1.1 sample source... 3 1.1.2 결과확인... 6 1.2 http session에서사용하기...

More information