Funny you ask. My original "markup" was a Constants interface, but I
want to move these out to a configuration file. I could create a
simple property file, but I thought Tapestry way of things is to move
all that boilder plate code onto the framework, in this case let
Hivemind configure my properties..
Adam
On 4/3/06, Mike Snare <[EMAIL PROTECTED]> wrote:
> I don't think so, but why are you using a service for this? Seems
> like it could be done in a static class or just an interface full of
> constants.
>
> -Mike
>
> On 4/3/06, Adam Zimowski <[EMAIL PROTECTED]> wrote:
> > 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]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]