Package org.archive.spring

Examples of org.archive.spring.Sheet


     * Retrieve the named overlay Map.
     *
     * @see org.archive.spring.OverlayMapsSource#getOverlayMap(java.lang.String)
     */
    public Map<String, Object> getOverlayMap(String name) {
        Sheet sheet = sheetsByName.get(name);
        if (sheet != null) {
            return sheet.getMap();
        } else {
            return null;
        }
    }
View Full Code Here


     * @param beanPath target bean-path of overlay
     * @param value new value
     * @return old value, if any
     */
    public Object putSheetOverlay(String sheetName, String beanPath, Object value) {
        Sheet sheet = getOrCreateSheet(sheetName);
        Object prevVal = sheet.getMap().put(beanPath, value);
        try {
            sheet.prime();
        } catch (TypeMismatchException tme) {
            // revert to presumably non-damaging value
            sheet.getMap().put(beanPath, prevVal);
            throw tme;
        }
        return prevVal;
    }
View Full Code Here

     * @param sheetName sheet name from which to remove overlay
     * @param beanPath overlay to remove
     * @return previous overlay value, if any
     */
    public Object removeSheetOverlay(String sheetName, String beanPath) {
        Sheet sheet = sheetsByName.get(sheetName);
        if(sheet==null) {
            return null;
        }
        // TODO: do all the externalPaths created by priming need eventual cleanup?
        return sheet.getMap().remove(beanPath);
    }
View Full Code Here

     *
     * @param name Sheet name to create; must be unique
     * @return created Sheet
     */
    public Sheet getOrCreateSheet(String name) {
        Sheet sheet = sheetsByName.get(name);
        if(sheet==null) {
            sheet = new Sheet();
            sheet.setBeanFactory(beanFactory);
            sheet.setName(name);
            sheet.setMap(new HashMap<String, Object>());
            sheetsByName.put(name, sheet);
        }
        return sheet;
    }
View Full Code Here

TOP

Related Classes of org.archive.spring.Sheet

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.