/**
* Returns the platform events defined in the system. No platform events are
* available if the specified technical service is defined for the
* <code>DIRECT</code> or <code>USER</code> access type.
*
* @param tp
* The technical product to retrieve the events for.
*
* @return The platform events.
*/
List<Event> getPlatformEvents(TechnicalProduct tp) {
List<Event> result = new ArrayList<>();
Query query = dm.createNamedQuery("Event.getAllPlatformEvents");
query.setParameter("eventType", EventType.PLATFORM_EVENT);
result = ParameterizedTypes.list(query.getResultList(), Event.class);
if (tp.getAccessType() == ServiceAccessType.DIRECT
|| tp.getAccessType() == ServiceAccessType.USER) {
List<Event> copy = new ArrayList<>(result);
for (Event ed : copy) {
if (EventType.PLATFORM_EVENT == ed.getEventType()) {
result.remove(ed);
}
}
}
return result;
}
ServiceProvisioningServiceBean.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:oscm
作者:
评论列表
文章目录