Skip to contentPackage: JaxbContextResolver
JaxbContextResolver
Coverage
1: /*******************************************************************************
2: * Copyright (c) 2016, 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.app.api.web;
14:
15: import org.eclipse.kapua.KapuaSerializable;
16: import org.eclipse.kapua.app.api.core.exception.model.CleanJobDataExceptionInfo;
17: import org.eclipse.kapua.app.api.core.exception.model.DeviceManagementRequestContentExceptionInfo;
18: import org.eclipse.kapua.app.api.core.exception.model.DeviceManagementResponseCodeExceptionInfo;
19: import org.eclipse.kapua.app.api.core.exception.model.DeviceManagementResponseContentExceptionInfo;
20: import org.eclipse.kapua.app.api.core.exception.model.DeviceManagementSendExceptionInfo;
21: import org.eclipse.kapua.app.api.core.exception.model.DeviceManagementTimeoutExceptionInfo;
22: import org.eclipse.kapua.app.api.core.exception.model.DeviceNotConnectedExceptionInfo;
23: import org.eclipse.kapua.app.api.core.exception.model.EntityNotFoundExceptionInfo;
24: import org.eclipse.kapua.app.api.core.exception.model.EntityUniquenessExceptionInfo;
25: import org.eclipse.kapua.app.api.core.exception.model.ExceptionInfo;
26: import org.eclipse.kapua.app.api.core.exception.model.IllegalArgumentExceptionInfo;
27: import org.eclipse.kapua.app.api.core.exception.model.IllegalNullArgumentExceptionInfo;
28: import org.eclipse.kapua.app.api.core.exception.model.InternalUserOnlyExceptionInfo;
29: import org.eclipse.kapua.app.api.core.exception.model.JobAlreadyRunningExceptionInfo;
30: import org.eclipse.kapua.app.api.core.exception.model.JobEngineExceptionInfo;
31: import org.eclipse.kapua.app.api.core.exception.model.JobExecutionEnqueuedExceptionInfo;
32: import org.eclipse.kapua.app.api.core.exception.model.JobInvalidTargetExceptionInfo;
33: import org.eclipse.kapua.app.api.core.exception.model.JobMissingStepExceptionInfo;
34: import org.eclipse.kapua.app.api.core.exception.model.JobMissingTargetExceptionInfo;
35: import org.eclipse.kapua.app.api.core.exception.model.JobNotRunningExceptionInfo;
36: import org.eclipse.kapua.app.api.core.exception.model.JobResumingExceptionInfo;
37: import org.eclipse.kapua.app.api.core.exception.model.JobRunningExceptionInfo;
38: import org.eclipse.kapua.app.api.core.exception.model.JobStartingExceptionInfo;
39: import org.eclipse.kapua.app.api.core.exception.model.JobStoppingExceptionInfo;
40: import org.eclipse.kapua.app.api.core.exception.model.MfaRequiredExceptionInfo;
41: import org.eclipse.kapua.app.api.core.exception.model.SelfManagedOnlyExceptionInfo;
42: import org.eclipse.kapua.app.api.core.exception.model.ServiceConfigurationLimitExceededExceptionInfo;
43: import org.eclipse.kapua.app.api.core.exception.model.ServiceConfigurationParentLimitExceededExceptionInfo;
44: import org.eclipse.kapua.app.api.core.exception.model.SubjectUnauthorizedExceptionInfo;
45: import org.eclipse.kapua.app.api.core.exception.model.ThrowableInfo;
46: import org.eclipse.kapua.app.api.core.model.CountResult;
47: import org.eclipse.kapua.app.api.core.model.StorableEntityId;
48: import org.eclipse.kapua.app.api.core.model.data.JsonDatastoreMessage;
49: import org.eclipse.kapua.app.api.core.model.data.JsonMessageQuery;
50: import org.eclipse.kapua.app.api.core.model.device.management.JsonGenericRequestMessage;
51: import org.eclipse.kapua.app.api.core.model.device.management.JsonGenericResponseMessage;
52: import org.eclipse.kapua.app.api.core.model.job.IsJobRunningMultipleResponse;
53: import org.eclipse.kapua.app.api.core.model.job.IsJobRunningResponse;
54: import org.eclipse.kapua.app.api.core.model.job.MultipleJobIdRequest;
55: import org.eclipse.kapua.app.api.core.model.message.JsonKapuaPayload;
56: import org.eclipse.kapua.app.api.resources.v1.resources.model.device.management.keystore.DeviceKeystoreCertificateInfo;
57: import org.eclipse.kapua.commons.service.event.store.api.EventStoreRecordCreator;
58: import org.eclipse.kapua.commons.service.event.store.api.EventStoreRecordListResult;
59: import org.eclipse.kapua.commons.service.event.store.api.EventStoreRecordQuery;
60: import org.eclipse.kapua.commons.service.event.store.api.EventStoreXmlRegistry;
61: import org.eclipse.kapua.event.ServiceEvent;
62: import org.eclipse.kapua.job.engine.JobEngineXmlRegistry;
63: import org.eclipse.kapua.job.engine.JobStartOptions;
64: import org.eclipse.kapua.message.device.data.KapuaDataChannel;
65: import org.eclipse.kapua.message.device.data.KapuaDataMessage;
66: import org.eclipse.kapua.message.device.data.KapuaDataPayload;
67: import org.eclipse.kapua.message.xml.MessageXmlRegistry;
68: import org.eclipse.kapua.model.config.metatype.KapuaTad;
69: import org.eclipse.kapua.model.config.metatype.KapuaTicon;
70: import org.eclipse.kapua.model.config.metatype.KapuaTmetadata;
71: import org.eclipse.kapua.model.config.metatype.KapuaTocd;
72: import org.eclipse.kapua.model.config.metatype.KapuaToption;
73: import org.eclipse.kapua.service.account.Account;
74: import org.eclipse.kapua.service.account.AccountCreator;
75: import org.eclipse.kapua.service.account.AccountListResult;
76: import org.eclipse.kapua.service.account.AccountQuery;
77: import org.eclipse.kapua.service.account.xml.AccountParentPathXmlAdapter;
78: import org.eclipse.kapua.service.account.xml.AccountXmlRegistry;
79: import org.eclipse.kapua.service.authentication.ApiKeyCredentials;
80: import org.eclipse.kapua.service.authentication.AuthenticationCredentials;
81: import org.eclipse.kapua.service.authentication.AuthenticationXmlRegistry;
82: import org.eclipse.kapua.service.authentication.JwtCredentials;
83: import org.eclipse.kapua.service.authentication.RefreshTokenCredentials;
84: import org.eclipse.kapua.service.authentication.UsernamePasswordCredentials;
85: import org.eclipse.kapua.service.authentication.credential.Credential;
86: import org.eclipse.kapua.service.authentication.credential.CredentialCreator;
87: import org.eclipse.kapua.service.authentication.credential.CredentialListResult;
88: import org.eclipse.kapua.service.authentication.credential.CredentialQuery;
89: import org.eclipse.kapua.service.authentication.credential.CredentialType;
90: import org.eclipse.kapua.service.authentication.credential.CredentialXmlRegistry;
91: import org.eclipse.kapua.service.authentication.credential.mfa.MfaOption;
92: import org.eclipse.kapua.service.authentication.credential.mfa.MfaOptionCreator;
93: import org.eclipse.kapua.service.authentication.credential.mfa.MfaOptionListResult;
94: import org.eclipse.kapua.service.authentication.credential.mfa.MfaOptionQuery;
95: import org.eclipse.kapua.service.authentication.credential.mfa.MfaOptionXmlRegistry;
96: import org.eclipse.kapua.service.authentication.credential.mfa.ScratchCode;
97: import org.eclipse.kapua.service.authentication.credential.mfa.ScratchCodeCreator;
98: import org.eclipse.kapua.service.authentication.credential.mfa.ScratchCodeListResult;
99: import org.eclipse.kapua.service.authentication.credential.mfa.ScratchCodeQuery;
100: import org.eclipse.kapua.service.authentication.credential.mfa.ScratchCodeXmlRegistry;
101: import org.eclipse.kapua.service.authentication.token.AccessToken;
102: import org.eclipse.kapua.service.authentication.token.LoginInfo;
103: import org.eclipse.kapua.service.authentication.user.PasswordChangeRequest;
104: import org.eclipse.kapua.service.authentication.user.PasswordResetRequest;
105: import org.eclipse.kapua.service.authentication.user.UserCredentialsXmlRegistry;
106: import org.eclipse.kapua.service.authorization.access.AccessInfo;
107: import org.eclipse.kapua.service.authorization.access.AccessInfoCreator;
108: import org.eclipse.kapua.service.authorization.access.AccessInfoListResult;
109: import org.eclipse.kapua.service.authorization.access.AccessInfoQuery;
110: import org.eclipse.kapua.service.authorization.access.AccessInfoXmlRegistry;
111: import org.eclipse.kapua.service.authorization.access.AccessPermission;
112: import org.eclipse.kapua.service.authorization.access.AccessPermissionCreator;
113: import org.eclipse.kapua.service.authorization.access.AccessPermissionListResult;
114: import org.eclipse.kapua.service.authorization.access.AccessPermissionQuery;
115: import org.eclipse.kapua.service.authorization.access.AccessPermissionXmlRegistry;
116: import org.eclipse.kapua.service.authorization.access.AccessRole;
117: import org.eclipse.kapua.service.authorization.access.AccessRoleCreator;
118: import org.eclipse.kapua.service.authorization.access.AccessRoleListResult;
119: import org.eclipse.kapua.service.authorization.access.AccessRoleQuery;
120: import org.eclipse.kapua.service.authorization.access.AccessRoleXmlRegistry;
121: import org.eclipse.kapua.service.authorization.domain.Domain;
122: import org.eclipse.kapua.service.authorization.domain.DomainListResult;
123: import org.eclipse.kapua.service.authorization.domain.DomainQuery;
124: import org.eclipse.kapua.service.authorization.domain.DomainXmlRegistry;
125: import org.eclipse.kapua.service.authorization.group.Group;
126: import org.eclipse.kapua.service.authorization.group.GroupCreator;
127: import org.eclipse.kapua.service.authorization.group.GroupListResult;
128: import org.eclipse.kapua.service.authorization.group.GroupQuery;
129: import org.eclipse.kapua.service.authorization.group.GroupXmlRegistry;
130: import org.eclipse.kapua.service.authorization.permission.Permission;
131: import org.eclipse.kapua.service.authorization.role.Role;
132: import org.eclipse.kapua.service.authorization.role.RoleCreator;
133: import org.eclipse.kapua.service.authorization.role.RoleListResult;
134: import org.eclipse.kapua.service.authorization.role.RolePermission;
135: import org.eclipse.kapua.service.authorization.role.RolePermissionCreator;
136: import org.eclipse.kapua.service.authorization.role.RolePermissionListResult;
137: import org.eclipse.kapua.service.authorization.role.RolePermissionQuery;
138: import org.eclipse.kapua.service.authorization.role.RolePermissionXmlRegistry;
139: import org.eclipse.kapua.service.authorization.role.RoleQuery;
140: import org.eclipse.kapua.service.authorization.role.RoleXmlRegistry;
141: import org.eclipse.kapua.service.config.ServiceComponentConfiguration;
142: import org.eclipse.kapua.service.config.ServiceConfiguration;
143: import org.eclipse.kapua.service.config.ServiceConfigurationXmlRegistry;
144: import org.eclipse.kapua.service.datastore.model.ChannelInfo;
145: import org.eclipse.kapua.service.datastore.model.ChannelInfoListResult;
146: import org.eclipse.kapua.service.datastore.model.ClientInfo;
147: import org.eclipse.kapua.service.datastore.model.ClientInfoListResult;
148: import org.eclipse.kapua.service.datastore.model.DatastoreMessage;
149: import org.eclipse.kapua.service.datastore.model.MessageListResult;
150: import org.eclipse.kapua.service.datastore.model.MetricInfo;
151: import org.eclipse.kapua.service.datastore.model.MetricInfoListResult;
152: import org.eclipse.kapua.service.datastore.model.query.ChannelInfoQuery;
153: import org.eclipse.kapua.service.datastore.model.query.ClientInfoQuery;
154: import org.eclipse.kapua.service.datastore.model.query.MessageQuery;
155: import org.eclipse.kapua.service.datastore.model.query.MetricInfoQuery;
156: import org.eclipse.kapua.service.datastore.model.xml.ChannelInfoXmlRegistry;
157: import org.eclipse.kapua.service.datastore.model.xml.ClientInfoXmlRegistry;
158: import org.eclipse.kapua.service.datastore.model.xml.DatastoreMessageXmlRegistry;
159: import org.eclipse.kapua.service.datastore.model.xml.MetricInfoXmlRegistry;
160: import org.eclipse.kapua.service.device.call.kura.model.bundle.KuraBundles;
161: import org.eclipse.kapua.service.device.call.kura.model.configuration.KuraDeviceConfiguration;
162: import org.eclipse.kapua.service.device.call.kura.model.deploy.KuraDeploymentPackage;
163: import org.eclipse.kapua.service.device.call.kura.model.deploy.KuraDeploymentPackages;
164: import org.eclipse.kapua.service.device.call.kura.model.inventory.KuraInventoryItem;
165: import org.eclipse.kapua.service.device.call.kura.model.inventory.KuraInventoryItems;
166: import org.eclipse.kapua.service.device.call.kura.model.inventory.bundles.KuraInventoryBundle;
167: import org.eclipse.kapua.service.device.call.kura.model.inventory.bundles.KuraInventoryBundles;
168: import org.eclipse.kapua.service.device.call.kura.model.inventory.containers.KuraInventoryContainer;
169: import org.eclipse.kapua.service.device.call.kura.model.inventory.containers.KuraInventoryContainers;
170: import org.eclipse.kapua.service.device.call.kura.model.inventory.packages.KuraInventoryPackage;
171: import org.eclipse.kapua.service.device.call.kura.model.inventory.packages.KuraInventoryPackages;
172: import org.eclipse.kapua.service.device.call.kura.model.inventory.system.KuraInventorySystemPackage;
173: import org.eclipse.kapua.service.device.call.kura.model.inventory.system.KuraInventorySystemPackages;
174: import org.eclipse.kapua.service.device.call.kura.model.snapshot.KuraSnapshotIds;
175: import org.eclipse.kapua.service.device.management.asset.DeviceAssetXmlRegistry;
176: import org.eclipse.kapua.service.device.management.asset.DeviceAssets;
177: import org.eclipse.kapua.service.device.management.asset.store.settings.DeviceAssetStoreSettings;
178: import org.eclipse.kapua.service.device.management.bundle.DeviceBundle;
179: import org.eclipse.kapua.service.device.management.bundle.DeviceBundleXmlRegistry;
180: import org.eclipse.kapua.service.device.management.bundle.DeviceBundles;
181: import org.eclipse.kapua.service.device.management.command.DeviceCommandInput;
182: import org.eclipse.kapua.service.device.management.command.DeviceCommandOutput;
183: import org.eclipse.kapua.service.device.management.command.DeviceCommandXmlRegistry;
184: import org.eclipse.kapua.service.device.management.configuration.DeviceComponentConfiguration;
185: import org.eclipse.kapua.service.device.management.configuration.DeviceConfiguration;
186: import org.eclipse.kapua.service.device.management.configuration.DeviceConfigurationXmlRegistry;
187: import org.eclipse.kapua.service.device.management.configuration.store.settings.DeviceConfigurationStoreSettings;
188: import org.eclipse.kapua.service.device.management.inventory.model.bundle.DeviceInventoryBundle;
189: import org.eclipse.kapua.service.device.management.inventory.model.bundle.DeviceInventoryBundles;
190: import org.eclipse.kapua.service.device.management.inventory.model.container.DeviceInventoryContainer;
191: import org.eclipse.kapua.service.device.management.inventory.model.container.DeviceInventoryContainers;
192: import org.eclipse.kapua.service.device.management.inventory.model.inventory.DeviceInventory;
193: import org.eclipse.kapua.service.device.management.inventory.model.inventory.DeviceInventoryItem;
194: import org.eclipse.kapua.service.device.management.inventory.model.inventory.DeviceInventoryXmlRegistry;
195: import org.eclipse.kapua.service.device.management.inventory.model.packages.DeviceInventoryPackage;
196: import org.eclipse.kapua.service.device.management.inventory.model.packages.DeviceInventoryPackages;
197: import org.eclipse.kapua.service.device.management.inventory.model.system.DeviceInventorySystemPackage;
198: import org.eclipse.kapua.service.device.management.inventory.model.system.DeviceInventorySystemPackages;
199: import org.eclipse.kapua.service.device.management.keystore.model.DeviceKeystore;
200: import org.eclipse.kapua.service.device.management.keystore.model.DeviceKeystoreCSR;
201: import org.eclipse.kapua.service.device.management.keystore.model.DeviceKeystoreCSRInfo;
202: import org.eclipse.kapua.service.device.management.keystore.model.DeviceKeystoreCertificate;
203: import org.eclipse.kapua.service.device.management.keystore.model.DeviceKeystoreItem;
204: import org.eclipse.kapua.service.device.management.keystore.model.DeviceKeystoreItemQuery;
205: import org.eclipse.kapua.service.device.management.keystore.model.DeviceKeystoreItems;
206: import org.eclipse.kapua.service.device.management.keystore.model.DeviceKeystoreKeypair;
207: import org.eclipse.kapua.service.device.management.keystore.model.DeviceKeystoreXmlRegistry;
208: import org.eclipse.kapua.service.device.management.keystore.model.DeviceKeystores;
209: import org.eclipse.kapua.service.device.management.message.notification.NotifyStatus;
210: import org.eclipse.kapua.service.device.management.message.request.KapuaRequestChannel;
211: import org.eclipse.kapua.service.device.management.message.request.KapuaRequestMessage;
212: import org.eclipse.kapua.service.device.management.message.request.KapuaRequestPayload;
213: import org.eclipse.kapua.service.device.management.message.request.xml.RequestMessageXmlRegistry;
214: import org.eclipse.kapua.service.device.management.message.response.KapuaResponseChannel;
215: import org.eclipse.kapua.service.device.management.message.response.KapuaResponseMessage;
216: import org.eclipse.kapua.service.device.management.packages.model.DevicePackage;
217: import org.eclipse.kapua.service.device.management.packages.model.DevicePackageBundleInfo;
218: import org.eclipse.kapua.service.device.management.packages.model.DevicePackageBundleInfos;
219: import org.eclipse.kapua.service.device.management.packages.model.DevicePackageXmlRegistry;
220: import org.eclipse.kapua.service.device.management.packages.model.DevicePackages;
221: import org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadOperation;
222: import org.eclipse.kapua.service.device.management.packages.model.download.DevicePackageDownloadRequest;
223: import org.eclipse.kapua.service.device.management.packages.model.install.DevicePackageInstallOperation;
224: import org.eclipse.kapua.service.device.management.packages.model.install.DevicePackageInstallRequest;
225: import org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallOperation;
226: import org.eclipse.kapua.service.device.management.packages.model.uninstall.DevicePackageUninstallRequest;
227: import org.eclipse.kapua.service.device.management.registry.operation.DeviceManagementOperation;
228: import org.eclipse.kapua.service.device.management.registry.operation.DeviceManagementOperationCreator;
229: import org.eclipse.kapua.service.device.management.registry.operation.DeviceManagementOperationListResult;
230: import org.eclipse.kapua.service.device.management.registry.operation.DeviceManagementOperationQuery;
231: import org.eclipse.kapua.service.device.management.registry.operation.DeviceManagementOperationXmlRegistry;
232: import org.eclipse.kapua.service.device.management.registry.operation.notification.ManagementOperationNotification;
233: import org.eclipse.kapua.service.device.management.registry.operation.notification.ManagementOperationNotificationCreator;
234: import org.eclipse.kapua.service.device.management.registry.operation.notification.ManagementOperationNotificationListResult;
235: import org.eclipse.kapua.service.device.management.registry.operation.notification.ManagementOperationNotificationQuery;
236: import org.eclipse.kapua.service.device.management.registry.operation.notification.ManagementOperationNotificationXmlRegistry;
237: import org.eclipse.kapua.service.device.management.request.GenericRequestXmlRegistry;
238: import org.eclipse.kapua.service.device.management.request.message.request.GenericRequestChannel;
239: import org.eclipse.kapua.service.device.management.request.message.request.GenericRequestMessage;
240: import org.eclipse.kapua.service.device.management.request.message.request.GenericRequestPayload;
241: import org.eclipse.kapua.service.device.management.request.message.response.GenericResponseChannel;
242: import org.eclipse.kapua.service.device.management.request.message.response.GenericResponseMessage;
243: import org.eclipse.kapua.service.device.management.request.message.response.GenericResponsePayload;
244: import org.eclipse.kapua.service.device.management.snapshot.DeviceSnapshot;
245: import org.eclipse.kapua.service.device.management.snapshot.DeviceSnapshotXmlRegistry;
246: import org.eclipse.kapua.service.device.management.snapshot.DeviceSnapshots;
247: import org.eclipse.kapua.service.device.registry.Device;
248: import org.eclipse.kapua.service.device.registry.DeviceCreator;
249: import org.eclipse.kapua.service.device.registry.DeviceListResult;
250: import org.eclipse.kapua.service.device.registry.DeviceQuery;
251: import org.eclipse.kapua.service.device.registry.DeviceXmlRegistry;
252: import org.eclipse.kapua.service.device.registry.connection.DeviceConnection;
253: import org.eclipse.kapua.service.device.registry.connection.DeviceConnectionListResult;
254: import org.eclipse.kapua.service.device.registry.connection.DeviceConnectionQuery;
255: import org.eclipse.kapua.service.device.registry.connection.DeviceConnectionXmlRegistry;
256: import org.eclipse.kapua.service.device.registry.connection.option.DeviceConnectionOption;
257: import org.eclipse.kapua.service.device.registry.connection.option.DeviceConnectionOptionXmlRegistry;
258: import org.eclipse.kapua.service.device.registry.event.DeviceEvent;
259: import org.eclipse.kapua.service.device.registry.event.DeviceEventListResult;
260: import org.eclipse.kapua.service.device.registry.event.DeviceEventQuery;
261: import org.eclipse.kapua.service.device.registry.event.DeviceEventXmlRegistry;
262: import org.eclipse.kapua.service.endpoint.EndpointInfo;
263: import org.eclipse.kapua.service.endpoint.EndpointInfoCreator;
264: import org.eclipse.kapua.service.endpoint.EndpointInfoListResult;
265: import org.eclipse.kapua.service.endpoint.EndpointInfoQuery;
266: import org.eclipse.kapua.service.endpoint.EndpointInfoXmlRegistry;
267: import org.eclipse.kapua.service.endpoint.EndpointUsage;
268: import org.eclipse.kapua.service.job.Job;
269: import org.eclipse.kapua.service.job.JobCreator;
270: import org.eclipse.kapua.service.job.JobListResult;
271: import org.eclipse.kapua.service.job.JobQuery;
272: import org.eclipse.kapua.service.job.JobXmlRegistry;
273: import org.eclipse.kapua.service.job.execution.JobExecution;
274: import org.eclipse.kapua.service.job.execution.JobExecutionListResult;
275: import org.eclipse.kapua.service.job.execution.JobExecutionQuery;
276: import org.eclipse.kapua.service.job.execution.JobExecutionXmlRegistry;
277: import org.eclipse.kapua.service.job.step.JobStep;
278: import org.eclipse.kapua.service.job.step.JobStepCreator;
279: import org.eclipse.kapua.service.job.step.JobStepListResult;
280: import org.eclipse.kapua.service.job.step.JobStepQuery;
281: import org.eclipse.kapua.service.job.step.JobStepXmlRegistry;
282: import org.eclipse.kapua.service.job.step.definition.JobStepDefinition;
283: import org.eclipse.kapua.service.job.step.definition.JobStepDefinitionListResult;
284: import org.eclipse.kapua.service.job.step.definition.JobStepDefinitionQuery;
285: import org.eclipse.kapua.service.job.step.definition.JobStepDefinitionXmlRegistry;
286: import org.eclipse.kapua.service.job.step.definition.JobStepProperty;
287: import org.eclipse.kapua.service.job.targets.JobTarget;
288: import org.eclipse.kapua.service.job.targets.JobTargetCreator;
289: import org.eclipse.kapua.service.job.targets.JobTargetListResult;
290: import org.eclipse.kapua.service.job.targets.JobTargetQuery;
291: import org.eclipse.kapua.service.scheduler.trigger.Trigger;
292: import org.eclipse.kapua.service.scheduler.trigger.TriggerCreator;
293: import org.eclipse.kapua.service.scheduler.trigger.TriggerListResult;
294: import org.eclipse.kapua.service.scheduler.trigger.TriggerQuery;
295: import org.eclipse.kapua.service.scheduler.trigger.TriggerXmlRegistry;
296: import org.eclipse.kapua.service.scheduler.trigger.definition.TriggerDefinition;
297: import org.eclipse.kapua.service.scheduler.trigger.definition.TriggerDefinitionListResult;
298: import org.eclipse.kapua.service.scheduler.trigger.definition.TriggerDefinitionQuery;
299: import org.eclipse.kapua.service.scheduler.trigger.definition.TriggerDefinitionXmlRegistry;
300: import org.eclipse.kapua.service.scheduler.trigger.definition.TriggerProperty;
301: import org.eclipse.kapua.service.scheduler.trigger.fired.FiredTrigger;
302: import org.eclipse.kapua.service.scheduler.trigger.fired.FiredTriggerListResult;
303: import org.eclipse.kapua.service.scheduler.trigger.fired.FiredTriggerQuery;
304: import org.eclipse.kapua.service.scheduler.trigger.fired.FiredTriggerXmlRegistry;
305: import org.eclipse.kapua.service.storable.model.id.StorableId;
306: import org.eclipse.kapua.service.storable.model.query.SortField;
307: import org.eclipse.kapua.service.storable.model.query.SortFieldXmlAdapter;
308: import org.eclipse.kapua.service.storable.model.query.XmlAdaptedSortField;
309: import org.eclipse.kapua.service.storable.model.query.XmlAdaptedSortFields;
310: import org.eclipse.kapua.service.systeminfo.SystemInfo;
311: import org.eclipse.kapua.service.systeminfo.SystemInfoXmlRegistry;
312: import org.eclipse.kapua.service.tag.Tag;
313: import org.eclipse.kapua.service.tag.TagCreator;
314: import org.eclipse.kapua.service.tag.TagListResult;
315: import org.eclipse.kapua.service.tag.TagQuery;
316: import org.eclipse.kapua.service.tag.TagXmlRegistry;
317: import org.eclipse.kapua.service.user.User;
318: import org.eclipse.kapua.service.user.UserCreator;
319: import org.eclipse.kapua.service.user.UserListResult;
320: import org.eclipse.kapua.service.user.UserQuery;
321: import org.eclipse.kapua.service.user.UserXmlRegistry;
322: import org.eclipse.kapua.service.user.profile.UserProfile;
323: import org.eclipse.kapua.service.user.profile.UserProfileXmlRegistry;
324: import org.eclipse.persistence.jaxb.JAXBContextFactory;
325: import org.eclipse.persistence.jaxb.MarshallerProperties;
326:
327: import javax.ws.rs.Produces;
328: import javax.ws.rs.core.MediaType;
329: import javax.ws.rs.ext.ContextResolver;
330: import javax.ws.rs.ext.Provider;
331: import javax.xml.bind.JAXBContext;
332: import java.util.HashMap;
333: import java.util.Map;
334:
335: /**
336: * Provide a customized JAXBContext that makes the concrete implementations
337: * known and available for marshalling
338: *
339: * @since 1.0.0
340: */
341: @Provider
342: @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
343: public class JaxbContextResolver implements ContextResolver<JAXBContext> {
344:
345: private final JAXBContext jaxbContext;
346:
347: public JaxbContextResolver() {
348: try {
349: Map<String, Object> properties = new HashMap<>(1);
350: properties.put(MarshallerProperties.JSON_WRAPPER_AS_ARRAY_NAME, true);
351:
352: jaxbContext = JAXBContextFactory.createContext(new Class[]{
353:
354: // REST API utility models
355: CountResult.class,
356:
357: // REST API exception models
358: ThrowableInfo.class,
359: ExceptionInfo.class,
360:
361: InternalUserOnlyExceptionInfo.class,
362: SelfManagedOnlyExceptionInfo.class,
363: SubjectUnauthorizedExceptionInfo.class,
364: EntityUniquenessExceptionInfo.class,
365:
366: EntityNotFoundExceptionInfo.class,
367: IllegalArgumentExceptionInfo.class,
368: IllegalNullArgumentExceptionInfo.class,
369: MfaRequiredExceptionInfo.class,
370:
371: // Jobs Exception Info
372: CleanJobDataExceptionInfo.class,
373: JobAlreadyRunningExceptionInfo.class,
374: JobEngineExceptionInfo.class,
375: JobExecutionEnqueuedExceptionInfo.class,
376: JobInvalidTargetExceptionInfo.class,
377: JobMissingStepExceptionInfo.class,
378: JobMissingTargetExceptionInfo.class,
379: JobNotRunningExceptionInfo.class,
380: JobResumingExceptionInfo.class,
381: JobRunningExceptionInfo.class,
382: JobStartingExceptionInfo.class,
383: JobStoppingExceptionInfo.class,
384:
385: // Device Management Exception Info
386: DeviceManagementRequestContentExceptionInfo.class,
387: DeviceManagementResponseCodeExceptionInfo.class,
388: DeviceManagementResponseContentExceptionInfo.class,
389: DeviceManagementSendExceptionInfo.class,
390: DeviceManagementTimeoutExceptionInfo.class,
391: DeviceNotConnectedExceptionInfo.class,
392:
393: // Service Configuration Exception Info
394: ServiceConfigurationLimitExceededExceptionInfo.class,
395: ServiceConfigurationParentLimitExceededExceptionInfo.class,
396:
397: // Commons
398: KapuaSerializable.class,
399:
400: // Tocds
401: KapuaTocd.class,
402: KapuaTad.class,
403: KapuaTicon.class,
404: KapuaTmetadata.class,
405: KapuaToption.class,
406:
407: // Account
408: Account.class,
409: AccountCreator.class,
410: AccountListResult.class,
411: AccountQuery.class,
412: AccountParentPathXmlAdapter.class,
413: AccountXmlRegistry.class,
414:
415: // Data Channel Info
416: ChannelInfo.class,
417: ChannelInfoListResult.class,
418: ChannelInfoQuery.class,
419: ChannelInfoXmlRegistry.class,
420:
421: // Data Client Info
422: ClientInfo.class,
423: ClientInfoListResult.class,
424: ClientInfoQuery.class,
425: ClientInfoXmlRegistry.class,
426:
427: // Data Metric Info
428: MetricInfo.class,
429: MetricInfoListResult.class,
430: MetricInfoQuery.class,
431: MetricInfoXmlRegistry.class,
432:
433: // Data Messages
434: KapuaDataMessage.class,
435: KapuaDataChannel.class,
436: KapuaDataPayload.class,
437:
438: MessageListResult.class,
439: MessageQuery.class,
440: MessageXmlRegistry.class,
441:
442: JsonKapuaPayload.class,
443: JsonDatastoreMessage.class,
444:
445: DatastoreMessage.class,
446: DatastoreMessageXmlRegistry.class,
447: StorableEntityId.class,
448: StorableId.class,
449: SortField.class,
450: SortFieldXmlAdapter.class,
451: XmlAdaptedSortField.class,
452: XmlAdaptedSortFields.class,
453: JsonMessageQuery.class,
454:
455: // Device
456: Device.class,
457: DeviceCreator.class,
458: DeviceListResult.class,
459: DeviceQuery.class,
460: DeviceXmlRegistry.class,
461:
462: // Device Connection
463: DeviceConnection.class,
464: DeviceConnectionListResult.class,
465: DeviceConnectionQuery.class,
466: DeviceConnectionXmlRegistry.class,
467:
468: // Device Connection Options
469: DeviceConnectionOption.class,
470: DeviceConnectionOptionXmlRegistry.class,
471:
472: // Device Event
473: DeviceEvent.class,
474: DeviceEventListResult.class,
475: DeviceEventQuery.class,
476: DeviceEventXmlRegistry.class,
477:
478: // Device Management Assets
479: DeviceAssets.class,
480: DeviceAssetStoreSettings.class,
481: DeviceAssetXmlRegistry.class,
482:
483: // Device Management Bundles
484: KuraBundles.class,
485: DeviceBundle.class,
486: DeviceBundles.class,
487: DeviceBundleXmlRegistry.class,
488:
489: // Device Management Command
490: DeviceCommandInput.class,
491: DeviceCommandOutput.class,
492: DeviceCommandXmlRegistry.class,
493:
494: // Device Management Configuration
495: KuraDeviceConfiguration.class,
496: DeviceConfiguration.class,
497: DeviceComponentConfiguration.class,
498: DeviceConfigurationStoreSettings.class,
499: DeviceConfigurationXmlRegistry.class,
500:
501: // Device Management Inventory
502: DeviceInventory.class,
503: DeviceInventoryItem.class,
504: KuraInventoryItems.class,
505: KuraInventoryItem.class,
506: DeviceInventoryBundles.class,
507: DeviceInventoryBundle.class,
508: KuraInventoryBundles.class,
509: KuraInventoryBundle.class,
510: DeviceInventoryContainers.class,
511: DeviceInventoryContainer.class,
512: KuraInventoryContainers.class,
513: KuraInventoryContainer.class,
514: DeviceInventoryPackages.class,
515: DeviceInventoryPackage.class,
516: KuraInventoryPackages.class,
517: KuraInventoryPackage.class,
518: DeviceInventorySystemPackages.class,
519: DeviceInventorySystemPackage.class,
520: KuraInventorySystemPackages.class,
521: KuraInventorySystemPackage.class,
522: DeviceInventoryXmlRegistry.class,
523:
524: // Device Management Keystore
525: DeviceKeystores.class,
526: DeviceKeystore.class,
527: DeviceKeystoreCertificateInfo.class,
528: DeviceKeystoreCertificate.class,
529: DeviceKeystoreItems.class,
530: DeviceKeystoreItem.class,
531: DeviceKeystoreItemQuery.class,
532: DeviceKeystoreCertificate.class,
533: DeviceKeystoreKeypair.class,
534: DeviceKeystoreCSRInfo.class,
535: DeviceKeystoreCSR.class,
536: DeviceKeystoreXmlRegistry.class,
537:
538: // Device Management Snapshots
539: KuraSnapshotIds.class,
540: DeviceSnapshot.class,
541: DeviceSnapshots.class,
542: DeviceSnapshotXmlRegistry.class,
543:
544: // Device Management Packages
545: KuraDeploymentPackages.class,
546: KuraDeploymentPackage.class,
547: DevicePackage.class,
548: DevicePackages.class,
549: DevicePackageBundleInfo.class,
550: DevicePackageBundleInfos.class,
551: DevicePackageDownloadRequest.class,
552: DevicePackageDownloadOperation.class,
553: DevicePackageInstallRequest.class,
554: DevicePackageInstallOperation.class,
555: DevicePackageUninstallRequest.class,
556: DevicePackageUninstallOperation.class,
557: DevicePackageXmlRegistry.class,
558:
559: // Device Management Requests
560: KapuaRequestMessage.class,
561: KapuaResponseMessage.class,
562: KapuaRequestChannel.class,
563: KapuaResponseChannel.class,
564: KapuaRequestPayload.class,
565: RequestMessageXmlRegistry.class,
566:
567: // Device Management Registry
568: DeviceManagementOperation.class,
569: DeviceManagementOperationCreator.class,
570: DeviceManagementOperationListResult.class,
571: DeviceManagementOperationQuery.class,
572: DeviceManagementOperationXmlRegistry.class,
573: NotifyStatus.class,
574:
575: // Device Management Registry Notification
576: ManagementOperationNotification.class,
577: ManagementOperationNotificationCreator.class,
578: ManagementOperationNotificationListResult.class,
579: ManagementOperationNotificationQuery.class,
580: ManagementOperationNotificationXmlRegistry.class,
581:
582: // Device Management Generic Request
583: GenericRequestChannel.class,
584: GenericRequestPayload.class,
585: GenericRequestMessage.class,
586: GenericResponseChannel.class,
587: GenericResponsePayload.class,
588: GenericResponseMessage.class,
589: GenericRequestXmlRegistry.class,
590:
591: JsonGenericRequestMessage.class,
592: JsonGenericResponseMessage.class,
593:
594: // Authentication
595: AuthenticationCredentials.class,
596: AuthenticationXmlRegistry.class,
597: AccessToken.class,
598: LoginInfo.class,
599: ApiKeyCredentials.class,
600: JwtCredentials.class,
601: UsernamePasswordCredentials.class,
602: RefreshTokenCredentials.class,
603:
604: // Credential
605: Credential.class,
606: CredentialListResult.class,
607: CredentialCreator.class,
608: CredentialType.class,
609: CredentialQuery.class,
610: CredentialXmlRegistry.class,
611:
612: // Multi Factor Authentication
613: MfaOption.class,
614: MfaOptionListResult.class,
615: MfaOptionCreator.class,
616: MfaOptionQuery.class,
617: MfaOptionXmlRegistry.class,
618: ScratchCode.class,
619: ScratchCodeListResult.class,
620: ScratchCodeCreator.class,
621: ScratchCodeQuery.class,
622: ScratchCodeXmlRegistry.class,
623:
624: // Permission
625: Permission.class,
626:
627: // Endpoint Info
628: EndpointUsage.class,
629: EndpointInfo.class,
630: EndpointInfoListResult.class,
631: EndpointInfoCreator.class,
632: EndpointInfoQuery.class,
633: EndpointInfoXmlRegistry.class,
634:
635: // Roles
636: Role.class,
637: RoleListResult.class,
638: RoleCreator.class,
639: RoleQuery.class,
640: RoleXmlRegistry.class,
641:
642: // Role Permissions
643: RolePermission.class,
644: RolePermissionListResult.class,
645: RolePermissionCreator.class,
646: RolePermissionQuery.class,
647: RolePermissionXmlRegistry.class,
648:
649: // Domains
650: Domain.class,
651: DomainListResult.class,
652: DomainQuery.class,
653: DomainXmlRegistry.class,
654:
655: // Groups
656: Group.class,
657: GroupListResult.class,
658: GroupCreator.class,
659: GroupQuery.class,
660: GroupXmlRegistry.class,
661:
662: // Access Info
663: AccessInfo.class,
664: AccessInfoListResult.class,
665: AccessInfoCreator.class,
666: AccessInfoQuery.class,
667: AccessInfoXmlRegistry.class,
668:
669: // Access Permissions
670: AccessPermission.class,
671: AccessPermissionListResult.class,
672: AccessPermissionCreator.class,
673: AccessPermissionQuery.class,
674: AccessPermissionXmlRegistry.class,
675:
676: // Access Roles
677: AccessRole.class,
678: AccessRoleListResult.class,
679: AccessRoleCreator.class,
680: AccessRoleQuery.class,
681: AccessRoleXmlRegistry.class,
682:
683: // System Info
684: SystemInfo.class,
685: SystemInfoXmlRegistry.class,
686:
687: // Tag
688: Tag.class,
689: TagListResult.class,
690: TagCreator.class,
691: TagQuery.class,
692: TagXmlRegistry.class,
693:
694: // User
695: User.class,
696: UserCreator.class,
697: UserListResult.class,
698: UserQuery.class,
699: UserXmlRegistry.class,
700:
701: // User Credentials
702: PasswordChangeRequest.class,
703: PasswordResetRequest.class,
704: UserCredentialsXmlRegistry.class,
705:
706: // User Profile
707: UserProfile.class,
708: UserProfileXmlRegistry.class,
709:
710: // KapuaEvent
711: ServiceEvent.class,
712: EventStoreRecordCreator.class,
713: EventStoreRecordListResult.class,
714: EventStoreRecordQuery.class,
715: EventStoreXmlRegistry.class,
716:
717: // Service Config
718: ServiceConfigurationXmlRegistry.class,
719: ServiceConfiguration.class,
720: ServiceComponentConfiguration.class,
721:
722: // Jobs
723: Job.class,
724: JobStartOptions.class,
725: IsJobRunningResponse.class,
726: IsJobRunningMultipleResponse.class,
727: MultipleJobIdRequest.class,
728: JobCreator.class,
729: JobListResult.class,
730: JobQuery.class,
731: JobXmlRegistry.class,
732: JobEngineXmlRegistry.class,
733:
734: JobStep.class,
735: JobStepCreator.class,
736: JobStepListResult.class,
737: JobStepQuery.class,
738: JobStepXmlRegistry.class,
739: JobStepProperty.class,
740:
741: JobExecution.class,
742: JobExecutionListResult.class,
743: JobExecutionQuery.class,
744: JobExecutionXmlRegistry.class,
745:
746: JobTarget.class,
747: JobTargetCreator.class,
748: JobTargetListResult.class,
749: JobTargetQuery.class,
750: JobExecutionXmlRegistry.class,
751:
752: // Trigger
753: Trigger.class,
754: TriggerCreator.class,
755: TriggerListResult.class,
756: TriggerQuery.class,
757: TriggerProperty.class,
758: TriggerXmlRegistry.class,
759:
760: TriggerDefinition.class,
761: TriggerDefinitionListResult.class,
762: TriggerDefinitionQuery.class,
763: TriggerDefinitionXmlRegistry.class,
764:
765: FiredTrigger.class,
766: FiredTriggerListResult.class,
767: FiredTriggerQuery.class,
768: FiredTriggerXmlRegistry.class,
769:
770: JobStepDefinition.class,
771: JobStepDefinitionListResult.class,
772: JobStepDefinitionQuery.class,
773: JobStepDefinitionXmlRegistry.class
774: }, properties);
775: } catch (Exception e) {
776: throw new RuntimeException(e);
777: }
778: }
779:
780: @Override
781: public JAXBContext getContext(Class<?> type) {
782: return jaxbContext;
783: }
784:
785: }