/** * {@link CurrentDetails} setter for dependency injection. * * @param currentDetails the details of the current thread's security context * @see ome.services.util.BeanHelper#throwIfAlreadySet(Object, Object) */ public final void setCurrentDetails(CurrentDetails currentDetails) { getBeanHelper().throwIfAlreadySet(this.currentDetails, currentDetails); this.currentDetails = currentDetails; }
/** * {@link PreferenceContext} setter for dependency injection. * * @param prefs the preference context * @see ome.services.util.BeanHelper#throwIfAlreadySet(Object, Object) */ public final void setPreferenceContext(PreferenceContext prefs) { getBeanHelper().throwIfAlreadySet(this.prefs, prefs); this.prefs = prefs; }
/** * {@link SqlAction} setter for dependency injection. * * @param sql the SQL action instance * @see ome.services.util.BeanHelper#throwIfAlreadySet(Object, Object) */ /* * Developer notes: --------------- Because of the complicated lifecycle of * EJBs it is not possible to fully configure them with constructor * injection (which is safer). Instead, we have to provide public setters * for all properties which need to be injected. And since Java doesn't have * the concept of "friends" (yet), this opens up our classes for some weird * manipulations. Therefore we've made all bean setters "final" and added a * call to "throwIfAlreadySet" which will only allow previously null fields * to be set. */ public final void setSqlAction(SqlAction sql) { getBeanHelper().throwIfAlreadySet(this.sql, sql); this.sql = sql; }