javadoc 보완 수정

master
mjkhan21 2 years ago
parent 4d16828da6
commit d83739de2c

@ -15,20 +15,24 @@ import cokr.xit.foundation.data.DataObject;
*/ */
@Mapper("actionGroupMapper") @Mapper("actionGroupMapper")
public interface ActionGroupMapper extends AbstractMapper { public interface ActionGroupMapper extends AbstractMapper {
/** . /** .<br />
* @param by * {@link cokr.xit.base.security.access.service.ActionGroupService#getGroupList(ActionQuery)}
* <ul><li>actionGroupName - </li> * @param req
* <li> </li>
* </ul>
* @param term
* @param pageNum
* @param fetchSize
* @return * @return
*/ */
List<DataObject> getGroupList(ActionQuery req); List<DataObject> getGroupList(ActionQuery req);
/** .
* @param groupID
* @return
*/
default DataObject getGroupInfo(String groupID) {
List<DataObject> list = getGroupList(new ActionQuery().setBy("groupID").setTerm(groupID));
return !list.isEmpty() ? list.get(0) : null;
}
/** . /** .
* @param groupIDs * @param req
* @return * @return
*/ */
List<ActionGroup> getGroups(ActionQuery req); List<ActionGroup> getGroups(ActionQuery req);
@ -70,7 +74,7 @@ public interface ActionGroupMapper extends AbstractMapper {
int updateGroup(ActionGroup group); int updateGroup(ActionGroup group);
/** . /** .
* @param groupIDs * @param params
* @return * @return
*/ */
int removeGroups(Map<String, ?> params); int removeGroups(Map<String, ?> params);
@ -91,12 +95,13 @@ public interface ActionGroupMapper extends AbstractMapper {
} }
/** . /** .
* @param groupIDs * @param req
* @return * @return
*/ */
List<DataObject> getActionList(ActionQuery req); List<DataObject> getActionList(ActionQuery req);
/** . /** .<br />
* {@link cokr.xit.base.security.access.service.ActionGroupService#getActionList(ActionQuery)}
* @param groupIDs * @param groupIDs
* @return * @return
*/ */
@ -105,8 +110,7 @@ public interface ActionGroupMapper extends AbstractMapper {
} }
/** . /** .
* @param groupID * @param params
* @param actions (URL)
* @return * @return
*/ */
int addActions(Map<String, ?> params); int addActions(Map<String, ?> params);
@ -127,8 +131,7 @@ public interface ActionGroupMapper extends AbstractMapper {
} }
/** . /** .
* @param groupID * @param params
* @param actions
* @return * @return
*/ */
int removeActions(Map<String, ?> params); int removeActions(Map<String, ?> params);

