CPD Results

The following document contains the results of PMD's CPD 5.0.5.

Duplications

File Line
com\poscoict\glueframework\biz\activity\GlueJdbcInsert.java 299
com\poscoict\glueframework\biz\activity\GlueJdbcModify.java 288
        }
        ctx.put( resultkey, new Integer( cnt ) );

        return GlueBizControlConstants.SUCCESS;
    }

    /**
     * @param dao
     * @param queryKey
     * @param str
     * @return
     */
    private Map<String, String> parseProperty( GlueGenericJdbcDao dao, String queryKey, String str )
    {
        Set<String> nameSet = GlueNamedParameterUtils.parseSqlStatement( dao.getQueryManager().getQueryDefinition( queryKey ).getQueryStatement() );
        if ( nameSet == null || nameSet.size() < 1 )
        {
            return null;
        }

        Map<String, String> keymap = new HashMap<String, String>();
        for ( String named : nameSet )
        {
            keymap.put( named, named );
        }

        if ( str == null || str.trim().length() < 1 )
        {
            return keymap;
        }

        StringTokenizer tokenizer = new StringTokenizer( str, GlueActivityConstants.PARAM_SEPERATORS );
        while ( tokenizer.hasMoreElements() )
        {
            String token = tokenizer.nextToken();
            String pair[] = token.split( GlueActivityConstants.EQUALS, 2 );
            if ( nameSet.contains( pair[0] ) )
            {
                pair[1] = pair[1] == null ? pair[0] : pair[1];
                keymap.put( pair[0], pair[1] );
            }
        }
        return keymap;
    }

    /**
     * @param nameMap
     * @param idx
     * @param data
     * @return
     */
    private GlueParameter<Map<String, Object>> makeMapParameter( Map<String, String> nameMap, int idx, Map<?, ?> data )
    {
        if ( nameMap == null || nameMap.size() < 1 )
        {
            return null;
        }
        Map<String, Object> args = new HashMap<String, Object>();
        for ( String keyInSql : nameMap.keySet() )
        {
            String keyInData = nameMap.get( keyInSql );
            Object value = data.get( keyInData );
            if ( value instanceof Object[] )
            {
                args.put( keyInSql, ( (Object[]) value )[idx] );
            } else
            {
                args.put( keyInSql, value );
            }
        }
        return new GlueParameter<Map<String, Object>>( args );
    }

    /**
     * @param paramCnt
     * @param idx
     * @param ctx
     * @return
     */
    private GlueParameter<List<Object>> makeListParameter( int paramCnt, int idx, Map<?, ?> ctx )
    {
        if ( paramCnt == 0 )
        {
            return null;
        }
        List<Object> args = new ArrayList<Object>();
        for ( int i = 0; i < paramCnt; i++ )
        {
            Object value = ctx.get( this.getProperty( GlueActivityConstants.PARAM + i ) );
            if ( value == null )
            {
                args.add( null );
            } else if ( value instanceof String[] )
            {
                args.add( ( (String[]) value )[idx] );
            } else
            {
                args.add( value );
            }
        }
        return args.size() > 0 ? new GlueParameter<List<Object>>( args ) : null;
    }

    /**
     * Audit Attribute를 Get.
     * 
     * @param ctx
     * @param isAudit
     * @return
     */
    private GlueAuditAttributes getAuditAttribute( GlueContext ctx, String isAudit )
    {
        if ( isAudit != null && Boolean.valueOf( isAudit ).booleanValue() )
        {
            if ( ctx.getAuditAttributes() == null )
            {
                throw new GlueException( "no data. not defined 'audit.insert.key' and 'audit.update.key' in 'glue.properties'" );
            }
            return ctx.getAuditAttributes();
        }
        return null;
    }
}
File Line
com\poscoict\glueframework\biz\activity\GlueJdbcDelete.java 231
com\poscoict\glueframework\biz\activity\GlueJdbcInsert.java 299
com\poscoict\glueframework\biz\activity\GlueJdbcModify.java 288
        }
        ctx.put( resultkey, new Integer( cnt ) );

        return GlueBizControlConstants.SUCCESS;
    }

    /**
     * @param dao
     * @param queryKey
     * @param str
     * @return
     */
    private Map<String, String> parseProperty( GlueGenericJdbcDao dao, String queryKey, String str )
    {
        Set<String> nameSet = GlueNamedParameterUtils.parseSqlStatement( dao.getQueryManager().getQueryDefinition( queryKey ).getQueryStatement() );
        if ( nameSet == null || nameSet.size() < 1 )
        {
            return null;
        }

        Map<String, String> keymap = new HashMap<String, String>();
        for ( String named : nameSet )
        {
            keymap.put( named, named );
        }

        if ( str == null || str.trim().length() < 1 )
        {
            return keymap;
        }

        StringTokenizer tokenizer = new StringTokenizer( str, GlueActivityConstants.PARAM_SEPERATORS );
        while ( tokenizer.hasMoreElements() )
        {
            String token = tokenizer.nextToken();
            String pair[] = token.split( GlueActivityConstants.EQUALS, 2 );
            if ( nameSet.contains( pair[0] ) )
            {
                pair[1] = pair[1] == null ? pair[0] : pair[1];
                keymap.put( pair[0], pair[1] );
            }
        }
        return keymap;
    }

    /**
     * @param nameMap
     * @param idx
     * @param data
     * @return
     */
    private GlueParameter<Map<String, Object>> makeMapParameter( Map<String, String> nameMap, int idx, Map<?, ?> data )
    {
        if ( nameMap == null || nameMap.size() < 1 )
        {
            return null;
        }
        Map<String, Object> args = new HashMap<String, Object>();
        for ( String keyInSql : nameMap.keySet() )
        {
            String keyInData = nameMap.get( keyInSql );
            Object value = data.get( keyInData );
            if ( value instanceof Object[] )
            {
                args.put( keyInSql, ( (Object[]) value )[idx] );
            } else
            {
                args.put( keyInSql, value );
            }
        }
        return new GlueParameter<Map<String, Object>>( args );
    }

    /**
     * @param paramCnt
     * @param idx
     * @param ctx
     * @return
     */
    private GlueParameter<List<Object>> makeListParameter( int paramCnt, int idx, Map<?, ?> ctx )
    {
        if ( paramCnt == 0 )
        {
            return null;
        }
        List<Object> args = new ArrayList<Object>();
        for ( int i = 0; i < paramCnt; i++ )
        {
            Object value = ctx.get( this.getProperty( GlueActivityConstants.PARAM + i ) );
            if ( value == null )
            {
                args.add( null );
            } else if ( value instanceof String[] )
            {
                args.add( ( (String[]) value )[idx] );
            } else
            {
                args.add( value );
            }
        }
        return args.size() > 0 ? new GlueParameter<List<Object>>( args ) : null;
    }
