4-1. ๐๏ธ Core Features Basic Structure
4.1 Project Source Structure
HONGIKINGAN CMS consists of two main modules.
4.1.1 BO (humanframe.backoffice)
This is a project that manages metadata such as admin area, basic system operation, and schedulers. It contains basic admin functions and elements necessary for system operation of the CMS, and can be directly modified by developers.
Main Package Structure
aop.aspect
Admin AOP implementation, admin board permission verification, admin log storage, user board permission verification and configuration retrieval
- admin: Admin-related AOP (AdminBbsAspect, AdminLogAspect, AdminPrivacyAspect, etc.)
- web: User-related AOP (UsrChkAuthBeforeAspect, UsrChkPermNttBeforeAspect, etc.)
common
Common function definition - Common code map, DB code management separated by admin to collect code data that does not need registration changes during system operation. Modification is discouraged, and caution is required when modifying
controller
Collection of Spring controller classes, system operation and CMS-based program controllers
| ๐ Package | ๐ Description |
|---|---|
| ajax | AJAX request processing controller |
| banner | Banner management controller |
| bbs | Board management controller |
| cm | Common management controller |
| cntnts | Content management controller |
| comm | Common controller |
| dashboard | Dashboard controller |
| fnct | Function-related controller |
| front | Frontend-related controller |
| index | Index page controller |
| login | Login-related controller |
| mber | Member management controller |
| media | Media management controller |
| metadata | Metadata management controller |
| mng | Management function controller |
| oauth | OAuth authentication related controller |
| pblcate | Publication related controller |
| popup | Popup management controller |
| privacy | Privacy management controller |
| site | Site management controller |
| stats | Statistics management controller |
dao
Collection of Data Access Objects, various DAOs
interceptor
Admin Interceptor implementation, admin login check, URI parameter validation, etc.
scheduler
System scheduler management, mini board JSON data generation, menu statistics data generation
service
Spring service and implementation classes
- impl: Service implementation classes
session
Admin and user Session classes
tld.button
JSP Tag Library and other tag classes
util
Various utility classes
view
RssViewer class
vo
Value Object classes
4.1.2 WEB (humanframe.web)
Consists of Java classes for the CMS user area and various resources (jsp, xml, js, css, etc.) for Frontend Presentation (screen resources, user content processing). Mainly, all program sources (Java class, jsp, xml, etc.) for additional functions that are not basic CMS functions are included in this project.
Main Package Structure
common
Common function definition - Common code map, common constants, etc.
controller
Collection of Spring controller classes, additional development program controllers
- admin: Admin function controllers
- front: Frontend controllers
dao
Collection of Data Access Objects, various DAOs
filter
XSSWebFilter, MberLoginFilter, etc.
interceptor
User URIInterceptor implementation, delivery URI validation and menu information connection according to URI
security
Encryption-related classes
service
Spring service and implementation classes
- impl: Service implementation classes
vo
Value Object classes
4.2 Resource Configuration
4.2.1 Spring Context Configuration Files
HONGIKINGAN CMS defines system behavior through various Spring Context configuration files.
context-backoffice.xml
Admin user session bean definition
context-crypto.xml
Encryption bean definition
context-datasource.xml
Database connection configuration
context-mapper.xml
MyBatis mapper configuration
context-properties.xml
System property configuration
context-scheduler.xml
Scheduler bean definition, mini board, menu statistics
context-transaction.xml
Transaction management configuration
human-resource.xml
Resource-related configuration
4.2.2 Web Application Structure
The web application consists of the following main directories:
common
Common resources
data
Data files
humanframe
CMS core resources
- admin: Admin page resources
- theme: User theme resources
- global: Common resources
json
JSON data files
webeditor
Web editor resources
webeditorplus
Extended web editor resources
WEB-INF
Web application configuration and class files
- jsp: JSP files
- config: Configuration files
- tld: Tag library definition files
4.3 User Management
4.3.1 Authentication and Authorization Management
HONGIKINGAN CMS uses Spring Security and a self-developed authorization management system together for user authentication and authorization management.
Main Features
- User login/logout
- Permission group management
- Menu-specific access permission settings
- Board-specific permission settings
- IP-based access control
Authorization Management Structure
User/Admin
Permission Group
Menu/Function
Main Classes
humanframe.backoffice.interceptor.CMSAdminInterceptor: Admin permission verificationhumanframe.backoffice.aop.aspect.admin.AdminBbsAspect: Permission verification AOPhumanframe.backoffice.aop.aspect.admin.AdminPrivacyAspect: Personal information access verification AOP
// [Code Location] humanframe.backoffice.aop.aspect.admin.AdminBbsAspect
@Aspect
@Order(1)
@Component
public class AdminBbsAspect {
// Admin permission check
@Pointcut("execution(* humanframe.backoffice..AdminBbsType*Controller.form(..))"
+ "|| execution(* humanframe.backoffice..AdminBbsType*Controller.list(..))"
+ "|| execution(* humanframe.backoffice..AdminBbsType*Controller.view(..))"
+ "|| execution(* humanframe.backoffice..AdminBbsType*Controller.action(..))"
+ "|| execution(* humanframe.backoffice..AdminBbsType*Controller.answer(..))")
private void checkAdminBbsAuth() {}
@Before(value = "checkAdminBbsAuth()")
private void beforeCheckAdminBbsAuth(
JoinPoint joinPoint)throws Exception {
// ... Omitted (permission verification logic) ...
}
}
4.3.2 Session Management
HONGIKINGAN CMS manages user and admin sessions separately and provides features such as session timeout and concurrent access control.
Main Features
- Session creation and management
- Session timeout settings
- Concurrent access control
- Session information encryption
Main Classes
humanframe.backoffice.session.MngrSession: Admin session classhumanframe.backoffice.session.MberSession: User session class
// [Code Location] humanframe.backoffice.session.MngrSession
public class MngrSession implements Serializable {
private static final long serialVersionUID = 1L;
private String mngrId;
private String mngrNm;
private String authorTy;
private String[] siteNos;
private String[] siteMenus;//for cntnts
private String[] fnctNos;//for fnct
private String[] bbsNos;//for bbs
// Session information setting and retrieval methods
// ...
}
4.3.3 User Information Management
User information management includes functions such as member registration, information modification, and withdrawal.
Main Features
- Member registration/modification/withdrawal
- Password encryption
- Email/SMS authentication
- Social login integration
- Personal information protection features
Main Classes
humanframe.backoffice.controller.mber.AdminMberController: Member management controllerhumanframe.backoffice.service.MberService: Member management servicehumanframe.backoffice.dao.MberDAO: Member management DAO
4.4 Content Management
4.4.1 Menu Management
HONGIKINGAN CMS provides functionality to efficiently manage the menu structure of websites.
Main Features
- Hierarchical menu structure management
- Menu order changes
- Menu-specific permission settings
- Menu activation/deactivation
- Menu statistics management
Main Classes
humanframe.backoffice.controller.mng.AdminMngMenuController: Menu management controllerhumanframe.backoffice.service.MngMenuService: Menu management servicehumanframe.backoffice.dao.MngMenuDAO: Menu management DAO
Menu Management Screen
You can manage the menu structure in tree form in the "CMS Management > Menu Management" menu of the admin page.
4.4.2 Site/Menu Publication System
HONGIKINGAN CMS has a structure where site and menu changes in the admin page are not immediately reflected on the user page, but are reflected through a 'Publication' process. This is a safety mechanism that allows administrators to review and confirm changes before applying them to the actual user page.
Table Relationships
TN_SITE
โ
TN_PBLCATE_SITE
TN_SITE_MENU
โ
TN_PBLCATE_SITE_MENU
- TN_SITE โ TN_PBLCATE_SITE
- TN_SITE: Site information table edited by admin
- TN_PBLCATE_SITE: Site information table actually shown to users after publication
- TN_SITE_MENU โ TN_PBLCATE_SITE_MENU
- TN_SITE_MENU: Menu information table edited by admin
- TN_PBLCATE_SITE_MENU: Menu information table actually shown to users after publication
Publication Process
โ๏ธ Information Modification
Admin modifies information in TN_SITE or TN_SITE_MENU table.
๐ Execute Publication
Admin executes the 'Publication' function.
๐ Information Copy
System copies modified information to TN_PBLCATE_SITE or TN_PBLCATE_SITE_MENU table.
๐ User Page Reflection
User page displays site and menu based on information from TN_PBLCATE_SITE and TN_PBLCATE_SITE_MENU tables.
Advantages of Publication System
Stability
Admin changes are not immediately reflected on user pages without verification, enabling stable service provision.
Verification
Admin can thoroughly review changes before publication.
Batch Application
Multiple changes can be published at once, maintaining consistency when changing site structure.
Rollback Capability
Easy to revert to previous state when problems occur.
4.4.3 Board Management
Provides functionality to create and manage various types of boards.
Board Types
| ๐ Type | ๐ Description |
|---|---|
| Type 1 | General board |
| Type 2 | Reply board |
| Type 3 | Image board |
| Type 4 | Video board |
| Type 5 | Q&A board |
| Type 6 | FAQ board |
| Type 7 | Schedule board |
| Type 8 | Link board |
Main Features
- Board creation/modification/deletion
- Post management
- Comment management
- Attachment management
- Board-specific permission settings
- Post search and filtering
Main Classes
humanframe.backoffice.controller.bbs.AdminBbsController: Board management controllerhumanframe.backoffice.controller.bbs.AdminBbsSettingController: Board settings controllerhumanframe.backoffice.controller.bbs.AdminBbsType1Controller: General board controllerhumanframe.backoffice.service.BbsSettingService: Board management servicehumanframe.backoffice.dao.BbsSettingDAO: Board settings DAOhumanframe.backoffice.dao.BbsTypeDAO: Board type-specific DAO
// [Code Location] humanframe.backoffice.service.BbsSettingService
@SuppressWarnings("rawtypes")
public interface BbsSettingService {
/**
* Retrieve board list.
*
* @param listVO Search conditions
* @return Board list
*/
public HumanListVO boardListVo(HumanListVO listVO) throws Exception;
/**
* Retrieve board information.
*
* @param bbsNo Board number
* @return Board information
*/
public BbsSettingVO retrieveBoardSetting(int bbsNo) throws Exception;
// ... Other methods
}
4.4.4 Content Management
Provides functionality to manage content that will compose pages.
Main Features
- Content creation/modification/deletion
- Template-based page management
- HTML editor support
- SEO optimization settings
- Content preview
- Content version management
Main Classes
humanframe.backoffice.controller.cntnts.AdminCntntsController: Content management controllerhumanframe.backoffice.service.CntntsService: Content management servicehumanframe.backoffice.dao.CntntsDAO: Content management DAOhumanframe.backoffice.vo.CntntsVO: Content VO
4.5 File and Media Management
4.5.1 File Upload/Download
HONGIKINGAN CMS provides functionality to safely handle upload and download of various files.
Main Features
- Multiple file upload
- File type restrictions
- File size restrictions
- File encryption
- Download permission management
- Download statistics
File Upload Processing Flow
Client Request
MultipartResolver
File Validation
File Storage
Metadata DB Storage
Main Classes
humanframe.backoffice.controller.media.AdminMediaController: Media management controllerhumanframe.backoffice.service.FileService: File management servicehumanframe.backoffice.util.FileDownload: File download utilityhumanframe.backoffice.util.FileUtil: File auxiliary utility
// Part of FileUtil class
/** Validate filename validity **/
public static boolean isValidFileName(String fileName) {
// Regular expression that allows alphabets, numbers, Korean, Chinese, Japanese, parentheses, brackets, braces, hyphens, underscores, periods, spaces
// and excludes characters that cannot be used in Windows filenames (\ / : * ? " < > |)
final String FILE_NAME_PATTERN = "^[\w\-.()\[\]{} ๊ฐ-ํฃไธ-้ฟฟใ-ใใ -ใฟ]+$";
final Pattern pattern = Pattern.compile(FILE_NAME_PATTERN);
if (fileName == null || fileName.trim().isEmpty()) {
return false;
}
Matcher matcher = pattern.matcher(fileName);
return matcher.matches();
}
4.5.2 Image Processing
Provides specialized processing functionality for image files.
Main Features
- Image resizing
- Thumbnail generation
- Image watermark
- Image optimization
- Image gallery
Main Classes
humanframe.backoffice.service.FileService: File management servicehumanframe.backoffice.util.ImageProcess: Image download utilitynet.coobird.thumbnailator.Thumbnails: Thumbnail generation library
Part of FileServiceImpl class (Thumbnail generation)
public void creatFileInfo(
Map<String, MultipartFile> fileMap
, int upperNo
, String srvcId
, Map<String,Object> reqMap) throws Exception {
// ... (Omitted)
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
try {
if ((EgovStringUtil.equals("jpg", fileExtsn)
|| EgovStringUtil.equals("gif", fileExtsn)
|| EgovStringUtil.equals("png", fileExtsn)
|| EgovStringUtil.equals("bmp", fileExtsn))) {
Thumbnails.of(tempFile).size(StaticValues.SMALL_THUMB_SIZE_X, StaticValues.SMALL_THUMB_SIZE_Y)
.toFile(new File(WebUtil.filePathReplaceAll(filePath + "/"+ srvcId +"/" + toDay + "/" + StaticValues.SMALL_THUMB_PREFIX+"_"+ newFileName)));
Thumbnails.of(tempFile).size(StaticValues.MEDIUM_THUMB_SIZE_X, StaticValues.MEDIUM_THUMB_SIZE_Y)
.toFile(new File(WebUtil.filePathReplaceAll(filePath + "/"+ srvcId +"/" + toDay + "/" + StaticValues.MEDIUM_THUMB_PREFIX+"_"+ newFileName)));
Thumbnails.of(tempFile).size(StaticValues.LARGE_THUMB_SIZE_X, StaticValues.LARGE_THUMB_SIZE_Y)
.toFile(new File(WebUtil.filePathReplaceAll(filePath + "/"+ srvcId +"/" + toDay + "/" + StaticValues.LARGE_THUMB_PREFIX+"_"+ newFileName)));
}
}
// ... (Omitted)
}
// ... (Omitted)
}
4.5.3 Media Management
Provides functionality to manage various media files such as images and videos.
Main Features
- Media file upload
- Media metadata management
- Media player integration
- Streaming service integration
Main Classes
humanframe.backoffice.controller.media.AdminMediaController: Media management controllerhumanframe.backoffice.service.MediaService: Media management servicehumanframe.backoffice.dao.MediaDAO: Media management DAOhumanframe.backoffice.vo.MediaVO: Media VO