Jlook open api server platform

724 views

Published on

Introduction to Open API platform

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
724
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Jlook open api server platform

  1. 1. OPEN API SERVICEPLATFORM BASED ONSAASMETADATA DRIVENSERVICE PLATFORM HongSeong Jeon hsjeon70@gmail.com jlook consulting
  2. 2. PLATFORM FEATURESq Metadata driven service development platformq Software as a service platformq Open API service platform for web and mobile applicationq Shared services platform
  3. 3. PLATFORM FUNCTIONALSPECIFICATIONq  Security q  Domain management q  User, Role, Group management q  Data Access Rule management q  Menu Access Rule managementq  Common q  Preference : System, Domain, User preference q  Star Rating and Comments q  Announcement q  Menu q  Calendar q  Article
  4. 4. PLATFORM FUNCTIONALSPECIFICATIONq  Metadata q  Entity, Data Type management q  Attribute management q  Validation : Enumeration, Pattern, Rangeq  Utilities q  File Attachment q  Array Value support
  5. 5. APPLICATION LOGICALARCHITECTURE Meta Driven Open API Service Platform Interfaces Services Repositories Security Controller Security Service Security RepositoryOpen API Service Interfaces Metadata Management Generic Controller Generic Service Generic Repository Domain Controller Domain Service Domain Repository Metadata Controller Metadata Service Metadata Repository Infrastructures Security Component Transaction OR Mapping Management Management Management Management Attachment Dynamic View Task & Batch JDBC Pool Management Resolver Scheduler Management
  6. 6. SYSTEM ARCHITECTURE Domain Admin Apache HTTP Server 2.0 Web Application Server Database Server §  Apache Tomcat 6.0 §  H2 Database Mobile User §  JDK 1.6 §  SaaS Platform Application
  7. 7. APPLICATION TECHNICALSPECIFICATIONq  Spring framework q  Spring IoC Container q  Spring Web MVC q  Spring Securityq  JBoss – Hibernate, Javassistq  Google h2 Databaseq  Google gsonq  MVEL 2.0q  Apache Velocity Template engineq  Java & Spring framework Annotationq  Qdox
  8. 8. SHARED SERVICESPLATFORM Domain Users software as a service platform User Domain User Domain User Domain User Domain Domain Domain Domain Domain Domain Domain Domain Domain Entity Entity Entity Entity Entity Entity Entity Entity Platform System Domain Account Security Metadata StarRating Service Service Service Service Shared Services Preference Announce Calendar Attachment Service Service Service Service
  9. 9. DOMAIN ENTITYPUBLISHING PROCESS1.  Metadata Definition q  Define Entity metadata Metadata Management q  Define Attribute metadata2.  Entity Mapping 1 Entity Attribute Data Type 2 q  Create table in database Domain Database q  Create constraints for entity Table3.  Access to entity by Open API q  Pagination list data Generic Open API q  Create data to table 3 q  Update data to table Create / Update / Delete / Pagination q  Delete data to table Mobile, Web Application
  10. 10. ENTITY INHERITANCESUPPORTq  Support entity inheritance from another entity. SYSTEM METADATA JValidation JUser JRange JEnum JPattern USERINFO ç Domain User Entity
  11. 11. OPEN API SUMMARYq  Security q  SignIn, SignOut q  User Registration q  Domain management q  Role, Group management q  Data and Menu Access Controlq  Generic Service q  Summary view(table pagination list) q  Detail view q  Create, Update, Deleteq  File Attachment q  File Upload and Update q  File Download q  Mobile application download (version control)
  12. 12. OPEN API SUMMARYq  Preference q  Preference list (System, Domain, User) q  Update Preference value (Domain, User) q  Create Preference (Domain, User)q  Star Rating and comment q  Create start Rating and comment q  Get Star Rating and comment listq  Announcement q  Announcement list(System, Domain, User) q  Create Announcementq  Metadata Management q  Create entity q  Delete entity
  13. 13. OPEN API SUMMARYq  Calendarq  Articleq  Menuq  Gallery
  14. 14. OPEN API SPECIFICATION
  15. 15. OPEN API SPECIFICATIONq  Generate open API specification automatically. Interface Java Source OpenAPI Generator XML HTML XSLT Open API XSL Specification
  16. 16. OPEN API TESTING PAGE
  17. 17. DATA FILTERING q  Domain data filtering q  All domains data is separated from each other. q  System domain data is shared to all domains. q  Entity Summary Filtering q  Can configure data filtering logic for each entity. §  SQL Conditional clause if( juser.admin ) { for current entity.§  If-else Control flow§  Signed user "type!=ABSTRACT" information : “jUser” } else { "category!=jlook.framework.domain.metadata" }
  18. 18. DATA FILTERINGq  Reserved context variable q  ‘juser’ : User session object
  19. 19. JOBJECT RULE q  Entity JObject Rule q  Execute custom logics of JObject Rule before creating or updating JObject. §  Current JObject q  Expression Language reference§  Current action : if(jaction==‘create’ && jobject.description==null) { “create” or “update” jobject.description = jobject.category+”.”+jobject.name }
  20. 20. JOBJECT POST ACTIONq  JObjectPostAction Interface q  Execute custom business logic after creating, updating and deleting JObject. q  Inheritance JObjectPostAction interface or JObjectPostActionSupport class and configure implemented class to JClass metadata.
  21. 21. JOBJECT POST ACTIONpublic class JBatchInstancePostAction extends JObjectPostActionSupport { @Override public void doCreate(JObject jObject) throws JActionException { JBatchInstance jBatch = (JBatchInstance)jObject; JBatchManager manager = (JBatchManager)context.getBean(JBatchManager.ID); manager.addJBatch(jBatch); } @Override public void doUpdate(JObject jObject) throws JActionException { JBatchManager manager = (JBatchManager)context.getBean(JBatchManager.ID); JBatchInstance jBatch = (JBatchInstance)jObject; manager.updateJBatch(jBatch); } @Override public void doDelete(JObject jObject) throws JActionException { JBatchInstance jBatch = (JBatchInstance)jObject; JBatchManager manager = (JBatchManager)context.getBean(JBatchManager.ID); manager.removeJBatch(jBatch); }}
  22. 22. GENERIC DATAVALIDATIONq  Support three types of validation q  Enumeration : male and female, hobbies, business code data q  Pattern : email, telephone number q  Range : number range validationq  Configure validation at JAttribute JValidation JRange JEnum JPattern JEnumDetail
  23. 23. OPEN API SERVICEINTERFACESq  Restful Open API based on HTTPq  Support dynamic view resolver (JSon, XML, File, HTML Message) Restful HTTP Request Controller Service Content-Type §  application/json §  application/xml §  application/octet-stream View §  text/html View Resolver JSonView FileView HTTP Response §  JSon XmlView JspView §  XML §  File §  HTML
  24. 24. DYNAMIC VIEW FROMMETADATA
  25. 25. BATCH SERVICEq  Configure batch definition q  Batch Definition : basic information for batch q  Batch Parameter Name : parameter information for batch
  26. 26. BATCH SERVICEq  Configure for batch instance q  Batch Instance : configure batch instance from batch definition q  Batch Parameter Value : configure parameter value for batch parameter name
  27. 27. BATCH SERVICEq  Batch Job Taskpackage jlook.framework.infrastructure.batch;import jlook.framework.infrastructure.util.Log;public class EchoBatch extends JBatchTaskSupport { private static Log logger = Log.getLog(EchoBatch.class); @Override public void doExecute() throws JBatchException { if(logger.isInfoEnabled()) { logger.info(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> executing. "+this.context); } // implements batch logic }}
  28. 28. BATCH SERVICEq  JBatchContext APIpackage jlook.framework.infrastructure.batch;public interface JBatchContext { public static final String PARAM_BATCH_USER = "batchUser"; public String getName() ; public String getServer(); public Long getInstanceId(); public Long getDefinitionId(); public String uuid(); public Object getParameter(String name); public Object getEnvironment(String name); public void put(String key, Object value); public Object get(String key); public String currentDateTime(); public Object getBean(String beanName);}
  29. 29. MULTI-TASK SERVICEq  Support to execute task by multiple threads.q  Support retry if exception is occurred on executing task. ThreadPool TaskExecutor JTaskExecutor Thread-1 Thread-2 Run Task Queue Thread-3 JTask Thread-4 Inheritance Execute Custom Task
  30. 30. MULTI-TASK SERVICEq  Define custom task classpackage jlook.framework.infrastructure.task;import jlook.framework.infrastructure.util.Log;public class EchoTask extends JTaskSupport { private static Log logger = Log.getLog(EchoTask.class); @Override public void doExecute() throws JTaskException { if(logger.isDebugEnabled()) { logger.debug("########################################"+this.retryCount+ "/"+this.maxRetryCount); } // implements task logic }}
  31. 31. PREFERENCE SERVICEq  Support three types preferences q  System Preference : Application global properties q  Domain Preference : Domain specific properties q  User Preference : User specific propertiesq  Pre-defined Preferences Name Type Description application.name SYSTEM Platform Application Name application.version SYSTEM Platform Application Version application.administrator SYSTEM Platform Administrator email address domain.name DOMAIN Domain name domain.version DOMAIN Domain version domain.signIn.redirectUrl DOMAIN Domain redirect url after sigining in domain.administrator DOMAIN Domain administrator email address user.contact.info USER User contact information user.signIn.redirectUrl USER User redirect url after signing in
  32. 32. STAR RATING ANDCOMMENT SERVICEq  Support star rating and comments for any entity
  33. 33. ANNOUNCE MESSAGESERVICEq  Support three types of announce message q  System announce message q  Domain announce message q  User announce messageq  Support announce message to multiple targets
  34. 34. SECURITY SERVICEq  Spring security frameworkq  User, Group and Role managementq  Data Access Control management q  JDataAccessRule : JClass – JRole q  Create, Read, Update, Delete for Entity.q  Menu Access Control management q  JMenuAccessRule : JMenu - JRole
  35. 35. CALENDAR SERVICE
  36. 36. MENU SERVICE
  37. 37. ATTACHMENT SERVICEq  Provide Open API for uploading and downloading a file.
  38. 38. METADATA SERVICEq  Provide Open API for Entity, Attribute metadata q  Entity metadata : name q  Attribute : name, label, type, length, required, validationq  Make view dynamically from metadata
  39. 39. PLATFORMADMINISTRATIONSecurity Management Domain Access Log User Thread Dump Group System Properties Role Environment Properties Data Access Rule Log4j Management JDBC ManagementMetadata Entity Common Attribute Validation Data Type Preference AnnouncementStatistics System administrator Domain administrator

×