@Component @Transactional public class EventRestService extends AbstractDaoRestServiceWithDTO<OnmsEvent,EventDTO,org.apache.cxf.jaxrs.ext.search.SearchBean,Integer,Integer>
OnmsEvent
entity.DEFAULT_LIMIT
Constructor and Description |
---|
EventRestService() |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
create(Event event)
NOTE: This method defines an unused parameter of 0 length in the @Path annotation
in order to get CXF to prioritize this method definition instead of the create method
defined in the parent class.
|
protected JaxbListWrapper<EventDTO> |
createListWrapper(Collection<EventDTO> list) |
protected OnmsEvent |
doGet(javax.ws.rs.core.UriInfo uriInfo,
Integer id) |
protected Map<String,CriteriaBehavior<?>> |
getCriteriaBehaviors()
Map CXF query bean properties to Criteria property names, conversions,
and actions.
|
protected CriteriaBuilder |
getCriteriaBuilder(javax.ws.rs.core.UriInfo uriInfo) |
protected EventDao |
getDao() |
protected Class<OnmsEvent> |
getDaoClass() |
protected Class<org.apache.cxf.jaxrs.ext.search.SearchBean> |
getQueryBeanClass() |
protected Set<SearchProperty> |
getQueryProperties()
Get a list of query properties that this endpoint supports
for FIQL expressions and
orderBy expressions. |
protected Map<String,String> |
getSearchBeanPropertyMap()
Map properties in the search expression to bean properties
in the query capture bean.
|
OnmsEvent |
mapDTOToEntity(EventDTO dto)
Map the given instance of the DTO to the corresponding entity.
|
EventDTO |
mapEntityToDTO(OnmsEvent entity)
Map the given instance of the entity to the corresponding DTO.
|
applyLimitOffsetOrderBy, create, createSpecific, delete, deleteMany, doCreate, doDelete, doUpdate, doUpdateProperties, get, get, getCount, getCriteria, getException, getProperties, getPropertyValues, sendEvent, update, updateMany, updateProperties, writeLock, writeUnlock
protected EventDao getDao()
protected Class<OnmsEvent> getDaoClass()
getDaoClass
in class AbstractDaoRestServiceWithDTO<OnmsEvent,EventDTO,org.apache.cxf.jaxrs.ext.search.SearchBean,Integer,Integer>
protected Class<org.apache.cxf.jaxrs.ext.search.SearchBean> getQueryBeanClass()
getQueryBeanClass
in class AbstractDaoRestServiceWithDTO<OnmsEvent,EventDTO,org.apache.cxf.jaxrs.ext.search.SearchBean,Integer,Integer>
protected CriteriaBuilder getCriteriaBuilder(javax.ws.rs.core.UriInfo uriInfo)
getCriteriaBuilder
in class AbstractDaoRestServiceWithDTO<OnmsEvent,EventDTO,org.apache.cxf.jaxrs.ext.search.SearchBean,Integer,Integer>
protected JaxbListWrapper<EventDTO> createListWrapper(Collection<EventDTO> list)
createListWrapper
in class AbstractDaoRestServiceWithDTO<OnmsEvent,EventDTO,org.apache.cxf.jaxrs.ext.search.SearchBean,Integer,Integer>
protected Set<SearchProperty> getQueryProperties()
AbstractDaoRestServiceWithDTO
Get a list of query properties that this endpoint supports
for FIQL expressions and orderBy
expressions.
getQueryProperties
in class AbstractDaoRestServiceWithDTO<OnmsEvent,EventDTO,org.apache.cxf.jaxrs.ext.search.SearchBean,Integer,Integer>
protected Map<String,String> getSearchBeanPropertyMap()
AbstractDaoRestServiceWithDTO
Map properties in the search expression to bean properties
in the query capture bean. This is identical to using the
search.bean.property.map
context property but allows us
to specify a different set of mappings for each service endpoint.
getSearchBeanPropertyMap
in class AbstractDaoRestServiceWithDTO<OnmsEvent,EventDTO,org.apache.cxf.jaxrs.ext.search.SearchBean,Integer,Integer>
http://cxf.apache.org/docs/jax-rs-search.html#JAX-RSSearch-Mappingofquerypropertiestobeanproperties
protected Map<String,CriteriaBehavior<?>> getCriteriaBehaviors()
AbstractDaoRestServiceWithDTO
Map CXF query bean properties to Criteria property names, conversions, and actions. In the absence of a mapping, the query bean property will be specified directly as a Criteria property with the same name.
CriteriaBehavior
to execute when this search term is specifiedgetCriteriaBehaviors
in class AbstractDaoRestServiceWithDTO<OnmsEvent,EventDTO,org.apache.cxf.jaxrs.ext.search.SearchBean,Integer,Integer>
public javax.ws.rs.core.Response create(Event event)
Event
whereas the parent class
receives a OnmsEvent
.event
- the event to forwardpublic EventDTO mapEntityToDTO(OnmsEvent entity)
AbstractDaoRestServiceWithDTO
mapEntityToDTO
in class AbstractDaoRestServiceWithDTO<OnmsEvent,EventDTO,org.apache.cxf.jaxrs.ext.search.SearchBean,Integer,Integer>
public OnmsEvent mapDTOToEntity(EventDTO dto)
AbstractDaoRestServiceWithDTO
mapDTOToEntity
in class AbstractDaoRestServiceWithDTO<OnmsEvent,EventDTO,org.apache.cxf.jaxrs.ext.search.SearchBean,Integer,Integer>
Copyright © 2021. All rights reserved.