I have an interface ISettings with a bunch of getters all returning
String which are simple constant string settings:

public interface ISettings {

        public String getApplicationName();
        public String getApplicationVersion();
        public String getCookieJSessionId();
        public String getCookieAutoLogin();
        public String getSlash();
        public String getDirCss();
        public String getDirCssDefault();
        public String getDirMail();
        public String getDirImages();
        public String getFileCssMain();
        public String getFileMailRegConf();
        public String getFileMailPassChange();
        public String getFileMailPassReset();
        public String getFileImageHe();
        public String getFileImageShe();
        public String getFileImageGroup();
}

Can I use hivemind to set up values for this interface, and have
hivemind generate a new bean based on this interface? Something like
this:

<service-point id="Configuration" interface="xxx.xxx.ISettings">
        <invoke-factory model="singleton">
                <construct class="xxx.xxx.Settings" model="singleton">
                        <set property="applicationName" value="AppName.org"/>
                        <set property="applicationVersion" value="0.1"/>
                        <set property="cookieJSessionId" value="JSESSIONID"/>
                        <set property="cookieAutoLogin" value="AutoLogin"/>
                        <set property="splash" value="/"/>
                        <set property="dirCss" value="css"/>
                        <set property="dirCssDefault" value="Default"/>
                        <set property="dirMail" value="mail"/>
                        <set property="dirImages" value="images"/>
                        <set property="fileCssMain" value="main.css"/>
                        <set property="fileMailRegConf" value="reg_conf.txt"/>
                        <set property="fileMailPassChange" 
value="pass_change.txt"/>
                        <set property="fileMailPassReset" 
value="pass_reset.txt"/>
                        <set property="fileImageHe" value="he.jpeg"/>
                        <set property="fileImageShe" value="she.jpeg"/>
                        <set property="fileImageGroup" value="couple.jpeg"/>
                </construct>
        </invoke-factory>
</service-point>

The thing is I'd like to avoid creating actual implementation of my
ISettings interface because it's trivial and just more work (it's just
private properties, getters and setters). And from what I'm seeing I
need to tell hivemind about actual implementation. Is Hivemind capable
of creating on-the-fly instance implementation of my interface and
inject it to my code?

Adam

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to