O
Olli Plough
Hi,
in the application I'm working on there are some methods I don't want
the application developer to call (it's not the way to do things and
the use could corrupt data). In order to program truly against an
interface and have generic code I have to put these methods into the
respective Java interface, though. Problem is that the user should not
call these methods but use a different approach. My idea is now that
those methods require some credentials to be passed on as a parameter
and the "kernel" verifies whether the credentials that only the kernel
knows are correct. If not an exception is thrown. Now I'm asking
myself whether this is a good idea or rather brain damaged. My concern
is that the problem should rather be solved on a design level rather
than doing tricky things. But I see no way round putting those methods
into the respective Java interface class. Otherwise the framework
cannot call them itself ...
Any ideas or opinions would be appreciated.
Regards, Oliver Plohmann
in the application I'm working on there are some methods I don't want
the application developer to call (it's not the way to do things and
the use could corrupt data). In order to program truly against an
interface and have generic code I have to put these methods into the
respective Java interface, though. Problem is that the user should not
call these methods but use a different approach. My idea is now that
those methods require some credentials to be passed on as a parameter
and the "kernel" verifies whether the credentials that only the kernel
knows are correct. If not an exception is thrown. Now I'm asking
myself whether this is a good idea or rather brain damaged. My concern
is that the problem should rather be solved on a design level rather
than doing tricky things. But I see no way round putting those methods
into the respective Java interface class. Otherwise the framework
cannot call them itself ...
Any ideas or opinions would be appreciated.
Regards, Oliver Plohmann