Package open.dolphin.exception

Examples of open.dolphin.exception.SecurityException


    public String checkIdAsComposite(SessionContext ctx, String checkId) {
       
        // テストする ID の施設ID 部を得る
        int index = checkId.indexOf(COMPOSITE_KEY_MAKER);
        if (index < 0) {
            throw new SecurityException(checkId);
        }
        String facilityId = checkId.substring(0, index);
       
        // Caller の施設ID部を得る
        String callerId = ctx.getCallerPrincipal().getName();
        index = callerId.indexOf(COMPOSITE_KEY_MAKER);
        String callersFacilityId = callerId.substring(0, index);
       
        // 両者が一致しているかどうかを調べる
        if (!facilityId.equals(callersFacilityId)) {
            throw new SecurityException(checkId);
        }
       
        // 複合キーと見なせる
        return checkId;
    }
View Full Code Here


   
    public String checkFacility(SessionContext ctx, String checkId) {
        String callerKey = getCallersFacilityId(ctx);
        String requestKey = getRequestsFacilityId(checkId);
        if (! callerKey.equals(requestKey)) {
            throw new SecurityException(requestKey);
        }
        return checkId;
    }
View Full Code Here

TOP

Related Classes of open.dolphin.exception.SecurityException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.