private void addGuvnorResourceProperties(ResourceProperties props,
                                            String filename, String resource) throws Exception {
        if (props == null) {
            return;
        }
        IResponse response = null;
        try {
            String path = resource.substring(0, resource.lastIndexOf('/'));
            String apiVer = changeToAPICall(path);
            Properties guvProps = new Properties();
            response = getResourceInputStream(apiVer);
            guvProps.load(response.getInputStream());
            String val = guvProps.getProperty(filename);
            if (val != null) {
                StringTokenizer tokens = new StringTokenizer(val, ","); //$NON-NLS-1$
//                String dateStamp = tokens.nextToken();
//                String revision = tokens.nextToken();
                if(tokens.hasMoreElements()){
                    props.setLastModifiedDate(tokens.nextToken());
                }
                if(tokens.hasMoreElements()){
                    props.setRevision(tokens.nextToken());
                }
            } else {
                Exception nfe = new Exception("Failed to get Guvnor properties for " + filename); //$NON-NLS-1$
                Activator.getDefault().writeLog(IStatus.WARNING, nfe.getMessage(), nfe);
            }
        } finally {
            if (response != null) {
                response.close();
            }
        }
    }
private void addGuvnorResourceProperties(ResourceProperties props,
                                            String filename, String resource) throws Exception {
        if (props == null) {
            return;
        }
        IResponse response = null;
        try {
            String path = resource.substring(0, resource.lastIndexOf('/'));
            String apiVer = changeToAPICall(path);
            Properties guvProps = new Properties();
            response = getResourceInputStream(apiVer);
            guvProps.load(response.getInputStream());
            String val = guvProps.getProperty(filename);
            if (val != null) {
                StringTokenizer tokens = new StringTokenizer(val, ","); 


                if(tokens.hasMoreElements()){
                    props.setLastModifiedDate(tokens.nextToken());
                }
                if(tokens.hasMoreElements()){
                    props.setRevision(tokens.nextToken());
                }
            } else {
                Exception nfe = new Exception("Failed to get Guvnor properties for " + filename); 
                Activator.getDefault().writeLog(IStatus.WARNING, nfe.getMessage(), nfe);
            }
        } finally {
            if (response != null) {
                response.close();
            }
        }
    }
private void addGuvnorResourceProperties ( ResourceProperties props , String filename , String resource ) throws Exception { if ( props == null ) { return ; } IResponse response = null ; try { String path = resource . substring ( 0 , resource . lastIndexOf ( ' ' ) ) ; String apiVer = changeToAPICall ( path ) ; Properties guvProps = new Properties ( ) ; response = getResourceInputStream ( apiVer ) ; guvProps . load ( response . getInputStream ( ) ) ; String val = guvProps . getProperty ( filename ) ; if ( val != null ) { StringTokenizer tokens = new StringTokenizer ( val , "," ) ; //$NON-NLS-1$ //                String dateStamp = tokens.nextToken(); //                String revision = tokens.nextToken(); if ( tokens . hasMoreElements ( ) ) { props . setLastModifiedDate ( tokens . nextToken ( ) ) ; } if ( tokens . hasMoreElements ( ) ) { props . setRevision ( tokens . nextToken ( ) ) ; } } else { Exception nfe = new Exception ( "Failed to get Guvnor properties for " + filename ) ; //$NON-NLS-1$ Activator . getDefault ( ) . writeLog ( IStatus . WARNING , nfe . getMessage ( ) , nfe ) ; } } finally { if ( response != null ) { response . close ( ) ; } } }
Adds Guvnor-specific resource properties to the collection.
@param props The resource properties colleciton
@param filename The name of the resource
@param resource The full path to the resource in Guvnor
@throws Exception
Adds Guvnor - specific resource properties to the collection .