Title | Method Name | Request Param | Response Type |
---|---|---|---|
옵션 조회 없으면 기본 10분 생성 후 반환 | findMetadataById | String path : 조회할 옵션의 도메인 Path | MetadataResponse : 옵션 값의 정보를 담은 Response 객체 |
옵션 조회 없으면 예외 발생 | |||
옵션 수정 | updateMetadata | String path : 옵션 변경할 도메인 Path | |
int newExpiredTime : 새로 적용할 만료시간 | MetadataResponse : 변경한 옵션 값의 정보를 담은 Response 객체 | ||
옵션 삭제 | deleteMetadataById | String path : 삭제할 옵션의 도메인 Path | |
옵션 생성 | createMetadata | String path : 생성할 도메인 Path | |
int expiredTime : 생성할 옵션의 만료시간 | MetadataResponse : 생성한 옵션 값의 정보를 담은 Response 객체 | ||
옵션 목록 조회 | findAll | PageRequest pageRequest : 페이지의 번호와 size 값이 들어있는 Paging 클래스 | List<MetadataGetResponse> : 옵션들의 목록 |
옵션이 있는 지 확인 | isExistById | String path : 존재 유무를 파악할 Path | Boolean : 유무 값이 true or false로 반환 |
package com.sinor.cache.admin.metadata.service;
import java.util.List;
import org.springframework.data.domain.PageRequest;
import com.sinor.cache.admin.metadata.model.MetadataGetResponse;
import com.sinor.cache.common.CustomException;
public interface IMetadataServiceV1 {
/**
* 옵션 조회 없으면 기본 10분 생성 후 반환
* @param path 조회할 옵션의 path
*/
MetadataGetResponse findOrCreateMetadataById(String path) throws CustomException;
/**
* 옵션 조회 없으면 예외 발생
* @param path 조회할 옵션의 path
*/
MetadataGetResponse findMetadataById(String path) throws CustomException;
/**
* 옵션 수정
* @param path 옵션 변경할 path 값
* @param newExpiredTime 새로 적용할 만료시간
*/
MetadataGetResponse updateMetadata(String path, Long newExpiredTime) throws CustomException;
/**
* 옵션 삭제
*
* @param path 삭제할 path
*/
void deleteMetadataById(String path) throws CustomException;
/**
* 옵션 생성
* @param path 생성할 path 값
* @param expiredTime 적용할 만료시간
*/
MetadataGetResponse createMetadata(String path, Long expiredTime) throws CustomException;
/**
* 옵션들의 목록을 조회한다. (10개씩 페이징)
* @param pageRequest 조회할 목록의 size, page 번호가 들어 있는 Paging 클래스
*/
List<MetadataGetResponse> findAll(PageRequest pageRequest);
/**
* 옵션이 있는 지 확인
* @param path 유무를 확인할 path 값
*/
Boolean isExistById(String path);
}