use of jakarta.annotation.PostConstruct in project jans by JanssenProject.
the class DataMapperService method init.
@PostConstruct
public void init() {
this.objectMapper = new ObjectMapper();
this.cborFactory = new CBORFactory();
this.cborObjectMapper = new ObjectMapper(cborFactory);
}
use of jakarta.annotation.PostConstruct in project jans by JanssenProject.
the class SearchResourcesWebService method setup.
@PostConstruct
public void setup() {
// Do not use getClass() here... a typical weld issue...
endpointUrl = appConfiguration.getBaseEndpoint() + SearchResourcesWebService.class.getAnnotation(Path.class).value();
mapper = new ObjectMapper();
// Do not alter the order of appearance (see getListResponseTree)
resourceClasses = new Class[] { UserResource.class, GroupResource.class, FidoDeviceResource.class, Fido2DeviceResource.class };
NUM_RESOURCE_TYPES = resourceClasses.length;
}
use of jakarta.annotation.PostConstruct in project jans by JanssenProject.
the class ProtectionServiceSelector method init.
/**
* Builds a map around url patterns and service beans that are aimed to perform
* actual protection
*/
@SuppressWarnings("unchecked")
@PostConstruct
private void init() {
mapping = new HashMap<>();
Set<Bean<?>> beans = beanManager.getBeans(JansRestService.class, Any.Literal.INSTANCE);
for (Bean bean : beans) {
Class beanClass = bean.getBeanClass();
Optional.ofNullable(beanClass.getAnnotation(BindingUrls.class)).map(BindingUrls.class::cast).map(BindingUrls::value).map(Arrays::asList).orElse(Collections.emptyList()).forEach(pattern -> {
if (pattern.length() > 0) {
mapping.put(pattern, beanClass);
}
});
}
}
use of jakarta.annotation.PostConstruct in project faces by jakartaee.
the class Issue2674Bean method setup.
@PostConstruct
private void setup() {
HtmlInputText inputText = (HtmlInputText) FacesContext.getCurrentInstance().getApplication().createComponent(HtmlInputText.COMPONENT_TYPE);
AjaxBehavior ajaxBehavior = (AjaxBehavior) FacesContext.getCurrentInstance().getApplication().createBehavior(AjaxBehavior.BEHAVIOR_ID);
inputText.setId("input");
ajaxBehavior.addAjaxBehaviorListener(this);
ajaxBehavior.setTransient(true);
ajaxBehavior.setDisabled(false);
inputText.addClientBehavior("focus", ajaxBehavior);
text = inputText;
}
use of jakarta.annotation.PostConstruct in project faces by jakartaee.
the class ButtonOnlySubmitsOneBean method init.
@PostConstruct
public void init() {
strings = new ArrayList();
strings.add("value1");
strings.add("value2");
}
Aggregations