File Line
com\poscoict\glueframework\biz\activity\GlueJdbcInsert.java 232
com\poscoict\glueframework\biz\activity\GlueJdbcModify.java 221
public class GlueJdbcInsert extends GlueActivity<GlueContext>
{
    @Override
    public String runActivity( GlueContext ctx )
    {
        GlueGenericJdbcDao dao = (GlueGenericJdbcDao) this.getDao( this.getProperty( GlueActivityConstants.DAO ) );
        String queryId = this.getProperty( GlueActivityConstants.SQLKEY );
        String chkName = this.getProperty( GlueActivityConstants.CHK_NAME );
        String listKey = this.getProperty( GlueActivityConstants.LIST_KEY );
        if ( chkName != null && listKey != null )
        {
            throw new GlueException( "DO NOT USE 'chk-name' and 'list-key' together." );
        }
        String paramCount = this.getProperty( GlueActivityConstants.PARAM_COUNT );
        String paramBindings = this.getProperty( GlueActivityConstants.PARAM_BINDINGS );
        String resultkey = this.getProperty( GlueActivityConstants.RESULT_KEY );
        String isAudit = this.getProperty( GlueActivityConstants.IS_AUDIT );

        GlueQueryDefinition def = dao.getQueryManager().getQueryDefinition( queryId );
        boolean isNamed = def != null && def.isNamedQuery();
        GlueAuditAttributes audit = getAuditAttribute( ctx, isAudit );
        int paramCnt = isNamed || ( paramCount == null ) ? 0 : Integer.parseInt( paramCount );
        Map<String, String> nameMap = isNamed ? this.parseProperty( dao, queryId, paramBindings ) : null;

        int cnt = 0;
        if ( chkName != null && ctx.get( chkName ) != null )
        {
            /*
             * chk-name이 있으면, request(ui)의 것이 사용되므로 String[] 형태임..
             */
            String[] checked = (String[]) ctx.get( chkName );
            for ( int i = 0, iz = checked.length, idx = 0; i < iz; i++ )
            {
                idx = Integer.parseInt( checked[i] );
                GlueParameter<?> param = isNamed ? makeMapParameter( nameMap, idx, ctx ) : makeListParameter( paramCnt, idx, ctx );
                param.setAuditAttributes( audit );
                cnt += dao.insert( queryId, param );
File Line
com\poscoict\glueframework\biz\activity\GlueJdbcDelete.java 284
com\poscoict\glueframework\biz\activity\GlueJdbcSearch.java 229
        if ( nameMap == null || nameMap.size() < 1 )
        {
            return null;
        }
        Map<String, Object> args = new HashMap<String, Object>();
        for ( String keyInSql : nameMap.keySet() )
        {
            String keyInData = nameMap.get( keyInSql );
            Object value = data.get( keyInData );
            if ( value instanceof Object[] )
            {
                args.put( keyInSql, ( (Object[]) value )[idx] );
            } else
            {
                args.put( keyInSql, value );
            }
        }
        return new GlueParameter<Map<String, Object>>( args );
    }

    /**
     * @param paramCnt
     * @param idx
     * @param ctx
     * @return
     */
    private GlueParameter<List<Object>> makeListParameter( int paramCnt, int idx, Map<?, ?> ctx )
    {
        if ( paramCnt == 0 )
        {
            return null;
        }
        List<Object> args = new ArrayList<Object>();
        for ( int i = 0; i < paramCnt; i++ )
        {
            Object value = ctx.get( this.getProperty( GlueActivityConstants.PARAM + i ) );
            if ( value == null )
            {
                args.add( null );
            } else if ( value instanceof String[] )
            {
                args.add( ( (String[]) value )[idx] );
            } else
            {
                args.add( value );
            }
        }
        return args.size() > 0 ? new GlueParameter<List<Object>>( args ) : null;
    }
}
File Line
com\poscoict\glueframework\biz\activity\GlueJdbcInsert.java 352
com\poscoict\glueframework\biz\activity\GlueJdbcModify.java 341
com\poscoict\glueframework\biz\activity\GlueJdbcSearch.java 229
        if ( nameMap == null || nameMap.size() < 1 )
        {
            return null;
        }
        Map<String, Object> args = new HashMap<String, Object>();
        for ( String keyInSql : nameMap.keySet() )
        {
            String keyInData = nameMap.get( keyInSql );
            Object value = data.get( keyInData );
            if ( value instanceof Object[] )
            {
                args.put( keyInSql, ( (Object[]) value )[idx] );
            } else
            {
                args.put( keyInSql, value );
            }
        }
        return new GlueParameter<Map<String, Object>>( args );
    }

