-
Notifications
You must be signed in to change notification settings - Fork 614
/
ServiceInterface.java
1639 lines (1483 loc) · 68.9 KB
/
ServiceInterface.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package org.bimserver.shared.interfaces;
/******************************************************************************
* Copyright (C) 2009-2019 BIMserver.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see {@literal<http://www.gnu.org/licenses/>}.
*****************************************************************************/
import java.util.List;
import java.util.Set;
import javax.activation.DataHandler;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.ParameterStyle;
import javax.jws.soap.SOAPBinding.Style;
import javax.jws.soap.SOAPBinding.Use;
import javax.xml.bind.annotation.XmlMimeType;
import org.bimserver.interfaces.objects.SBounds;
import org.bimserver.interfaces.objects.SCheckout;
import org.bimserver.interfaces.objects.SCompareResult;
import org.bimserver.interfaces.objects.SCompareType;
import org.bimserver.interfaces.objects.SDensity;
import org.bimserver.interfaces.objects.SDeserializerPluginConfiguration;
import org.bimserver.interfaces.objects.SDownloadResult;
import org.bimserver.interfaces.objects.SExtendedData;
import org.bimserver.interfaces.objects.SExtendedDataSchema;
import org.bimserver.interfaces.objects.SFile;
import org.bimserver.interfaces.objects.SGeoTag;
import org.bimserver.interfaces.objects.SGeometryInfo;
import org.bimserver.interfaces.objects.SIfcHeader;
import org.bimserver.interfaces.objects.SLogAction;
import org.bimserver.interfaces.objects.SLongCheckinActionState;
import org.bimserver.interfaces.objects.SModelCheckerInstance;
import org.bimserver.interfaces.objects.SNewService;
import org.bimserver.interfaces.objects.SProfileDescriptor;
import org.bimserver.interfaces.objects.SProject;
import org.bimserver.interfaces.objects.SProjectSmall;
import org.bimserver.interfaces.objects.SQueryEnginePluginConfiguration;
import org.bimserver.interfaces.objects.SRevision;
import org.bimserver.interfaces.objects.SRevisionSummary;
import org.bimserver.interfaces.objects.SSerializerPluginConfiguration;
import org.bimserver.interfaces.objects.SService;
import org.bimserver.interfaces.objects.SServiceDescriptor;
import org.bimserver.interfaces.objects.STile;
import org.bimserver.interfaces.objects.SUser;
import org.bimserver.interfaces.objects.SUserSettings;
import org.bimserver.interfaces.objects.SUserType;
import org.bimserver.interfaces.objects.SVector3f;
import org.bimserver.shared.exceptions.ServerException;
import org.bimserver.shared.exceptions.ServiceException;
import org.bimserver.shared.exceptions.UserException;
@WebService(name = "ServiceInterface", targetNamespace="org.bimserver")
@SOAPBinding(style = Style.DOCUMENT, use = Use.LITERAL, parameterStyle = ParameterStyle.WRAPPED)
public interface ServiceInterface extends PublicInterface {
@WebMethod(action = "initiateCheckin")
Long initiateCheckin(
@WebParam(name = "poid", partName = "initiateCheckin.poid") Long poid,
@WebParam(name = "deserializerOid", partName = "initiateCheckin.deserializerOid") Long deserializerOid) throws ServerException, UserException;
/**
* Terminate a long running action
*
* @param topicId The actionId returned by one of the download or checkout methods
* @throws ServerException, UserException
*/
@WebMethod(action = "terminateLongRunningAction")
void terminateLongRunningAction(
@WebParam(name = "topicId", partName = "getDownloadData.topicId") Long topicId) throws ServerException, UserException;
/**
* Checkout an existing model, checkout is the same as download, except a "checkout" will tell the server and other users you are working on it
*
* @param roid Revision ObjectID
* @param serializerOid ObjectId of the serializer to use, use getAllSerializers to find availble serializeres
* @param sync Whether to return immediately (async) or wait for completion (sync)
* @return A topicId, which you can use for the NotificationRegistryInterface.getProgress method
* @throws ServerException, UserException
*/
@WebMethod(action = "checkout")
Long checkout(
@WebParam(name = "roid", partName = "checkout.roid") Long roid,
@WebParam(name = "serializerOid", partName = "checkout.serializerOid") Long serializerOid,
@WebParam(name = "sync", partName = "checkout.sync") Boolean sync) throws ServerException, UserException;
/**
* Download a model in serialized format by giving a set of revisions and a set of class names to filter on
* @param roids A set of Revision ObjectIDs
* @param query The query to use (JSON). If you are using the BIMserver API over JSON, make sure this is a JSON encoded String (for example in JS run JSON.stringify specifically for this field)
* @param serializerOid ObjectId of the serializer to use, use getAllSerializers to find availble serializers
* @param sync Whether to return immediately (async) or wait for completion (sync)
* @return A topicId, which you can use for the NotificationRegistryInterface.getProgress method, ServiceInterface.getDownloadData and the download servlet (/download)
* @throws ServerException, UserException
*/
@WebMethod(action = "download")
Long download(
@WebParam(name = "roids", partName = "download.roids") Set<Long> roids,
@WebParam(name = "query", partName = "download.query") String query,
@WebParam(name = "serializerOid", partName = "download.serializerOid") Long serializerOid,
@WebParam(name = "sync", partName = "download.sync") Boolean sync) throws ServerException, UserException;
/**
* Get the data for a download/checkout
*
* @param topicId The topicId returned by one of the download or checkout methods
* @return An SDownloadResult containing the serialized data
* @throws ServerException, UserException
*/
@WebMethod(action = "getDownloadData")
SDownloadResult getDownloadData(
@WebParam(name = "topicId", partName = "getDownloadData.topicId") Long topicId) throws ServerException, UserException;
/**
* @param serializerName Name of the Serializer
* @return Serializer
* @throws ServerException, UserException
*/
@WebMethod(action = "getSerializerByName")
SSerializerPluginConfiguration getSerializerByName(
@WebParam(name = "serializerName", partName = "getSerializerByName.serializerName") String serializerName) throws ServerException, UserException;
/**
* @param oid ObjectID of the Deserializer
* @return Deserializer
* @throws ServerException, UserException
*/
@WebMethod(action = "getDeserializerById")
SDeserializerPluginConfiguration getDeserializerById(
@WebParam(name = "oid", partName = "getDeserializerById.oid") Long oid) throws ServerException, UserException;
/**
* @param deserializerName Name of the Deserializer
* @return Deserializer
* @throws ServerException, UserException
*/
@WebMethod(action = "getDeserializerByName")
SDeserializerPluginConfiguration getDeserializerByName(
@WebParam(name = "deserializerName", partName = "getDeserializerByName.deserializerName") String deserializerName) throws ServerException, UserException;
/**
* @param oid ObjectID of the Serializer
* @return Serializer
* @throws ServerException, UserException
*/
@WebMethod(action = "getSerializerById")
SSerializerPluginConfiguration getSerializerById(
@WebParam(name = "oid", partName = "getSerializerById.oid") Long oid) throws ServerException, UserException;
/**
* @param contentType The ContentType
* @return Serializer supporting the given ContentType
* @throws ServerException, UserException
*/
@WebMethod(action = "getSerializerByContentType")
SSerializerPluginConfiguration getSerializerByContentType(
@WebParam(name = "contentType", partName = "getSerializerByContentType.contentType") String contentType) throws ServerException, UserException;
/**
* @param name Name of the QueryEngine
* @return QueryEngine
* @throws ServerException, UserException
*/
@WebMethod(action = "getQueryEngineByName")
SQueryEnginePluginConfiguration getQueryEngineByName(
@WebParam(name = "name", partName = "getQueryEngineByName.name") String name) throws ServerException, UserException;
/**
* @param oid ObjectID of the QueryEngine
* @return QueryEngine
* @throws ServerException, UserException
*/
@WebMethod(action = "getQueryEngineById")
SQueryEnginePluginConfiguration getQueryEngineById(
@WebParam(name = "oid", partName = "getQueryEngineById.oid") Long oid) throws ServerException, UserException;
/**
* Get a suggested deserializer for the given file extension and project
*
* @param extension File extension without the dot(.), for example "ifc"
* @param poid ProjectID of the project, this is relevant because a project has a specific schema, so we are looking for a deserializer that can handle this schema
* @return The name of the suggested deserializer
* @throws ServerException
*/
@WebMethod(action = "getSuggestedDeserializerForExtension")
SDeserializerPluginConfiguration getSuggestedDeserializerForExtension(
@WebParam(name = "extension", partName = "getSuggestedDeserializerForExtension.extension") String extension,
@WebParam(name = "poid", partName = "getSuggestedDeserializerForExtension.poid") Long poid) throws ServerException, UserException;
/**
* @param roid ObjectID of the Revision
* @param extendedData ExtendedData to add
* @throws ServerException, UserException
*/
@WebMethod(action = "addExtendedDataToRevision")
void addExtendedDataToRevision(
@WebParam(name = "roid", partName = "addExtendedDataToRevision.roid") Long roid,
@WebParam(name = "extendedData", partName = "addExtendedDataToRevision.extendedData") SExtendedData extendedData) throws ServerException, UserException;
/**
* @param oid ObjectID of the ExtendedData
* @return ExtendedData
* @throws ServerException, UserException
*/
@WebMethod(action = "getExtendedData")
SExtendedData getExtendedData(
@WebParam(name = "oid", partName = "getExtendedData.oid") Long oid) throws ServerException, UserException;
/**
* @param roid ObjectID of the Revision
* @return ExtendedData
* @throws ServerException, UserException
*/
@WebMethod(action = "getAllExtendedDataOfRevision")
List<SExtendedData> getAllExtendedDataOfRevision(
@WebParam(name = "roid", partName = "getAllExtendedDataOfRevision.roid") Long roid) throws ServerException, UserException;
/**
* @param roid ObjectID of the Revision
* @return ExtendedData
* @throws ServerException, UserException
*/
@WebMethod(action = "getAllExtendedDataOfRevisionAndSchema")
List<SExtendedData> getAllExtendedDataOfRevisionAndSchema(
@WebParam(name = "roid", partName = "getAllExtendedDataOfRevision.roid") Long roid,
@WebParam(name = "schemaId", partName = "getAllExtendedDataOfRevision.schemaId") Long schemaId) throws ServerException, UserException;
/**
* @param roid ObjectID of the Revision
* @return ExtendedData
* @throws ServerException, UserException
*/
@WebMethod(action = "getLastExtendedDataOfRevisionAndSchema")
SExtendedData getLastExtendedDataOfRevisionAndSchema(
@WebParam(name = "roid", partName = "getAllExtendedDataOfRevision.roid") Long roid,
@WebParam(name = "schemaId", partName = "getAllExtendedDataOfRevision.schemaId") Long schemaId) throws ServerException, UserException;
/**
* @param poid ObjectID of the Project
* @return The Project
* @throws ServerException, UserException
*/
@WebMethod(action = "getProjectByPoid")
SProject getProjectByPoid(
@WebParam(name = "poid", partName = "getProjectByPoid.poid") Long poid) throws ServerException, UserException;
/**
* @param uuid UUID of the Project
* @return The Project
* @throws ServerException, UserException
*/
@WebMethod(action = "getProjectByUuid")
SProject getProjectByUuid(
@WebParam(name = "uuid", partName = "getProjectByUuid.uuid") String uuid) throws ServerException, UserException;
/**
* @param poid ObjectID of the Project
* @return The Project
* @throws ServerException, UserException
*/
@WebMethod(action = "getProjectSmallByPoid")
SProjectSmall getProjectSmallByPoid(
@WebParam(name = "poid", partName = "getProjectSmallByPoid.poid") Long poid) throws ServerException, UserException;
/**
* @param roid ObjectID of the Revision
* @return The Revision
* @throws ServerException, UserException
*/
@WebMethod(action = "getRevision")
SRevision getRevision(
@WebParam(name = "roid", partName = "getRevision.roid") Long roid) throws ServerException, UserException;
/**
* Undelete a previously deleted Project, Projets can be deleted with the deleteProject method
* @param poid The ObjectID of the Project to undelete
* @return Whether the Project was successfully undeleted
* @throws ServerException, UserException
*/
@WebMethod(action = "undeleteProject")
Boolean undeleteProject(
@WebParam(name = "poid", partName = "undeleteProject.poid") Long poid) throws ServerException, UserException;
/**
* Branch a given Revision as a new Revision on a new Project, branching is always synchronous
* @param roid ObjectID of the Revision to branch
* @param projectName Name of the to be created Project
* @param comment A comment describing the new Revision
* @return The result of this branch, you can use getCheckinState with this ID
* @throws ServerException, UserException
*/
@WebMethod(action = "clone")
Long clone(
@WebParam(name = "roid", partName = "branchToNewProject.roid") Long roid,
@WebParam(name = "projectName", partName = "branchToNewProject.projectName") String projectName,
@WebParam(name = "comment", partName = "branchToNewProject.comment") String comment,
@WebParam(name = "sync", partName = "branchToNewProject.sync") Boolean sync) throws ServerException, UserException;
/**
* Branch a given Revision as a new Revision on a new Project, branching is always synchronous
* @param roid ObjectID of the Revision to branch
* @param projectName Name of the to be created Project
* @param comment A comment describing the new Revision
* @return The result of this branch, you can use getCheckinState with this ID
* @throws ServerException, UserException
*/
@WebMethod(action = "branchToNewProject")
Long branchToNewProject(
@WebParam(name = "roid", partName = "branchToNewProject.roid") Long roid,
@WebParam(name = "projectName", partName = "branchToNewProject.projectName") String projectName,
@WebParam(name = "comment", partName = "branchToNewProject.comment") String comment,
@WebParam(name = "sync", partName = "branchToNewProject.sync") Boolean sync) throws ServerException, UserException;
/**
* Branch a given Revision as a new Revision in the given Project, branching is always synchronous
* @param roid ObjectID of the Revision to branch
* @param destPoid ObjectID of the Project to which a branch should be made
* @param comment A comment describing the new Revision
* @return The result of this branch, you can use getCheckinState with this ID
* @throws ServerException, UserException
*/
@WebMethod(action = "branchToExistingProject")
Long branchToExistingProject(
@WebParam(name = "roid", partName = "branchToExistingProject.roid") Long roid,
@WebParam(name = "destPoid", partName = "branchToExistingProject.destPoid") Long destPoid,
@WebParam(name = "comment", partName = "branchToExistingProject.comment") String comment,
@WebParam(name = "sync", partName = "branchToNewProject.sync") Boolean sync) throws ServerException, UserException;
/**
* @param name
* @return A list of projects with the given name (can be multiple because subprojects are also returned)
* @throws ServerException, UserException
*/
@WebMethod(action = "getProjectsByName")
List<SProject> getProjectsByName(
@WebParam(name = "name", partName = "getProjectsByName.name") String name) throws ServerException, UserException;
/**
* @param name
* @return Get the (top level) project with the given name, there can be only one, because top-level projects always are unique
* @throws ServerException, UserException
*/
@WebMethod(action = "getTopLevelProjectByName")
SProject getTopLevelProjectByName(
@WebParam(name = "name", partName = "getTopLevelProjectByName.name") String name) throws ServerException, UserException;
/**
* @param poid
* @return A list of all subprojects of the given project
* @throws ServerException, UserException
*/
@WebMethod(action = "getSubProjects")
List<SProject> getSubProjects(
@WebParam(name = "poid", partName = "getSubProjects.poid") Long poid) throws ServerException, UserException;
/**
* @param oid ObjectID of the ExtendedDataSchema
* @return ExtendedDataSchema
* @throws ServerException, UserException
*/
@WebMethod(action = "getExtendedDataSchemaById")
SExtendedDataSchema getExtendedDataSchemaById(
@WebParam(name = "oid", partName = "getExtendedDataSchemaById.oid") Long oid) throws ServerException, UserException;
/**
* Get a list of all Revisions of a Project
*
* @param poid ObjectID of the Project
* @return A list of all Revisions
* @throws ServerException, UserException
*/
@WebMethod(action = "getAllRevisionsOfProject")
List<SRevision> getAllRevisionsOfProject(
@WebParam(name = "poid", partName = "getAllRevisionsOfProject.poid") Long poid) throws ServerException, UserException;
/**
* Get a list of all Projects the user is authorized for
*
* @return A list of Projects
* @throws ServerException, UserException
*/
@WebMethod(action = "getAllProjects")
List<SProject> getAllProjects(
@WebParam(name = "onlyTopLevel", partName = "getAllProjects.onlyTopLevel") Boolean onlyTopLevel,
@WebParam(name = "onlyActive", partName = "getAllProjects.onlyActive") Boolean onlyActive) throws ServerException, UserException;
/**
* Add a new project
* @param projectName Name of the project, must be a unique name within all root-projects
* @param schema Schema of the project, you can only checkin models of this schema (available options are: "ifc2x3tc1" and "ifc4")
* @return The created Project
* @throws ServerException, UserException
*/
@WebMethod(action = "addProject")
SProject addProject(
@WebParam(name = "projectName", partName = "addProject.projectName") String projectName,
@WebParam(name = "schema", partName = "addProject.schema") String schema) throws ServerException, UserException;
/**
* Add a new project as a subproject of another project
* @param projectName Name of the project, must be a unique name within the parent project
* @param parentPoid The ObjectID of the parent project
* @return The created Project
* @throws ServerException, UserException
*/
@WebMethod(action = "addProjectAsSubProject")
SProject addProjectAsSubProject(
@WebParam(name = "projectName", partName = "addProjectAsSubProject.projectName") String projectName,
@WebParam(name = "parentPoid", partName = "addProjectAsSubProject.parentPoid") Long parentPoid,
@WebParam(name = "schema", partName = "addProjectAsSubProject.schema") String schema) throws ServerException, UserException;
/**
* Delete a Project, Projects can be undeleted with the undeleteProject method
* @param poid ObjectID of the Project to delete
* @return Whether the Project has been deleted
* @throws ServerException, UserException
*/
@WebMethod(action = "deleteProject")
Boolean deleteProject(
@WebParam(name = "poid", partName = "deleteProject.poid") Long poid) throws ServerException, UserException;
@WebMethod(action = "getExtendedDataSchemaByName")
SExtendedDataSchema getExtendedDataSchemaByName(
@WebParam(name = "name", partName = "getExtendedDataSchemaByName.name") String name) throws UserException, ServerException;
@WebMethod(action = "getAllProjectsSmall")
List<SProjectSmall> getAllProjectsSmall() throws ServerException, UserException;
/**
* Checkin a new model by sending a serialized form, the call will wait for completion before returning
*
* @param poid The Project's ObjectID
* @param comment A comment
* @param deserializerOid ObjectId of the deserializer to use, use getAllDeserializers to get a list of available deserializers
* @param fileSize The size of the file in bytes
* @param fileName Name of the file
* @param data The actual data
* @param merge Whether to use checkin merging (this will alter your model!) DEPRICATED
* @return An id, which you can use for the getCheckinState method
* @throws ServerException, UserException
*/
@WebMethod(action = "checkinSync")
SLongCheckinActionState checkinSync(
@WebParam(name = "poid", partName = "checkin.poid") Long poid,
@WebParam(name = "comment", partName = "checkin.comment") String comment,
@WebParam(name = "deserializerOid", partName = "checkin.deserializerOid") Long deserializerOid,
@WebParam(name = "fileSize", partName = "checkin.fileSize") Long fileSize,
@WebParam(name = "fileName", partName = "checkin.fileName") String fileName,
@WebParam(name = "data", partName = "checkin.data") @XmlMimeType("application/octet-stream") DataHandler data,
@WebParam(name = "merge", partName = "checkin.merge") Boolean merge) throws ServerException, UserException;
/**
* Checkin a new model by sending a serialized form, the call will return immediately and not wait for completion
*
* @param poid The Project's ObjectID
* @param comment A comment
* @param deserializerOid ObjectId of the deserializer to use, use getAllDeserializers to get a list of available deserializers
* @param fileSize The size of the file in bytes
* @param fileName Name of the file
* @param data The actual data
* @param merge Whether to use checkin merging (this will alter your model!) DEPRICATED
* @return An id, which you can use for the getCheckinState method
* @throws ServerException, UserException
*/
@WebMethod(action = "checkinAsync")
Long checkinAsync(
@WebParam(name = "poid", partName = "checkin.poid") Long poid,
@WebParam(name = "comment", partName = "checkin.comment") String comment,
@WebParam(name = "deserializerOid", partName = "checkin.deserializerOid") Long deserializerOid,
@WebParam(name = "fileSize", partName = "checkin.fileSize") Long fileSize,
@WebParam(name = "fileName", partName = "checkin.fileName") String fileName,
@WebParam(name = "data", partName = "checkin.data") @XmlMimeType("application/octet-stream") DataHandler data,
@WebParam(name = "merge", partName = "checkin.merge") Boolean merge) throws ServerException, UserException;
@WebMethod(action = "checkinInitiatedSync")
SLongCheckinActionState checkinInitiatedSync(
@WebParam(name = "topicId", partName = "checkinInitiated.topicId") Long topicId,
@WebParam(name = "poid", partName = "checkinInitiated.poid") Long poid,
@WebParam(name = "comment", partName = "checkinInitiated.comment") String comment,
@WebParam(name = "deserializerOid", partName = "checkinInitiated.deserializerOid") Long deserializerOid,
@WebParam(name = "fileSize", partName = "checkinInitiated.fileSize") Long fileSize,
@WebParam(name = "fileName", partName = "checkinInitiated.fileName") String fileName,
@WebParam(name = "data", partName = "checkinInitiated.data") @XmlMimeType("application/octet-stream") DataHandler data,
@WebParam(name = "merge", partName = "checkinInitiated.merge") Boolean merge) throws ServerException, UserException;
@WebMethod(action = "checkinInitiatedAsync")
Long checkinInitiatedAsync(
@WebParam(name = "topicId", partName = "checkinInitiated.topicId") Long topicId,
@WebParam(name = "poid", partName = "checkinInitiated.poid") Long poid,
@WebParam(name = "comment", partName = "checkinInitiated.comment") String comment,
@WebParam(name = "deserializerOid", partName = "checkinInitiated.deserializerOid") Long deserializerOid,
@WebParam(name = "fileSize", partName = "checkinInitiated.fileSize") Long fileSize,
@WebParam(name = "fileName", partName = "checkinInitiated.fileName") String fileName,
@WebParam(name = "data", partName = "checkinInitiated.data") @XmlMimeType("application/octet-stream") DataHandler data,
@WebParam(name = "merge", partName = "checkinInitiated.merge") Boolean merge) throws ServerException, UserException;
/**
* Checkin a new model from a URL, the call will wait for completion before returning
*
* @param poid The Project's ObjectID
* @param comment A comment
* @param deserializerOid ObjectId of the deserializer to use, use getAllDeserializers to get a list of available deserializers
* @param fileName Name of the file
* @param url A URL to the 'file'
* @param merge Whether to use checkin merging (this will alter your model!)
* @return An id, which you can use for the getCheckinState method
* @throws ServerException, UserException
*/
@WebMethod(action = "checkinFromUrlSync")
SLongCheckinActionState checkinFromUrlSync(
@WebParam(name = "poid", partName = "checkinFromUrl.poid") Long poid,
@WebParam(name = "comment", partName = "checkinFromUrl.comment") String comment,
@WebParam(name = "deserializerOid", partName = "checkinFromUrl.deserializerOid") Long deserializerOid,
@WebParam(name = "fileName", partName = "checkinFromUrl.fileName") String fileName,
@WebParam(name = "url", partName = "checkinFromUrl.url") String url,
@WebParam(name = "merge", partName = "checkinFromUrl.merge") Boolean merge) throws ServerException, UserException;
/**
* Checkin a new model from a URL, the call will return immediately and not wait for completion
*
* @param poid The Project's ObjectID
* @param comment A comment
* @param deserializerOid ObjectId of the deserializer to use, use getAllDeserializers to get a list of available deserializers
* @param fileName Name of the file
* @param url A URL to the 'file'
* @param merge Whether to use checkin merging (this will alter your model!)
* @return An id, which you can use for the getCheckinState method
* @throws ServerException, UserException
*/
@WebMethod(action = "checkinFromUrlAsync")
Long checkinFromUrlAsync(
@WebParam(name = "poid", partName = "checkinFromUrl.poid") Long poid,
@WebParam(name = "comment", partName = "checkinFromUrl.comment") String comment,
@WebParam(name = "deserializerOid", partName = "checkinFromUrl.deserializerOid") Long deserializerOid,
@WebParam(name = "fileName", partName = "checkinFromUrl.fileName") String fileName,
@WebParam(name = "url", partName = "checkinFromUrl.url") String url,
@WebParam(name = "merge", partName = "checkinFromUrl.merge") Boolean merge) throws ServerException, UserException;
/**
* Download a compare of a model
*
* @param serializerOid The ObjectID of the Serializer configuration to use
* @param roid1 The ObjectID of the first Revision
* @param roid2 The ObjectID of the second Revision
* @param mcid The ObjectID of the Model Compare plugin configuration
* @param type How to compare (All, Only Added, Only Modified or Only Deleted)
* @param sync Whether to call this method synchronously
* @return A topicId, which you can use for the NotificationRegistryInterface.getProgress method, ServiceInterface.getDownloadData and the download servlet (/download)
* @throws ServerException, UserException
*/
@WebMethod(action = "downloadCompareResults")
Long downloadCompareResults(
@WebParam(name = "serializerOid", partName = "download.serializerOid") Long serializerOid,
@WebParam(name = "roid1", partName = "downloadByOids.roid1") Long roid1,
@WebParam(name = "roid2", partName = "downloadByOids.roid2") Long roid2,
@WebParam(name = "mcid", partName = "downloadByOids.mcid") Long mcid,
@WebParam(name = "type", partName = "downloadByOids.type") SCompareType type,
@WebParam(name = "sync", partName = "downloadByOids.sync") Boolean sync) throws ServerException, UserException;
/**
* Add a new user
*
* @param username The username (must be a valid e-mail address)
* @param name The name (e.g. "Bill Gates")
* @param type Type of user
* @param selfRegistration Whether this is a self-registration (for example e-mails will be different)
* @param resetUrl Reset URL (webbased clients can provide a url that handles the activation of the account)
* @return The ObjectID of the created User object
* @throws ServerException, UserException
*/
@WebMethod(action = "addUser")
SUser addUser(
@WebParam(name = "username", partName = "addUser.username") String username,
@WebParam(name = "name", partName = "addUser.name") String name,
@WebParam(name = "type", partName = "addUser.type") SUserType type,
@WebParam(name = "selfRegistration", partName = "addUser.selfRegistration") Boolean selfRegistration,
@WebParam(name = "resetUrl", partName = "addUser.resetUrl") String resetUrl) throws ServerException, UserException;
/**
* Add a new user with a given password
*
* @param username The username (must be a valid e-mail address)
* @param name The name (e.g. "Bill Gates")
* @param type Type of user
* @param selfRegistration Whether this is a self-registration (for example e-mails will be different)
* @return The ObjectID of the created User object
* @throws ServerException, UserException
*/
@WebMethod(action = "addUserWithPassword")
SUser addUserWithPassword(
@WebParam(name = "username", partName = "addUser.username") String username,
@WebParam(name = "password", partName = "addUser.password") String password,
@WebParam(name = "name", partName = "addUser.name") String name,
@WebParam(name = "type", partName = "addUser.type") SUserType type,
@WebParam(name = "selfRegistration", partName = "addUser.selfRegistration") Boolean selfRegistration,
@WebParam(name = "resetUrl", partName = "addUser.resetUrl") String resetUrl) throws ServerException, UserException;
/**
* Change the type of a user
*
* @param uoid The User's ObjectID
* @param userType The new type
* @throws ServerException, UserException
*/
@WebMethod(action = "changeUserType")
void changeUserType(
@WebParam(name = "uoid", partName = "changeUserType.uoid") Long uoid,
@WebParam(name = "userType", partName = "changeUserType.userType") SUserType userType) throws ServerException, UserException;
/**
* Update project properties, the only three properties that can be updated with this call are "name", "description" and "exportLengthMeasurePrefix"
*
* @param sProject A Project object containing the new properties
* @throws ServerException, UserException
*/
@WebMethod(action = "updateProject")
void updateProject(
@WebParam(name = "sProject", partName = "updateProject.sProject") SProject sProject) throws ServerException, UserException;
/**
* Update a revision, not much can be changed afterwards, actually only the tag
*
* @param sRevision The Revision object containing the new properties
* @throws ServerException, UserException
*/
@WebMethod(action = "updateRevision")
void updateRevision(
@WebParam(name = "sRevision", partName = "updateRevision.sRevision") SRevision sRevision) throws ServerException, UserException;
/**
* Add a user to a project (authorization wise)
*
* @param uoid The ObejctID of the User
* @param poid The ObjectID of the Project
* @return Whether the User has been added to the Project
* @throws ServerException, UserException
*/
@WebMethod(action = "addUserToProject")
Boolean addUserToProject(
@WebParam(name = "uoid", partName = "addUserToProject.uoid") Long uoid,
@WebParam(name = "poid", partName = "addUserToProject.poid") Long poid) throws ServerException, UserException;
/**
* Remove a user from a project (authorization wise)
*
* @param uoid ObjectID of the User
* @param poid ObjectID of the Project
* @return Whether the User has been removed from the Project
* @throws ServerException, UserException
*/
@WebMethod(action = "removeUserFromProject")
Boolean removeUserFromProject(
@WebParam(name = "uoid", partName = "removeProjectFromUser.uoid") Long uoid,
@WebParam(name = "poid", partName = "removeUserFromProject.poid") Long poid) throws ServerException, UserException;
/**
* Delete a User, Users van be undeleted with the undeleteUser method
*
* @param uoid ObjectID of the User
* @return Whether the User has been deleted
* @throws ServerException, UserException
*/
@WebMethod(action = "deleteUser")
Boolean deleteUser(
@WebParam(name = "uoid", partName = "deleteUser.uoid") Long uoid) throws ServerException, UserException;
/**
* Get a list of all Projects the user is authorized for to read from
*
* @return A list of all projects that are readable for the current user
* @throws ServerException, UserException
*/
@WebMethod(action = "getAllReadableProjects")
List<SProject> getAllReadableProjects() throws ServerException, UserException;
/**
* Get a list of all Projects the user is authorized for to write to
*
* @return A list of all projects that are writeable for the current user
* @throws ServerException, UserException
*/
@WebMethod(action = "getAllWritableProjects")
List<SProject> getAllWritableProjects() throws ServerException, UserException;
/**
* Get a list of all users
*
* @return All users
* @throws ServerException
* @throws UserException
*/
@WebMethod(action = "getAllUsers")
List<SUser> getAllUsers() throws ServerException, UserException;
/**
* Get a list of all the services attached to the given project
*
* @param poid Project-ID of the Project
* @return
* @throws ServerException
* @throws UserException
*/
@WebMethod(action = "getAllServicesOfProject")
List<SService> getAllServicesOfProject(
@WebParam(name = "poid", partName = "getAllServicesOfProject.poid") Long poid) throws ServerException, UserException;
/**
* Get a list of all the services attached to the given project
*
* @param poid Project-ID of the Project
* @return
* @throws ServerException
* @throws UserException
*/
@WebMethod(action = "getAllNewServicesOfProject")
List<SNewService> getAllNewServicesOfProject(
@WebParam(name = "poid", partName = "getAllNewServicesOfProject.poid") Long poid) throws ServerException, UserException;
/**
* Get a list of all the model checkers attached to the given Project
*
* @param poid Project-ID of the Project
* @return
* @throws ServerException
* @throws UserException
*/
@WebMethod(action = "getAllModelCheckersOfProject")
List<SModelCheckerInstance> getAllModelCheckersOfProject(
@WebParam(name = "poid", partName = "getAllModelCheckersOfProject.poid") Long poid) throws ServerException, UserException;
/**
* Get all checkouts of the given project
*
* @param poid The ObjectID of the Project
* @return A list of Checkouts belonging to this Project
* @throws ServerException, UserException
*/
@WebMethod(action = "getAllCheckoutsOfProject")
List<SCheckout> getAllCheckoutsOfProject(
@WebParam(name = "poid", partName = "getAllCheckoutsOfProject.poid") Long poid) throws ServerException, UserException;
/**
* Get a list of revisions a user has committed
*
* @param uoid ObjectID of the Project
* @return A list of Revisions belonging to this Project
* @throws ServerException, UserException
*/
@WebMethod(action = "getAllRevisionsByUser")
List<SRevision> getAllRevisionsByUser(
@WebParam(name = "uoid", partName = "getAllRevisionsOfUser.uoid") Long uoid) throws ServerException, UserException;
/**
* Get a list of checkouts by the given user
*
* @param uoid ObjectID of the User
* @return A list of Checkouts belonging to the given User
* @throws ServerException, UserException
*/
@WebMethod(action = "getAllCheckoutsByUser")
List<SCheckout> getAllCheckoutsByUser(
@WebParam(name = "uoid", partName = "getAllCheckoutsByUser.uoid") Long uoid) throws ServerException, UserException;
/**
* Get a list of checkouts on the given revision
*
* @param roid ObjectID of the Revision
* @return A list of Checkouts belonging to the given Revision
* @throws ServerException, UserException
*/
@WebMethod(action = "getAllCheckoutsOfRevision")
List<SCheckout> getAllCheckoutsOfRevision(
@WebParam(name = "roid", partName = "getAllCheckoutsOfRevision.roid") Long roid) throws ServerException, UserException;
/**
* Returns a list of all available classes
*
* @return A list of available classes in the BIMserver, only classes from the IFC model will be returned
* @throws ServerException, UserException
*/
@WebMethod(action = "getAvailableClasses")
List<String> getAvailableClasses() throws ServerException, UserException;
/**
* Returns a list of all the classes that are used in the given revision
*
* @param roid ObjectID of the Revision
* @return A list of classes of which a least one instance is available in the given Revision
* @throws ServerException, UserException
*/
@WebMethod(action = "getAvailableClassesInRevision")
List<String> getAvailableClassesInRevision(
@WebParam(name = "roid", partName = "getAvailableClassesInRevision.roid") Long roid) throws ServerException, UserException;
/**
* Get a list of all Projects the given User does not have authorization for
*
* @param uoid
* @return The list of Users
* @throws ServerException, UserException
*/
@WebMethod(action = "getAllNonAuthorizedProjectsOfUser")
List<SProject> getAllNonAuthorizedProjectsOfUser(
@WebParam(name = "uoid", partName = "getAllNonAuthorizedProjectsOfUser.uoid") Long uoid) throws ServerException, UserException;
/**
* Get a User by its UserNmae (e-mail address)
*
* @param username The username (must be a valid e-mail address)
* @return The SUser Object if found, otherwise null
* @throws ServerException, UserException
*/
@WebMethod(action = "getUserByUserName")
SUser getUserByUserName(
@WebParam(name = "username", partName = "getUserByUserName.username") String username) throws ServerException, UserException;
/**
* Undelete a previously deleted User, Users can be deleted with the deleteUser method
*
* @param uoid
* @return Whether the deletion was successfull
* @throws ServerException, UserException
*/
@WebMethod(action = "undeleteUser")
Boolean undeleteUser(
@WebParam(name = "uoid", partName = "undeleteUser.uoid") Long uoid) throws ServerException, UserException;
/**
* Compare two models
*
* @param roid1 The ObjectID of the first Revision
* @param roid2 The ObjectID of the second Revision
* @param sCompareType How to compare (All, Only Added, Only Modified or Only Deleted)
* @param mcid The ObjectID of the Model Compare plugin configuration
* @return The result of the compare as an SCompareResult object, consisting of a List of SCompareContainer objects
* @throws ServerException, UserException
*/
@WebMethod(action = "compare")
SCompareResult compare(
@WebParam(name = "roid1", partName = "compare.roid1") Long roid1,
@WebParam(name = "roid2", partName = "compare.roid2") Long roid2,
@WebParam(name = "sCompareType", partName = "compare.sCompareType") SCompareType sCompareType,
@WebParam(name = "mcid", partName = "compare.mcid") Long mcid) throws ServerException, UserException;
/**
* Get a revision summary
*
* @param roid ObjectID of the Revision
* @return A summary of the given Revision
* @throws ServerException, UserException
*/
@WebMethod(action = "getRevisionSummary")
SRevisionSummary getRevisionSummary(
@WebParam(name = "roid", partName = "getRevisionSummary.roid") Long roid) throws ServerException, UserException;
/**
* Check whether the given user has rights on the given project
*
* @param poid ObjectID of the Project
* @return Whether the current use has checkin rights on the given Project
* @throws ServerException, UserException
*/
@WebMethod(action = "userHasCheckinRights")
Boolean userHasCheckinRights(
@WebParam(name = "uoid", partName = "userHasCheckinRights.uoid") Long uoid,
@WebParam(name = "poid", partName = "userHasCheckinRights.poid") Long poid) throws ServerException, UserException;
/**
* Checkout warnings are given to users when checkouts are done by other users
*
* @param poid ObjectID of the Project
* @return A set of String containing possible warnings for this Project
* @throws ServerException, UserException
*/
@WebMethod(action = "getCheckoutWarnings")
Set<String> getCheckoutWarnings(
@WebParam(name = "poid", partName = "getCheckoutWarnings.poid") Long poid) throws ServerException, UserException;
/**
* Returns whether the currents user has rights on the given project
*
* @param poid ObjectID of the Project
* @return Whether the current User has rights on the given Project
* @throws ServerException, UserException
*/
@WebMethod(action = "userHasRights")
Boolean userHasRights(
@WebParam(name = "poid", partName = "userHasRights.poid") Long poid) throws ServerException, UserException;
/**
* Get the GeoTag attached to the given Project
*
* @param goid The ObjectID of the GeoTag
* @return The GeoTag object
* @throws ServerException, UserException
*/
@WebMethod(action = "getGeoTag")
SGeoTag getGeoTag(
@WebParam(name = "goid", partName = "getGeoTag.goid") Long goid) throws ServerException, UserException;
/**
* Update the GeoTag of a project
*
* @param sGeoTag A GeoTag object containing the new properties
* @throws ServerException, UserException
*/
@WebMethod(action = "updateGeoTag")
void updateGeoTag(
@WebParam(name = "sGeoTag", partName = "updateGeoTag.sGeoTag") SGeoTag sGeoTag) throws ServerException, UserException;
/**
* Get a user by its User ObjectID
*
* @param uoid The ObjectID of the User
* @return The User with the given User ObjectID
* @throws ServerException, UserException
*/
@WebMethod(action = "getUserByUoid")
SUser getUserByUoid(
@WebParam(name = "uoid", partName = "getUserByUoid.uoid") Long uoid) throws ServerException, UserException;
/**
* Get a list of all Users not authoriazed on the given Project
*
* @param poid The ObjectID of the Project
* @return A list of Users
* @throws ServerException, UserException
*/
@WebMethod(action = "getAllNonAuthorizedUsersOfProject")
List<SUser> getAllNonAuthorizedUsersOfProject(
@WebParam(name = "poid", partName = "getAllNonAuthorizedUsersOfProject.poid") Long poid) throws ServerException, UserException;
/**
* Get a list of users that have been authorized on the given project
*
* @param poid
* @return A list of all users authorized on the given project
* @throws ServerException, UserException
*/
@WebMethod(action = "getAllAuthorizedUsersOfProject")
List<SUser> getAllAuthorizedUsersOfProject(
@WebParam(name = "poid", partName = "getAllAuthorizedUsersOfProject.poid") Long poid) throws ServerException, UserException;
/**
* Get a list of projects a user is authorized on
*
* @param uoid
* @return A list of projects a user has been authorized for
* @throws ServerException, UserException
*/
@WebMethod(action = "getUsersProjects")
List<SProject> getUsersProjects(
@WebParam(name = "uoid", partName = "getUsersProjects.uoid") Long uoid) throws ServerException, UserException;
/**
* Set a tag on a specific revision
*
* @param roid The Revision ObjectID
* @param tag Tag
* @throws ServerException, UserException
*/
@WebMethod(action = "setRevisionTag")
void setRevisionTag(
@WebParam(name = "roid", partName = "setRevisionTag.roid") Long roid,
@WebParam(name = "tag", partName = "setRevisionTag.tag") String tag) throws ServerException, UserException;
/**
* Get a list of all checkouts of the given project and it's sub projects
*
* @param poid Project-ID of the given Project
* @return
* @throws ServerException
* @throws UserException
*/
@WebMethod(action = "getAllCheckoutsOfProjectAndSubProjects")
List<SCheckout> getAllCheckoutsOfProjectAndSubProjects(
@WebParam(name = "poid", partName = "getAllCheckoutsOfProjectAndSubProjects.poid") Long poid) throws ServerException, UserException;
/**
* Send an e-mail with the results of a compare
*
* @param sCompareType How to compare (All, Only Added, Only Modified or Only Deleted)
* @param poid The ObjectID of the Project
* @param roid1 The ObjectID of the first Revision