Re: Additional Forbidden Methods

Alan Gutierrez <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Attila

Sorry, off doing other things. I'm very fond of Freemarker now. It is  
working out well as the templating engine for my application.

I'd like to be able to hand over my data model, but not expose all  
the methods.

public class Account
{
    public void getName();

    public void getContactEmail();

    public void getPassword();
}

For example, I'd like to prevent the getPassword method from being  
called.

As it stands, I've mirrored my data model using Map instances,  
exclusing those properties that ought to be excluded. I'm content  
with this approach. However, exposing a method that would allow a  
user to feed the method exclusion method additional methods strikes  
me as a good idea.

Alan

On Jul 11, 2008, at 4:49 AM, Attila Szegedi wrote:

> That's true -- we didn't anticipate this list being expandable. What
> methods would you want to prohibit?
>
> Attila.
>
> On Jul 8, 2008, at 4:14 AM, Alan Gutierrez wrote:
>
>> Continuing to develop an application that allows for user defined
>> templating.
>>
>> How do I add additional methods to the list of unsafe methods defined
>> in BeanWrapper?
>>
>> From what I can tell, it is not possible, unless I create my own
>> unsafeMethods.txt resource, which does not look like something that
>> I'm supposed to do.

--
Alan Gutierrez | [email protected] | http://blogometer.com/ | 504  
717 1428
Think New Orleans | http://thinknola.com/



-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.