Thanks, Dan and Jeroen. The proposed solution is enough for my requirements.
But I've also just noticed these links for hiding [1] and disabling [2] all members ... I've also verified that [1] works not only for Domain Entities, but also for Services (not showing their actions as UI menus), so it fulfills my requirements with a simpler solution. Regards, Oscar [1] http://isis.apache.org/more-advanced-topics/how-to-02-040-How-to-specify-that-none-of-an-object's-members-is-visible.html [2] http://isis.apache.org/more-advanced-topics/how-to-02-080-How-to-specify-that-none-of-an-object's-members-can-be-modified-or-invoked.html > El 8/12/2014, a las 8:41, Dan Haywood <[email protected]> > escribió: > > On 7 December 2014 at 11:19, GESCONSULTOR - Óscar Bou < > [email protected]> wrote: > >> Hi to all. >> >> Is there a way to hide an object service programmatically (i.e., using a >> hide() method) ? >> >> The only way I know is the @Hidden annotation. >> >> > There isn't currently any built-in method for this, no. You can find this > out by looking for facets that implement HidingInteractionAdvisor. > > But on way the requirement can be supported is using the event bus, eg > adding this to the SimpleObjects service will hide the service (because all > of its actions are hidden): > > > @Programmatic > @PostConstruct > public void postConstruct() { > eventBusService.register(this); > } > > @Programmatic > @Subscribe > public void on(final ActionInteractionEvent<?> ev) { > switch(ev.getPhase()) { > case HIDE: > > if(SimpleObjects.class.isAssignableFrom(ev.getSource().getClass())) { > ev.hide(); > } > break; > } > } > > @javax.inject.Inject > private EventBusService eventBusService; > > > > Given we have such flexible support, I'm not certain we need any additional > special supporting methods. What do you think? > > HTH > Dan > > > > >> Same way, both them could be disabled (on Services it would mean all >> actions would be disabled). >> >> And also, for objects they could be programmatically validated. >> >> It could be also useful for per-instance security. >> >> >> Is it currently available? >> If not, could it be a good idea to create a facet for hide(), disable(), >> validate() methods ? >> > >> Thanks, >> >> Oscar >> >> >> >> Óscar Bou Bou Responsable de Producto Auditor Jefe de Certificación ISO 27001 en BSI CISA, CRISC, APMG ISO 20000, ITIL-F 902 900 231 / 620 267 520 http://www.twitter.com/oscarbou <http://www.twitter.com/oscarbou> http://es.linkedin.com/in/oscarbou <http://es.linkedin.com/in/oscarbou> http://www.GesConsultor.com <http://www.gesconsultor.com/> Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona. Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