@ -17,11 +17,22 @@ import cokr.xit.foundation.data.DataObject;
*/ */
@Mapper("authorityMapper") @Mapper("authorityMapper")
public interface AuthorityMapper extends AbstractMapper { public interface AuthorityMapper extends AbstractMapper {
/** . /** .<br />
* {@link cokr.xit.base.security.access.service.AuthorityService#getAuthorityList(AuthorityQuery)}
* @param req
* @return * @return
*/ */
List<DataObject> getAuthorityList(AuthorityQuery req); List<DataObject> getAuthorityList(AuthorityQuery req);
/** .
* @param authID
* @return
*/
default DataObject getAuthorityInfo(String authID) {
List<DataObject> list = getAuthorityList(new AuthorityQuery().setAuthIDs(authID));
return !list.isEmpty() ? list.get(0) : null;
}
/** . /** .
* @return * @return
*/ */
@ -79,10 +90,9 @@ public interface AuthorityMapper extends AbstractMapper {
return removeAuthorities(params().set("authIDs", authIDs)); return removeAuthorities(params().set("authIDs", authIDs));
} }
/** . /** .<br />
* @param pageNum * {@link cokr.xit.base.security.access.service.AuthorityService#getActionGroupList(AuthorityQuery)}
* @param fetchSize * @param req
* @param authIDs
* @return * @return
*/ */
List<DataObject> getActionGroupList(AuthorityQuery req); List<DataObject> getActionGroupList(AuthorityQuery req);
@ -155,10 +165,9 @@ public interface AuthorityMapper extends AbstractMapper {
*/ */
List<DataObject> getActionList(); List<DataObject> getActionList();
/** . /** .<br />
* @param pageNum * {@link cokr.xit.base.security.access.service.AuthorityService#getUserList(AuthorityQuery)}
* @param fetchSize * @param req
* @param authIDs
* @return * @return
*/ */
List<DataObject> getUserList(AuthorityQuery req); List<DataObject> getUserList(AuthorityQuery req);
@ -184,8 +193,7 @@ public interface AuthorityMapper extends AbstractMapper {
} }
/** . /** .
* @param authID * @param params
* @param userIDs
* @return * @return
*/ */
int addUsers(Map<String, ?> params); int addUsers(Map<String, ?> params);
@ -206,10 +214,6 @@ public interface AuthorityMapper extends AbstractMapper {
/** .<br /> /** .<br />
* . * .
* @param params * @param params
* <pre><code> {
* "authIDs": (),
* "groupIDs": ()
* }</code></pre>
* @return * @return
*/ */
int removeUsers(Map<String, ?> params); int removeUsers(Map<String, ?> params);

@ -6,12 +6,12 @@ import cokr.xit.base.security.access.ActionGroup;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
/** . /** .
* <ul><li>{@link #getGroupList(String, String, int, int) }</li> * <ul><li>{@link #getGroupList(ActionQuery) }</li>
* <li>{@link #getGroups(String...) }</li> * <li>{@link #getGroups(String...) }</li>
* <li>{@link #create(ActionGroup) }</li> * <li>{@link #create(ActionGroup) }</li>
* <li>{@link #update(ActionGroup) }</li> * <li>{@link #update(ActionGroup) }</li>
* <li>{@link #remove(String...) }</li> * <li>{@link #remove(String...) }</li>
* <li>{@link #getActionList(String...) }</li> * <li>{@link #getActionList(ActionQuery) }</li>
* <li>{@link #addActions(String, String...) }</li> * <li>{@link #addActions(String, String...) }</li>
* <li>{@link #removeActions(String, String...) }</li> * <li>{@link #removeActions(String, String...) }</li>
* </ul> * </ul>
@ -19,17 +19,26 @@ import cokr.xit.foundation.data.DataObject;
*/ */
public interface ActionGroupService { public interface ActionGroupService {
/** . /** .
* @param by * @param req
* <ul><li>actionGroupName - </li> * <ul><li>by:
* <li> </li> * <ul><li>groupID - </li>
* <li> </li>
* </ul>
* </li>
* <li>term: </li>
* <li>pageNum: </li>
* <li>fetchSize: </li>
* </ul> * </ul>
* @param term
* @param pageNum
* @param fetchSize
* @return * @return
*/ */
List<DataObject> getGroupList(ActionQuery req); List<DataObject> getGroupList(ActionQuery req);
/** .
* @param groupID
* @return
*/
DataObject getGroupInfo(String groupID);
/** . /** .
* @param groupIDs * @param groupIDs
* @return * @return
@ -67,7 +76,11 @@ public interface ActionGroupService {
int remove(String... groupIDs); int remove(String... groupIDs);
/** . /** .
* @param groupIDs * @param req
* <ul><li>groupIDs: </li>
* <li>pageNum: </li>
* <li>fetchSize: </li>
* </ul>
* @return * @return
*/ */
List<DataObject> getActionList(ActionQuery req); List<DataObject> getActionList(ActionQuery req);

@ -6,15 +6,15 @@ import cokr.xit.base.security.Authority;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
/** . /** .
* <ul><li>{@link #getAuthorityList(String, String, int, int) }</li> * <ul><li>{@link #getAuthorityList(AuthorityQuery) }</li>
* <li>{@link #getAuthorities(String...) }</li> * <li>{@link #getAuthorities(String...) }</li>
* <li>{@link #create(Authority) }</li> * <li>{@link #create(Authority) }</li>
* <li>{@link #update(Authority) }</li> * <li>{@link #update(Authority) }</li>
* <li>{@link #removeAuthorities(String...) }</li> * <li>{@link #removeAuthorities(String...) }</li>
* <li>{@link #getActionGroupList(int, int, String...) }</li> * <li>{@link #getActionGroupList(AuthorityQuery) }</li>
* <li>{@link #addActionGroups(String, String...) }</li> * <li>{@link #addActionGroups(String, String...) }</li>
* <li>{@link #removeActionGroups(String, String...) }</li> * <li>{@link #removeActionGroups(String, String...) }</li>
* <li>{@link #getUserList(int, int, String...) }</li> * <li>{@link #getUserList(AuthorityQuery) }</li>
* <li>{@link #addUsers(String, String...) }</li> * <li>{@link #addUsers(String, String...) }</li>
* <li>{@link #removeUsers(String, String...) }</li> * <li>{@link #removeUsers(String, String...) }</li>
* </ul> * </ul>
@ -22,17 +22,26 @@ import cokr.xit.foundation.data.DataObject;
*/ */
public interface AuthorityService { public interface AuthorityService {
/** . /** .
* @param by * @param req
* <ul><li>authID - </li> * <ul><li>by:
* <li> </li> * <ul><li>authID - </li>
* <li> </li>
* </ul>
* </li>
* <li>term: </li>
* <li>pageNum: </li>
* <li>fetchSize: </li>
* </ul> * </ul>
* @param term
* @param pageNum
* @param fetchSize
* @return * @return
*/ */
List<DataObject> getAuthorityList(AuthorityQuery req); List<DataObject> getAuthorityList(AuthorityQuery req);
/** .
* @param authID
* @return
*/
DataObject getAuthorityInfo(String authID);
/** . /** .
* @param authIDs * @param authIDs
* @return * @return
@ -70,9 +79,11 @@ public interface AuthorityService {
int removeAuthorities(String... authIDs); int removeAuthorities(String... authIDs);
/** . /** .
* @param pageNum * @param req
* @param fetchSize * <ul><li>authIDs: </li>
* @param authIDs * <li>pageNum: </li>
* <li>fetchSize: </li>
* </ul>
* @return * @return
*/ */
List<DataObject> getActionGroupList(AuthorityQuery req); List<DataObject> getActionGroupList(AuthorityQuery req);
@ -93,9 +104,11 @@ public interface AuthorityService {
int removeActionGroups(String authID, String... groupIDs); int removeActionGroups(String authID, String... groupIDs);
/** . /** .
* @param pageNum * @param req
* @param fetchSize * <ul><li>authIDs: </li>
* @param authIDs * <li>pageNum: </li>
* <li>fetchSize: </li>
* </ul>
* @return * @return
*/ */
List<DataObject> getUserList(AuthorityQuery req); List<DataObject> getUserList(AuthorityQuery req);

@ -12,7 +12,7 @@ import cokr.xit.base.security.access.service.ActionQuery;
import cokr.xit.foundation.AbstractComponent; import cokr.xit.foundation.AbstractComponent;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
/** DAO /** Bean
* @author mjkhan * @author mjkhan
*/ */
@Component("actionGroupBean") @Component("actionGroupBean")
@ -20,14 +20,9 @@ public class ActionGroupBean extends AbstractComponent {
@Resource(name = "actionGroupMapper") @Resource(name = "actionGroupMapper")
private ActionGroupMapper actionGroupMapper; private ActionGroupMapper actionGroupMapper;
/** . /** .<br />
* @param by * {@link cokr.xit.base.security.access.service.ActionGroupService#getGroupList(ActionQuery)}
* <ul><li>actionGroupName - </li> * @param req
* <li> </li>
* </ul>
* @param term
* @param pageNum
* @param fetchSize
* @return * @return
*/ */
public List<DataObject> getGroupList(ActionQuery req) { public List<DataObject> getGroupList(ActionQuery req) {
@ -39,6 +34,14 @@ public class ActionGroupBean extends AbstractComponent {
return actionGroupMapper.getGroupList(req); return actionGroupMapper.getGroupList(req);
} }
/** .
* @param groupID
* @return
*/
public DataObject getGroupInfo(String groupID) {
return actionGroupMapper.getGroupInfo(groupID);
}
/** . /** .
* @param groupIDs * @param groupIDs
* @return * @return
@ -94,8 +97,9 @@ public class ActionGroupBean extends AbstractComponent {
return actionGroupMapper.removeGroups(groupIDs); return actionGroupMapper.removeGroups(groupIDs);
} }
/** . /** .<br />
* @param groupIDs * {@link cokr.xit.base.security.access.service.ActionGroupService#getActionList(ActionQuery)}
* @param req
* @return * @return
*/ */
public List<DataObject> getActionList(ActionQuery req) { public List<DataObject> getActionList(ActionQuery req) {

@ -31,6 +31,11 @@ public class ActionGroupServiceBean extends AbstractServiceBean implements Actio
return actionGroupBean.getGroupList(req); return actionGroupBean.getGroupList(req);
} }
@Override
public DataObject getGroupInfo(String groupID) {
return actionGroupBean.getGroupInfo(groupID);
}
@Override @Override
public List<ActionGroup> getGroups(String... groupIDs) { public List<ActionGroup> getGroups(String... groupIDs) {
return actionGroupBean.getGroups(groupIDs); return actionGroupBean.getGroups(groupIDs);

@ -20,7 +20,8 @@ public class AuthorityBean extends AbstractComponent {
@Resource(name = "authorityMapper") @Resource(name = "authorityMapper")
private AuthorityMapper authorityMapper; private AuthorityMapper authorityMapper;
/** . /** .<br />
* {@link cokr.xit.base.security.access.service.AuthorityService#getAuthorityList(AuthorityQuery)}
* @param req * @param req
* @return * @return
*/ */
@ -33,6 +34,14 @@ public class AuthorityBean extends AbstractComponent {
return authorityMapper.getAuthorityList(req); return authorityMapper.getAuthorityList(req);
} }
/** .
* @param authID
* @return
*/
public DataObject getAuthorityInfo(String authID) {
return authorityMapper.getAuthorityInfo(authID);
}
/** . /** .
* @param authIDs * @param authIDs
* @return * @return
@ -92,8 +101,9 @@ public class AuthorityBean extends AbstractComponent {
return authorityMapper.removeAuthorities(authIDs); return authorityMapper.removeAuthorities(authIDs);
} }
/** . /** .<br />
* @param req (authIDs - ) * {@link cokr.xit.base.security.access.service.AuthorityService#getActionGroupList(AuthorityQuery)}
* @param req
* @return * @return
*/ */
public List<DataObject> getActionGroupList(AuthorityQuery req) { public List<DataObject> getActionGroupList(AuthorityQuery req) {
@ -135,7 +145,8 @@ public class AuthorityBean extends AbstractComponent {
return authorityMapper.getActionList(); return authorityMapper.getActionList();
} }
/** . /** .<br />
* {@link cokr.xit.base.security.access.service.AuthorityService#getUserList(AuthorityQuery)}
* @param req * @param req
* @return * @return
*/ */

@ -28,6 +28,11 @@ public class AuthorityServiceBean extends AbstractServiceBean implements Authori
return authorityMapper.getAuthorityList(req); return authorityMapper.getAuthorityList(req);
} }
@Override
public DataObject getAuthorityInfo(String authID) {
return authorityMapper.getAuthorityInfo(authID);
}
@Override @Override
public List<Authority> getAuthorities(String... authIDs) { public List<Authority> getAuthorities(String... authIDs) {
return authorityMapper.getAuthorities(authIDs); return authorityMapper.getAuthorities(authIDs);

@ -32,8 +32,8 @@ public class ActionGroupController extends AbstractController {
} }
/** .<br /> /** .<br />
* {@link #getActionGroupList(String, String, Integer) } . * {@link #getActionGroupList(ActionQuery) } .
* @return "actionGroup/actionGroup-main" * @return base/actionGroup/actionGroup-main
*/ */
@RequestMapping(name="기능 그룹 메인", value="/main.do") @RequestMapping(name="기능 그룹 메인", value="/main.do")
public ModelAndView main() { public ModelAndView main() {
@ -42,16 +42,12 @@ public class ActionGroupController extends AbstractController {
return mav.addObject("groupList", toJson(mav.getModel().get("groupList"))); return mav.addObject("groupList", toJson(mav.getModel().get("groupList")));
} }
/** . /** .<br />
* @param by * {@link ActionGroupService#getGroupList(ActionQuery)}
* <ul><li>groupName - </li> * @param req
* <li> </li>
* </ul>
* @param term
* @param pageNum
* @return jsonView * @return jsonView
* <pre><code> { * <pre><code> {
* "groupList": , * "groupList": [ ],
* "groupStart": , * "groupStart": ,
* "groupFetch": , * "groupFetch": ,
* "groupTotal": * "groupTotal":
@ -68,7 +64,7 @@ public class ActionGroupController extends AbstractController {
} }
/** . /** .
* @return "actionGroup/select" * @return base/actionGroup/select-actionGroup
*/ */
@RequestMapping(name="기능 그룹 선택", value="/select.do") @RequestMapping(name="기능 그룹 선택", value="/select.do")
public ModelAndView select(boolean multiple) { public ModelAndView select(boolean multiple) {
@ -83,7 +79,7 @@ public class ActionGroupController extends AbstractController {
* @param groupID * @param groupID
* @return jsonView * @return jsonView
* <pre><code> { * <pre><code> {
* "duplicate": true || false * "duplicate": true, false
* }</code></pre> * }</code></pre>
*/ */
@RequestMapping(name="중복 확인", value="/duplicate.do") @RequestMapping(name="중복 확인", value="/duplicate.do")
@ -93,14 +89,17 @@ public class ActionGroupController extends AbstractController {
.addObject("duplicate", group != null); .addObject("duplicate", group != null);
} }
/** .
* @param groupID
* @return base/actionGroup/actionGroup-info jsonView
* <pre><code> {
* "groupInfo":
* }</code></pre>
*/
@RequestMapping(name="기능 그룹 정보 조회", value="/info.do") @RequestMapping(name="기능 그룹 정보 조회", value="/info.do")
public ModelAndView getInfo(String groupID) { public ModelAndView getInfo(String groupID) {
if (!isEmpty(groupID)) { if (!isEmpty(groupID)) {
ActionQuery req = new ActionQuery() DataObject groupInfo = actionGroupService.getGroupInfo(groupID);
.setBy("groupID")
.setTerm(groupID);
List<DataObject> groupList = actionGroupService.getGroupList(req);
DataObject groupInfo = !groupList.isEmpty() ? groupList.get(0) : null;
boolean json = jsonResponse(); boolean json = jsonResponse();
return new ModelAndView(json ? "jsonView" : "base/actionGroup/actionGroup-info") return new ModelAndView(json ? "jsonView" : "base/actionGroup/actionGroup-info")
.addObject("groupInfo", json ? groupInfo : toJson(groupInfo)); .addObject("groupInfo", json ? groupInfo : toJson(groupInfo));
@ -113,7 +112,7 @@ public class ActionGroupController extends AbstractController {
* @param group * @param group
* @return jsonView * @return jsonView
* <pre><code> { * <pre><code> {
* "saved": true || false * "saved": true, false
* }</code></pre> * }</code></pre>
*/ */
@PostMapping(name="기능 그룹 등록", value="/create.do") @PostMapping(name="기능 그룹 등록", value="/create.do")
@ -127,7 +126,7 @@ public class ActionGroupController extends AbstractController {
* @param group * @param group
* @return jsonView * @return jsonView
* <pre><code> { * <pre><code> {
* "saved": true || false * "saved": true, false
* }</code></pre> * }</code></pre>
*/ */
@PostMapping(name="기능 그룹 수정", value="/update.do") @PostMapping(name="기능 그룹 수정", value="/update.do")
@ -142,7 +141,7 @@ public class ActionGroupController extends AbstractController {
* @return jsonView * @return jsonView
* <pre><code> { * <pre><code> {
* "affected": , * "affected": ,
* "saved": true || false * "saved": true, false
* }</code></pre> * }</code></pre>
*/ */
@PostMapping(name="기능 그룹 삭제", value="/remove.do") @PostMapping(name="기능 그룹 삭제", value="/remove.do")
@ -153,11 +152,15 @@ public class ActionGroupController extends AbstractController {
.addObject("saved", affected > 0); .addObject("saved", affected > 0);
} }
/** . /** .<br />
* @param groupID * {@link ActionGroupService#getActionList(ActionQuery)}
* @param req
* @return jsonView * @return jsonView
* <pre><code> { * <pre><code> {
* "actionList": [...] * "actionList": [ ],
* "actionStart": ,
* "actionFetch": ,
* "actionTotal":
* }</code></pre> * }</code></pre>
*/ */
@RequestMapping(name="기능 그룹별 기능(URL) 조회", value="/action/list.do") @RequestMapping(name="기능 그룹별 기능(URL) 조회", value="/action/list.do")
@ -176,7 +179,7 @@ public class ActionGroupController extends AbstractController {
* @return jsonView * @return jsonView
* <pre><code> { * <pre><code> {
* "affected": , * "affected": ,
* "saved": true || false * "saved": true, false
* }</code></pre> * }</code></pre>
*/ */
@RequestMapping(name="기능 그룹별 기능(URL) 추가", value="/action/add.do") @RequestMapping(name="기능 그룹별 기능(URL) 추가", value="/action/add.do")
@ -193,7 +196,7 @@ public class ActionGroupController extends AbstractController {
* @return jsonView * @return jsonView
* <pre><code> { * <pre><code> {
* "affected": , * "affected": ,
* "saved": true || false * "saved": true, false
* }</code></pre> * }</code></pre>
*/ */
@RequestMapping(name="기능 그룹별 기능(URL) 삭제", value="/action/remove.do") @RequestMapping(name="기능 그룹별 기능(URL) 삭제", value="/action/remove.do")

@ -1,7 +1,5 @@
package cokr.xit.base.security.access.web; package cokr.xit.base.security.access.web;
import java.util.List;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
@ -32,7 +30,7 @@ public class AuthorityController extends AbstractController {
/** .<br /> /** .<br />
* . * .
* @return "authority/authority-main" * @return base/authority/authority-main
*/ */
@RequestMapping(name="권한 메인", value="/main.do") @RequestMapping(name="권한 메인", value="/main.do")
public ModelAndView main() { public ModelAndView main() {
@ -41,16 +39,12 @@ public class AuthorityController extends AbstractController {
return mav.addObject("authorityList", toJson(mav.getModel().remove("authorityList"))); return mav.addObject("authorityList", toJson(mav.getModel().remove("authorityList")));
} }
/** . /** .<br />
* @param by * {@link AuthorityService#getAuthorityList(AuthorityQuery)}
* <ul><li>authID - </li> * @param req
* <li> </li>
* </ul>
* @param term
* @param pageNum
* @return jsonView * @return jsonView
* <pre><code>{ * <pre><code> {
* "authorityList": , * "authorityList": [ ],
* "authorityStart": , * "authorityStart": ,
* "authorityFetch": , * "authorityFetch": ,
* "authorityTotal": * "authorityTotal":
@ -69,8 +63,8 @@ public class AuthorityController extends AbstractController {
/** . /** .
* @param authID * @param authID
* @return jsonView * @return jsonView
* <pre><code>{ * <pre><code> {
* "duplicate": true || false * "duplicate": true, false
* }</code></pre> * }</code></pre>
*/ */
@RequestMapping(name="중복 확인", value="/duplicate.do") @RequestMapping(name="중복 확인", value="/duplicate.do")
@ -80,14 +74,17 @@ public class AuthorityController extends AbstractController {
.addObject("duplicate", authority != null); .addObject("duplicate", authority != null);
} }
/** .
* @param authID
* @return base/authority/authority-info jsonView
* <pre><code> {
* "authorityInfo":
* }</code></pre>
*/
@RequestMapping(name="권한 정보 조회", value="/info.do") @RequestMapping(name="권한 정보 조회", value="/info.do")
public ModelAndView getInfo(String authID) { public ModelAndView getInfo(String authID) {
if (!isEmpty(authID)) { if (!isEmpty(authID)) {
AuthorityQuery req = new AuthorityQuery() DataObject authInfo = authorityService.getAuthorityInfo(authID);
.setBy("authID")
.setTerm(authID);
List<DataObject> authList = authorityService.getAuthorityList(req);
DataObject authInfo = !authList.isEmpty() ? authList.get(0) : null;
boolean json = jsonResponse(); boolean json = jsonResponse();
return new ModelAndView(json ? "jsonView" : "base/authority/authority-info") return new ModelAndView(json ? "jsonView" : "base/authority/authority-info")
.addObject("authorityInfo", json ? authInfo : toJson(authInfo)); .addObject("authorityInfo", json ? authInfo : toJson(authInfo));
@ -99,8 +96,8 @@ public class AuthorityController extends AbstractController {
/** . /** .
* @param authority * @param authority
* @return jsonView * @return jsonView
* <pre><code>{ * <pre><code> {
* "saved": true || false * "saved": true, false
* }</code></pre> * }</code></pre>
*/ */
@PostMapping(name="권한 등록", value="/create.do") @PostMapping(name="권한 등록", value="/create.do")
@ -113,8 +110,8 @@ public class AuthorityController extends AbstractController {
/** . /** .
* @param authority * @param authority
* @return jsonView * @return jsonView
* <pre><code>{ * <pre><code> {
* "saved": true || false * "saved": true, false
* }</code></pre> * }</code></pre>
*/ */
@PostMapping(name="권한 수정", value="/update.do") @PostMapping(name="권한 수정", value="/update.do")
@ -127,9 +124,9 @@ public class AuthorityController extends AbstractController {
/** . /** .
* @param authIDs * @param authIDs
* @return jsonView * @return jsonView
* <pre><code>{ * <pre><code> {
* "affected": , * "affected": ,
* "saved": true || false * "saved": true, false
* }</code></pre> * }</code></pre>
*/ */
@PostMapping(name="권한 삭제", value="/remove.do") @PostMapping(name="권한 삭제", value="/remove.do")
@ -140,11 +137,11 @@ public class AuthorityController extends AbstractController {
.addObject("saved", affected > 0); .addObject("saved", affected > 0);
} }
/** . /** .<br />
* @param pageNum * {@link AuthorityService#getActionGroupList(AuthorityQuery)}
* @param authIDs * @param req
* @return jsonView * @return jsonView
* <pre><code>{ * <pre><code> {
* "actionList": , * "actionList": ,
* "actionStart": , * "actionStart": ,
* "actionFetch": , * "actionFetch": ,
@ -165,9 +162,9 @@ public class AuthorityController extends AbstractController {
* @param authID * @param authID
* @param groupIDs * @param groupIDs
* @return jsonView * @return jsonView
* <pre><code>{ * <pre><code> {
* "affected": , * "affected": ,
* "saved": true || false * "saved": true, false
* }</code></pre> * }</code></pre>
*/ */
@PostMapping(name="권한별 기능 추가", value="/action/add.do") @PostMapping(name="권한별 기능 추가", value="/action/add.do")
@ -183,7 +180,7 @@ public class AuthorityController extends AbstractController {
* @param authID * @param authID
* @param groupIDs * @param groupIDs
* @return jsonView * @return jsonView
* <pre><code>{ * <pre><code> {
* "affected": , * "affected": ,
* "saved": true || false * "saved": true || false
* }</code></pre> * }</code></pre>
@ -196,11 +193,11 @@ public class AuthorityController extends AbstractController {
.addObject("saved", affected > 0); .addObject("saved", affected > 0);
} }
/** . /** .<br />
* @param pageNum * {@link AuthorityService#getUserList(AuthorityQuery)}
* @param authIDs * @param req
* @return jsonView * @return jsonView
* <pre><code>{ * <pre><code> {
* "userList": , * "userList": ,
* "userStart": , * "userStart": ,
* "userFetch": , * "userFetch": ,
@ -221,9 +218,9 @@ public class AuthorityController extends AbstractController {
* @param authID * @param authID
* @param userIDs * @param userIDs
* @return jsonView * @return jsonView
* <pre><code>{ * <pre><code> {
* "affected": , * "affected": ,
* "saved": true || false * "saved": true, false
* }</code></pre> * }</code></pre>
*/ */
@PostMapping(name="권한별 사용자 추가", value="/user/add.do") @PostMapping(name="권한별 사용자 추가", value="/user/add.do")
@ -239,9 +236,9 @@ public class AuthorityController extends AbstractController {
* @param authID * @param authID
* @param userIDs * @param userIDs
* @return jsonView * @return jsonView
* <pre><code>{ * <pre><code> {
* "affected": , * "affected": ,
* "saved": true || false * "saved": true, false
* }</code></pre> * }</code></pre>
*/ */
@PostMapping(name="권한별 사용자 삭제", value="/user/remove.do") @PostMapping(name="권한별 사용자 삭제", value="/user/remove.do")

@ -15,20 +15,15 @@ import cokr.xit.foundation.data.DataObject;
*/ */
@Mapper("policyMapper") @Mapper("policyMapper")
public interface PolicyMapper extends AbstractMapper { public interface PolicyMapper extends AbstractMapper {
/** . /** .<br />
* @param by * {@link cokr.xit.base.security.authentication.service.AuthenticationService#getPolicyList(QueryRequest)}
* <ul><li>userName - </li> * @param req
* <li> </li>
* </ul>
* @param term
* @param pageNum
* @param fetchSize
* @return * @return
*/ */
List<DataObject> getPolicyList(QueryRequest req); List<DataObject> getPolicyList(QueryRequest req);
/** . /** .
* @param userIDs * @param params
* @return * @return
*/ */
List<AuthenticationPolicy> getPolicies(Map<String, ?> params); List<AuthenticationPolicy> getPolicies(Map<String, ?> params);
@ -78,11 +73,8 @@ public interface PolicyMapper extends AbstractMapper {
} }
/** . /** .
* @param policy * @param params
* @return * @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/ */
int updatePolicy(Map<String, ?> params); int updatePolicy(Map<String, ?> params);
@ -103,7 +95,7 @@ public interface PolicyMapper extends AbstractMapper {
} }
/** . /** .
* @param userIDs * @param params
* @return * @return
*/ */
int removePolicy(Map<String, ?> params); int removePolicy(Map<String, ?> params);

@ -12,7 +12,7 @@ import cokr.xit.foundation.data.DataObject;
/** . /** .
* <ul><li> </li> * <ul><li> </li>
* <li>{@link #getPolicyList(String, String, int, int) }</li> * <li>{@link #getPolicyList(QueryRequest) }</li>
* <li>{@link #create(AuthenticationPolicy) }</li> * <li>{@link #create(AuthenticationPolicy) }</li>
* <li>{@link #update(AuthenticationPolicy) }</li> * <li>{@link #update(AuthenticationPolicy) }</li>
* <li>{@link #removePolicies(String...) }</li> * <li>{@link #removePolicies(String...) }</li>
@ -36,13 +36,16 @@ public interface AuthenticationService extends UserDetailsService {
void onLogout(Authentication authentication); void onLogout(Authentication authentication);
/** . /** .
* @param by * @param req
* <ul><li>userName - </li> * <ul><li>by:
* <li> </li> * <ul><li>userName - </li>
* <li> </li>
* </ul>
* </li>
* <li>term: </li>
* <li>pageNum: </li>
* <li>fetchSize: </li>
* </ul> * </ul>
* @param term
* @param pageNum
* @param fetchSize
* @return * @return
*/ */
List<DataObject> getPolicyList(QueryRequest req); List<DataObject> getPolicyList(QueryRequest req);

@ -17,7 +17,7 @@ import cokr.xit.foundation.User;
import cokr.xit.foundation.component.QueryRequest; import cokr.xit.foundation.component.QueryRequest;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
/** DAO /** Bean
* @author mjkhan * @author mjkhan
*/ */
@Component("authenticationBean") @Component("authenticationBean")
@ -74,14 +74,9 @@ public class AuthenticationBean extends AbstractComponent {
return 0; return 0;
} }
/** . /** .<br />
* @param by * {@link cokr.xit.base.security.authentication.service.AuthenticationService#getPolicyList(QueryRequest)}
* <ul><li>userName - </li> * @param req
* <li> </li>
* </ul>
* @param term
* @param pageNum
* @param fetchSize
* @return * @return
*/ */
public List<DataObject> getPolicyList(QueryRequest req) { public List<DataObject> getPolicyList(QueryRequest req) {

@ -28,13 +28,9 @@ public class PolicyController<T extends AuthenticationPolicy> extends AbstractCo
return authenticationService; return authenticationService;
} }
/** . /** .<br />
* @param by * {@link AuthenticationService#getPolicyList(QueryRequest)}
* <ul><li>userName - </li> * @param req
* <li> </li>
* </ul>
* @param term
* @param pageNum
* @return jsonView * @return jsonView
* <pre><code>{ * <pre><code>{
* "policyList": , * "policyList": ,
@ -56,7 +52,7 @@ public class PolicyController<T extends AuthenticationPolicy> extends AbstractCo
* @param policy * @param policy
* @return jsonView * @return jsonView
* <pre><code>{ * <pre><code>{
* "saved": true || false * "saved": true, false
* }</code></pre> * }</code></pre>
*/ */
@PostMapping(name="인증 정책 등록", value="/created.do") @PostMapping(name="인증 정책 등록", value="/created.do")
@ -69,7 +65,7 @@ public class PolicyController<T extends AuthenticationPolicy> extends AbstractCo
* @param policy * @param policy
* @return jsonView * @return jsonView
* <pre><code>{ * <pre><code>{
* "saved": true || false * "saved": true, false
* }</code></pre> * }</code></pre>
*/ */
@PostMapping(name="인증 정책 수정", value="/update.do") @PostMapping(name="인증 정책 수정", value="/update.do")
@ -83,7 +79,7 @@ public class PolicyController<T extends AuthenticationPolicy> extends AbstractCo
* @return jsonView * @return jsonView
* <pre><code>{ * <pre><code>{
* "affected": , * "affected": ,
* "saved": true || false * "saved": true, false
* }</code></pre> * }</code></pre>
*/ */
@PostMapping(name="인증 정책 제거", value="/remove.do") @PostMapping(name="인증 정책 제거", value="/remove.do")

Loading…
Cancel
Save