1 /**
2 * Copyright 2005-2006 the original author or authors.
3 *
4 * Licensed under the Gnu General Pubic License, Version 2.0 (the
5 * "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/gpl-license.php
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the Gnu General Public License for more details.
14 */
15 package org.figure8.join.services.properties;
16
17 import org.figure8.join.core.InvalidParameterException;
18
19 import java.util.Properties;
20 /**
21 * This is a service interface defining a general purpose object converter that
22 * extract from object (and its inner fields graph) a set of properties.<br/>
23 * Use an extractor to flatten objects for using them, for example, as environment
24 * variables of a runtime evaluated script.
25 * @author <a href="mailto:laurent.broudoux@free.fr">Laurent Broudoux</a>
26 * @version $Revision: 1.1 $
27 */
28 public interface PropertiesExtractor{
29
30
31
32 /**
33 * Extract a set of properties from the given object.
34 * @param obj The object to extract properties from
35 * @throws InvalidParameterException if the object cannot be processed by implementation
36 * @return A set of properties representing the object and its inner fields graph
37 */
38 public Properties extract(Object obj) throws InvalidParameterException;
39 }