    /**
     * @param paramCnt
     * @param idx
     * @param ctx
     * @return
     */
    private GlueParameter<List<Object>> makeListParameter( int paramCnt, int idx, Map<?, ?> ctx )
    {
        if ( paramCnt == 0 )
        {
            return null;
        }
        List<Object> args = new ArrayList<Object>();
        for ( int i = 0; i < paramCnt; i++ )
        {
            Object value = ctx.get( this.getProperty( GlueActivityConstants.PARAM + i ) );
            if ( value == null )
            {
                args.add( null );
            } else if ( value instanceof String[] )
            {
                args.add( ( (String[]) value )[idx] );
            } else
            {
                args.add( value );
            }
        }
        return args.size() > 0 ? new GlueParameter<List<Object>>( args ) : null;
    }
File Line
com\poscoict\glueframework\biz\activity\GlueMessageCreate.java 100
com\poscoict\glueframework\biz\activity\GlueMessageParse.java 153
        GlueMessageLayout layoutManager = GlueStaticContext.getBeanFactory().getBeanObject( layoutMgrKey, GlueMessageLayout.class );

        // 2. byte[] 처리를 위한 인코딩 지정.
        // 4.2.3 이전 : JVM default 값을 따르는 것으로
        // 4.2.4 이후 : property 값 적용
        Charset charset = ( (GlueAbstractFixedLengthMessageLayout) layoutManager ).getCharset();
        if ( charsetKey != null )
        {
            if ( ctx.get( charsetKey ) != null )
            {
                Object obj = ctx.get( charsetKey );
                if ( obj instanceof String )
                {
                    charset = Charset.isSupported( (String) obj ) ? Charset.forName( (String) obj ) : charset;
                } else if ( obj instanceof String[] )
                {
                    charset = Charset.isSupported( ( (String[]) obj )[0] ) ? Charset.forName( ( (String[]) obj )[0] ) : charset;
                } else if ( obj instanceof Charset )
                {
                    charset = (Charset) obj;
                }
            } else
            {
                charset = ( ( charsetName != null ) && Charset.isSupported( charsetName ) ) ? Charset.forName( charsetName ) : charset;
            }
        } else
        {
            charset = ( ( charsetName != null ) && Charset.isSupported( charsetName ) ) ? Charset.forName( charsetName ) : charset;
        }
        ( (GlueAbstractFixedLengthMessageLayout) layoutManager ).setCharset( charset );
File Line
com\poscoict\glueframework\web\control\spring\GlueSimpleController.java 56
com\poscoict\glueframework\web\control\spring\GlueXMLViewController.java 236
    public ModelAndView setModelAndView( GlueWebContext ctx ) {
        String mv = null;
        if(ctx.get(GlueWebConstants.FORWARDNAME)!=null){
            Object obj = ctx.get( GlueWebConstants.FORWARDNAME );
            if ( obj instanceof String ) {
                mv = (String) obj;
            } else if ( obj instanceof String[] ) {
                mv = ( (String[]) obj )[0];
            }
        }
        if(mv==null && super.getViewPage()!=null){
            mv = super.getViewPage();
        }
        if(mv==null){
            String RequestURI = (String) ctx.get( GlueWebConstants.REQUEST_URI );
            String ContextPath = (String) ctx.get( GlueWebConstants.CONTEXT_PATH );
            RequestURI = RequestURI.replaceFirst( ContextPath, "" );
            if ( !RequestURI.trim().equals( "" ) ) {
                mv = RequestURI.substring( 0, RequestURI.lastIndexOf( "." ) );
            }
        }
        return new ModelAndView(mv);
    }
File Line
com\poscoict\glueframework\message\layout\GlueMessageUtil.java 301
com\poscoict\glueframework\message\layout\GlueMessageUtil.java 372
    public static String getMsgString( GlueMessageAttributeDefinition attrDef, GlueMessage message, int index )
    {
        String str = "";
        String id = attrDef.getId();
        int length = attrDef.getLength();
        String strMsg = null;

        if ( attrDef.getType().equals( GlueMessageDefinition.GROUP_ELEMENT ) )
        {
            String idIdx = id + String.valueOf( index );
            // Group Element의 id+Seq값
            if ( message.get( idIdx ) == null )
            // key값을 id+seq로 했을때 Value가 없을 경우
            {
                // key값을 id로 ArrayList의 값의 해당 index의 Value를 조회
                if ( message.get( id ) != null )
                {
                    strMsg = (String) ( (List<?>) message.get( id ) ).get( index );
                }
            } else if ( message.get( idIdx ) != null )
            {
                strMsg = (String) message.get( idIdx );
                // key값을 id+seq로 // 했을때 Value를 조회
            }
        } else if ( message.get( id ) != null )
        {
            // Group 항목이 아닌 일반 항목일 경우
            strMsg = (String) message.get( id );
        }

        if ( strMsg == null )
        {
            str = GlueMessageUtil.convertMsgToString( "", length );
        } else
        {
File Line
com\poscoict\glueframework\biz\control\GlueServiceLoader.java 217
com\poscoict\glueframework\dao\manager\GlueQueryLoader.java 393
                        serviceMapping.put( this.getServiceName( path ), path );
                    }
                }
            } else if ( "jar".equals( url.getProtocol() ) || "zip".equals( url.getProtocol() ) )
            {
                String path = url.getPath();
                if ( ( path != null ) && path.startsWith( "file:" ) )
                {
                    path = path.substring( "file:".length() );
                }
                path = URLDecoder.decode( path, this.pathEncoding );
                int idx = path.indexOf( "!" ); // .jar!/, .war!/
                if ( idx < 0 )
                {
                    this.logger.error( "{}", url.getPath() );
                }
                String filePath = path.substring( 0, idx );
                Enumeration<JarEntry> jarFileList = new JarFile( new File( filePath ) ).entries();
                while ( jarFileList.hasMoreElements() )
                {
                    JarEntry jarEntry = jarFileList.nextElement();
                    String fileName = jarEntry.getName();
                    if ( fileName.endsWith( SERVICE_POSTPIX ) && fileName.contains( this.serviceRootPath ) )
File Line
com\poscoict\glueframework\biz\activity\GlueJdbcNativeRun.java 883
com\poscoict\glueframework\biz\activity\GlueJdbcNativeRun.java 914
        for ( ColumnInfo columnInfo : columns )
        {
            String columnName = columnInfo.getName();
            String key = nameMap.get( columnName ) == null ? columnName : nameMap.get( columnName );
            // 상수가 정의되어 있다면, 상수를 우선한다. 그외는 ctx에서 꺼내온다.
            Object obj = null;
            if ( constantMap.containsKey( key ) )
            {
                obj = constantMap.get( key );
            } else
            {
                if ( map != null && map.containsKey( key ) )
                {
                    obj = map.get( key );
                } else
                {
                    obj = ctx.get( key );
                }
            }
            if ( obj instanceof Object[] )
            {
                paramList.add( ( (Object[]) obj )[idx] );
            } else if ( obj instanceof List )
            {
                paramList.add( ( (List<?>) obj ).get( idx ) );
            } else
            {
                paramList.add( obj );
            }
        }
File Line
com\poscoict\glueframework\biz\activity\GlueJdbcInsert.java 268
com\poscoict\glueframework\biz\activity\GlueJdbcModify.java 257
                cnt += dao.insert( queryId, param );
            }
        } else if ( listKey != null && ctx.get( listKey ) != null )
        {
            /*
             * chk-name이 없으며, list-key가 있으면 list(non-ui)의 것이 사용되며, map이 list로 담겨있는 형태임.
             */
            List<Map<?, ?>> dataSet = (List<Map<?, ?>>) ctx.get( listKey );
            if ( dataSet == null || dataSet.size() == 0 )
            {
                throw new GlueException( "list-key[" + listKey + "] of ctx, List Data for delete has no Data." );
            }
            for ( int i = 0, iz = dataSet.size(); i < iz; i++ )
            {
                GlueParameter<?> param = isNamed ? makeMapParameter( nameMap, 0, dataSet.get( i ) ) : makeListParameter( paramCnt, 0, dataSet.get( i ) );
                param.setAuditAttributes( audit );
                cnt += dao.insert( queryId, param );
File Line
com\poscoict\glueframework\biz\control\GlueServiceLoader.java 188
com\poscoict\glueframework\dao\manager\GlueQueryLoader.java 364
            if ( "file".equals( url.getProtocol() ) )
            {
                File dir = new File( url.toURI() );
                this.logger.trace( "isDirectory : {}", dir.isDirectory() );
                this.logger.trace( "canRead : {}", dir.canRead() );
                this.logger.trace( "isFile : {}", dir.isFile() );
                this.logger.trace( "listFiles : {}", dir.isDirectory() ? dir.listFiles().length : "-" );
                if ( dir != null && dir.isDirectory() )
                {
                    List<File> filelist = GlueFileResourceUtil.getListOfFiles( dir );
                    for ( File file : filelist )
                    {
                        String path = file.toURI().getPath();
                        if ( path.endsWith( SERVICE_POSTPIX ) )
File Line
com\poscoict\glueframework\biz\activity\GlueJdbcDelete.java 187
com\poscoict\glueframework\biz\activity\GlueJdbcInsert.java 252
com\poscoict\glueframework\biz\activity\GlueJdbcModify.java 241
        boolean isNamed = def != null && def.isNamedQuery();
        int paramCnt = isNamed || ( paramCount == null ) ? 0 : Integer.parseInt( paramCount );
        Map<String, String> nameMap = isNamed ? this.parseProperty( dao, queryId, paramBindings ) : null;

        int cnt = 0;
        if ( chkName != null && ctx.get( chkName ) != null )
        {
            /*
             * chk-name이 있으면, request(ui)의 것이 사용되므로 String[] 형태임..
             */
            String[] checked = (String[]) ctx.get( chkName );
            for ( int i = 0, iz = checked.length, idx = 0; i < iz; i++ )
            {
                idx = Integer.parseInt( checked[i] );
                GlueParameter<?> param = isNamed ? makeMapParameter( nameMap, idx, ctx ) : makeListParameter( paramCnt, idx, ctx );
File Line
com\poscoict\glueframework\biz\activity\GlueJdbcDelete.java 257
com\poscoict\glueframework\biz\activity\GlueJdbcInsert.java 325
com\poscoict\glueframework\biz\activity\GlueJdbcModify.java 314
com\poscoict\glueframework\biz\activity\GlueJdbcSearch.java 202
        if ( str == null || str.trim().length() < 1 )
        {
            return keymap;
        }

        StringTokenizer tokenizer = new StringTokenizer( str, GlueActivityConstants.PARAM_SEPERATORS );
        while ( tokenizer.hasMoreElements() )
        {
            String token = tokenizer.nextToken();
            String pair[] = token.split( GlueActivityConstants.EQUALS, 2 );
            if ( nameSet.contains( pair[0] ) )
            {
                pair[1] = pair[1] == null ? pair[0] : pair[1];
                keymap.put( pair[0], pair[1] );
            }
        }
        return keymap;
    }

    /**
     * @param nameMap
     * @param idx
     * @param data
     * @return
     */
    private GlueParameter<Map<String, Object>> makeMapParameter( Map<String, String> nameMap, int idx, Map<?, ?> data )
    {
        if ( nameMap == null || nameMap.size() < 1 )
File Line
com\poscoict\glueframework\biz\activity\GlueJdbcDelete.java 202
com\poscoict\glueframework\biz\activity\GlueJdbcInsert.java 268
com\poscoict\glueframework\biz\activity\GlueJdbcModify.java 257
                cnt += dao.delete( queryId, param );
            }
        } else if ( listKey != null && ctx.get( listKey ) != null )
        {
            /*
             * chk-name이 없으며, list-key가 있으면 list(non-ui)의 것이 사용되며, map이 list로 담겨있는 형태임.
             */
            List<Map<?, ?>> dataSet = (List<Map<?, ?>>) ctx.get( listKey );
            if ( dataSet == null || dataSet.size() == 0 )
            {
                throw new GlueException( "list-key[" + listKey + "] of ctx, List Data for delete has no Data." );
            }
            for ( int i = 0, iz = dataSet.size(); i < iz; i++ )
            {
                GlueParameter<?> param = isNamed ? makeMapParameter( nameMap, 0, dataSet.get( i ) ) : makeListParameter( paramCnt, 0, dataSet.get( i ) );
File Line
com\poscoict\glueframework\web\control\struts\GlueSimpleAction.java 37
com\poscoict\glueframework\web\GlueHttpReceiverAdapter.java 365
    public GlueWebContext beforeExecute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response )
    {   
        if ( GlueStaticContext.isAudit() )
        {
            String insertAuditParamKey = GlueStaticContext.getGlueProperty( GlueBizControlConstants.GLUE_AUDIT_INSERT_PARAM );
            String updateAuditParamKey = GlueStaticContext.getGlueProperty( GlueBizControlConstants.GLUE_AUDIT_UPDATE_PARAM );
            
            Map<String, String[]> paramMap = request.getParameterMap();
            Map<String, Object> map = new HashMap<String, Object>();;
            Set<String> set = new HashSet<String>();
            String[] audit = ( insertAuditParamKey + "," + updateAuditParamKey ).split( "," );
            for ( String str : audit )
            {
                if ( str.trim().length() > 0 && set.add( str ) )
                {
                    String[] obj = paramMap.get( str );
File Line
com\poscoict\glueframework\cache\remote\GlueRemoteEhCacheManager.java 31
com\poscoict\glueframework\cache\remote\GlueRemoteJCSCacheManager.java 31
public class GlueRemoteEhCacheManager extends GlueEhCacheManager implements InitializingBean
{
    private GlueCacheEventSender cacheEventSender;

    @Override
    public void removeCacheObject( Object cacheKey, String regionName )
    {
        // local cache region
        super.removeCacheObject( cacheKey, regionName );

        // remote cache region
        this.removeRemoteCacheObject( cacheKey, regionName );
    }

    /**
     * @param cacheKey
     * @param regionName
     */
    private void removeRemoteCacheObject( Object cacheKey, String regionName )
    {
        // handle exception
        GlueCacheEvent event = new GlueCacheEvent( (String) cacheKey, regionName );
        String result = this.cacheEventSender.sendEvent( event );
        super.logger.debug( result );
    }

    /**
     * @return the cacheEventSender
     */
    public GlueCacheEventSender getCacheEventSender()
    {
        return this.cacheEventSender;
    }

    /**
     * setter method for DI.
     * 
     * @param cacheEventSender the cacheEventSender to set
     */
    public void setCacheEventSender( GlueCacheEventSender cacheEventSender )
    {
        this.cacheEventSender = cacheEventSender;
    }

    @Override
    public void afterPropertiesSet() throws Exception
    {
        Assert.notNull( this.cacheEventSender, "GlueCacheEventSender must be provided" );
    }
}
File Line
com\poscoict\glueframework\biz\activity\GlueJdbcDelete.java 169
com\poscoict\glueframework\biz\activity\GlueJdbcInsert.java 232
com\poscoict\glueframework\biz\activity\GlueJdbcModify.java 221
public class GlueJdbcDelete extends GlueActivity<GlueContext>
{
    @Override
    public String runActivity( GlueContext ctx )
    {
        GlueGenericJdbcDao dao = (GlueGenericJdbcDao) this.getDao( this.getProperty( GlueActivityConstants.DAO ) );
        String queryId = this.getProperty( GlueActivityConstants.SQLKEY );
        String chkName = this.getProperty( GlueActivityConstants.CHK_NAME );
        String listKey = this.getProperty( GlueActivityConstants.LIST_KEY );
        if ( chkName != null && listKey != null )
        {
            throw new GlueException( "DO NOT USE 'chk-name' and 'list-key' together." );
        }
        String paramCount = this.getProperty( GlueActivityConstants.PARAM_COUNT );
        String paramBindings = this.getProperty( GlueActivityConstants.PARAM_BINDINGS );
        String resultkey = this.getProperty( GlueActivityConstants.RESULT_KEY );
File Line
com\poscoict\glueframework\web\control\spring\GlueAbstractController.java 94
com\poscoict\glueframework\web\control\struts\GlueAbstractAction.java 76
        try
        {
            String serviceName = null;
            String contentType = request.getContentType();
            GlueMultipartRequest multiPart = null;
            Map<String, String[]> paramMap = request.getParameterMap();
            /************* GlueMultipartRequest & SERVICE_NAME 설정 Start *************/
            if ( ( contentType != null ) && contentType.toLowerCase().startsWith( GlueWebConstants.MULTIPART_FORM ) )
            {
                multiPart = new GlueMultipartRequest( request );
                paramMap = multiPart.getParameterMap();
                String[] serviceNameParam = paramMap.get( GlueBizControlConstants.SERVICE_NAME );
                if ( serviceNameParam != null )
                {
                    serviceName = serviceNameParam[0];
                }
            } else
            {
                serviceName = request.getParameter( GlueBizControlConstants.SERVICE_NAME );
            }

            if ( serviceName != null )
            {
                ctx = (GlueWebContext) request.getAttribute( GlueWebConstants.CONTEXT );
File Line
com\poscoict\glueframework\web\control\portlet\GlueAbstractController.java 141
com\poscoict\glueframework\web\control\portlet\GlueAbstractController.java 389
            actionResponse.setRenderParameters( privateParamMap );
        } else
        {
            ctx.put( GlueBizControlConstants.SERVICE_NAME, serviceName );
            // 2. Glue Service 실행
            MDC.put( GlueBizControlConstants.SERVICE_NAME, serviceName );
            GlueBizController bizIF = GlueBizProvider.getController();
            bizIF.doAction( ctx );
            MDC.remove( GlueBizControlConstants.SERVICE_NAME );

            // 3. Portlet 후속작업.
            // 3-1 self portlet으로 Render Parameter로 전달
            List<String> renderParam = (List<String>) ctx.get( GlueBizControlConstants.RESULT_KEY_LIST );
            if ( ( renderParam != null ) && ( renderParam.size() > 0 ) )
            {
                for ( String name : renderParam )
                {
                    Object obj = ctx.get( name );
                    if ( obj != null )
                    {
                        if ( obj instanceof String )
                        {
File Line
com\poscoict\glueframework\web\control\portlet\GlueSimpleController.java 143
com\poscoict\glueframework\web\control\struts\GlueSimpleAction.java 44
            Map<String, String[]> paramMap = actionRequest.getPrivateParameterMap();
            Map<String, Object> map = new HashMap<String, Object>();;
            Set<String> set = new HashSet<String>();
            String[] audit = ( insertAuditParamKey + "," + updateAuditParamKey ).split( "," );
            for ( String str : audit )
            {
                if ( str.trim().length() > 0 && set.add( str ) )
                {
                    String[] obj = paramMap.get( str );
                    map.put( str, obj != null && obj.length > 0 ? obj[0] : "" );
                }
            }
File Line
com\poscoict\glueframework\biz\activity\GlueFileDelete.java 83
com\poscoict\glueframework\biz\activity\GlueFileDown.java 88
        String uploadDir = this.getProperty( GlueActivityConstants.FILE_UPLOAD_PATH );
        boolean isReal = "true".equals( this.getProperty( GlueActivityConstants.IS_REAL_PATH ) );
        // 'file-upload-path' property가 없다면 file 정보는 전체 path를 포함해야함.
        boolean includePath = uploadDir == null;
        if ( !includePath )
        {
            if ( !isReal )
            {
                // 상대 경로일 경우 glue.properties에 default.file.dir property에 기준 경로가 있어야 함.
                String rootPath = GlueStaticContext.getGlueProperty( GlueBizControlConstants.GLUE_DEFAULT_FIlE_DIR );
                if ( rootPath == null )
                {
                    throw new GlueException( "check 'glue.properties'. add 'default.file.dir' property" );
                }
                if ( uploadDir.startsWith( "/" ) )
                {
                    uploadDir = rootPath + uploadDir;
                } else
                {
                    uploadDir = rootPath + File.separator + uploadDir;
                }
            }

            try
            {
                uploadDir = URLDecoder.decode( uploadDir, GlueWebConstants.CHARTERSET_UTF_8 );
            } catch ( Exception e )
            {
File Line
com\poscoict\glueframework\biz\activity\GlueFileSave.java 138
com\poscoict\glueframework\biz\activity\GlueFileSave.java 183
                                FileOutputStream fos = new FileOutputStream( newFile );
                                fos.write( (byte[]) contents );
                                fos.flush();
                                fos.close();
                                super.logger.debug( "Save File from byte[] : [{}]", newFile );
                            } catch ( FileNotFoundException e )
                            {
                                super.logger.error( "FileNotFoundException", e );
                            } catch ( IOException e )
                            {
                                super.logger.error( "IOException", e );
                            }
                        } else if ( contents == null )
                        {
                            throw new GlueException( "Requested File is null !" );
                        } else
                        {
                            throw new GlueException( "Requested File is wrong ! [" + contents + "]" );
                        }
                    } else
File Line
com\poscoict\glueframework\message\layout\GlueAbstractFixedLengthMessageLayout.java 118
com\poscoict\glueframework\message\layout\GlueAbstractFixedLengthMessageLayout.java 193
        for ( int i = 0, iz = messageDefinition.getLength(); i < iz; i++ )
        {
            GlueMessageAttributeDefinition attrDef = messageDefinition.getAttribute( i );
            if ( GlueMessageDefinition.GROUP.equals( attrDef.getType() ) )
            {
                // Group 항목일 경우
                // Message내에 Group항목이 있을때 Group항목의 요소들을 반복하여 Message를
                // 생성한다.
                List<GlueMessageAttributeDefinition> groupAttrDefList = messageDefinition.getGroupAttrs( i );
                for ( int j = 0, jz = attrDef.getLength(); j < jz; j++ )
                {
                    for ( int k = 0, kz = groupAttrDefList.size(); k < kz; k++ )
                    {