Révision 8fd1d584
Ajouté par Remy Menard il y a plus de 11 ans
.gitignore | ||
---|---|---|
# installer links
|
||
IoTa-Installer/resources/alfa-*-bin-with-dependencies.tar.gz
|
||
IoTa-Installer/resources/discovery-phi-*.war
|
||
IoTa-Installer/resources/discovery-server-*.war
|
||
IoTa-Installer/resources/dseta-server-*.war
|
||
IoTa-Installer/resources/ds-*.war
|
||
IoTa-Installer/resources/dseta-*.war
|
||
IoTa-Installer/resources/epcilon-*.war
|
||
IoTa-Installer/resources/epcis-phi-*.war
|
||
IoTa-Installer/resources/eta-*.war
|
||
... | ... | |
IoTa-Installer/resources/omega-*.war
|
||
IoTa-Installer/resources/sigma-*.war
|
||
IoTa-Installer/resources/lambda-*.war
|
||
IoTa-Installer/resources/gamma-*.tar
|
||
IoTa-Installer/resources/install.ini
|
||
#
|
||
PSi/eventSpecification/epcs.xml
|
ALfA/ALfA-PI/LICENSE | ||
---|---|---|
GNU GENERAL PUBLIC LICENSE
|
||
GNU LESSER GENERAL PUBLIC LICENSE
|
||
Version 3, 29 June 2007
|
||
|
||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||
Everyone is permitted to copy and distribute verbatim copies
|
||
of this license document, but changing it is not allowed.
|
||
|
||
Preamble
|
||
|
||
The GNU General Public License is a free, copyleft license for
|
||
software and other kinds of works.
|
||
|
||
The licenses for most software and other practical works are designed
|
||
to take away your freedom to share and change the works. By contrast,
|
||
the GNU General Public License is intended to guarantee your freedom to
|
||
share and change all versions of a program--to make sure it remains free
|
||
software for all its users. We, the Free Software Foundation, use the
|
||
GNU General Public License for most of our software; it applies also to
|
||
any other work released this way by its authors. You can apply it to
|
||
your programs, too.
|
||
|
||
When we speak of free software, we are referring to freedom, not
|
||
price. Our General Public Licenses are designed to make sure that you
|
||
have the freedom to distribute copies of free software (and charge for
|
||
them if you wish), that you receive source code or can get it if you
|
||
want it, that you can change the software or use pieces of it in new
|
||
free programs, and that you know you can do these things.
|
||
|
||
To protect your rights, we need to prevent others from denying you
|
||
these rights or asking you to surrender the rights. Therefore, you have
|
||
certain responsibilities if you distribute copies of the software, or if
|
||
you modify it: responsibilities to respect the freedom of others.
|
||
|
||
For example, if you distribute copies of such a program, whether
|
||
gratis or for a fee, you must pass on to the recipients the same
|
||
freedoms that you received. You must make sure that they, too, receive
|
||
or can get the source code. And you must show them these terms so they
|
||
know their rights.
|
||
|
||
Developers that use the GNU GPL protect your rights with two steps:
|
||
(1) assert copyright on the software, and (2) offer you this License
|
||
giving you legal permission to copy, distribute and/or modify it.
|
||
|
||
For the developers' and authors' protection, the GPL clearly explains
|
||
that there is no warranty for this free software. For both users' and
|
||
authors' sake, the GPL requires that modified versions be marked as
|
||
changed, so that their problems will not be attributed erroneously to
|
||
authors of previous versions.
|
||
|
||
Some devices are designed to deny users access to install or run
|
||
modified versions of the software inside them, although the manufacturer
|
||
can do so. This is fundamentally incompatible with the aim of
|
||
protecting users' freedom to change the software. The systematic
|
||
pattern of such abuse occurs in the area of products for individuals to
|
||
use, which is precisely where it is most unacceptable. Therefore, we
|
||
have designed this version of the GPL to prohibit the practice for those
|
||
products. If such problems arise substantially in other domains, we
|
||
stand ready to extend this provision to those domains in future versions
|
||
of the GPL, as needed to protect the freedom of users.
|
||
|
||
Finally, every program is threatened constantly by software patents.
|
||
States should not allow patents to restrict development and use of
|
||
software on general-purpose computers, but in those that do, we wish to
|
||
avoid the special danger that patents applied to a free program could
|
||
make it effectively proprietary. To prevent this, the GPL assures that
|
||
patents cannot be used to render the program non-free.
|
||
|
||
The precise terms and conditions for copying, distribution and
|
||
modification follow.
|
||
|
||
TERMS AND CONDITIONS
|
||
|
||
0. Definitions.
|
||
|
||
"This License" refers to version 3 of the GNU General Public License.
|
||
|
||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||
works, such as semiconductor masks.
|
||
|
||
"The Program" refers to any copyrightable work licensed under this
|
||
License. Each licensee is addressed as "you". "Licensees" and
|
||
"recipients" may be individuals or organizations.
|
||
|
||
To "modify" a work means to copy from or adapt all or part of the work
|
||
in a fashion requiring copyright permission, other than the making of an
|
||
exact copy. The resulting work is called a "modified version" of the
|
||
earlier work or a work "based on" the earlier work.
|
||
|
||
A "covered work" means either the unmodified Program or a work based
|
||
on the Program.
|
||
|
||
To "propagate" a work means to do anything with it that, without
|
||
permission, would make you directly or secondarily liable for
|
||
infringement under applicable copyright law, except executing it on a
|
||
computer or modifying a private copy. Propagation includes copying,
|
||
distribution (with or without modification), making available to the
|
||
public, and in some countries other activities as well.
|
||
|
||
To "convey" a work means any kind of propagation that enables other
|
||
parties to make or receive copies. Mere interaction with a user through
|
||
a computer network, with no transfer of a copy, is not conveying.
|
||
|
||
An interactive user interface displays "Appropriate Legal Notices"
|
||
to the extent that it includes a convenient and prominently visible
|
||
feature that (1) displays an appropriate copyright notice, and (2)
|
||
tells the user that there is no warranty for the work (except to the
|
||
extent that warranties are provided), that licensees may convey the
|
||
work under this License, and how to view a copy of this License. If
|
||
the interface presents a list of user commands or options, such as a
|
||
menu, a prominent item in the list meets this criterion.
|
||
|
||
1. Source Code.
|
||
|
||
The "source code" for a work means the preferred form of the work
|
||
for making modifications to it. "Object code" means any non-source
|
||
form of a work.
|
||
|
||
A "Standard Interface" means an interface that either is an official
|
||
standard defined by a recognized standards body, or, in the case of
|
||
interfaces specified for a particular programming language, one that
|
||
is widely used among developers working in that language.
|
||
|
||
The "System Libraries" of an executable work include anything, other
|
||
than the work as a whole, that (a) is included in the normal form of
|
||
packaging a Major Component, but which is not part of that Major
|
||
Component, and (b) serves only to enable use of the work with that
|
||
Major Component, or to implement a Standard Interface for which an
|
||
implementation is available to the public in source code form. A
|
||
"Major Component", in this context, means a major essential component
|
||
(kernel, window system, and so on) of the specific operating system
|
||
(if any) on which the executable work runs, or a compiler used to
|
||
produce the work, or an object code interpreter used to run it.
|
||
|
||
The "Corresponding Source" for a work in object code form means all
|
||
the source code needed to generate, install, and (for an executable
|
||
work) run the object code and to modify the work, including scripts to
|
||
control those activities. However, it does not include the work's
|
||
System Libraries, or general-purpose tools or generally available free
|
||
programs which are used unmodified in performing those activities but
|
||
which are not part of the work. For example, Corresponding Source
|
||
includes interface definition files associated with source files for
|
||
the work, and the source code for shared libraries and dynamically
|
||
linked subprograms that the work is specifically designed to require,
|
||
such as by intimate data communication or control flow between those
|
||
subprograms and other parts of the work.
|
||
|
||
The Corresponding Source need not include anything that users
|
||
can regenerate automatically from other parts of the Corresponding
|
||
Source.
|
||
|
||
The Corresponding Source for a work in source code form is that
|
||
same work.
|
||
|
||
2. Basic Permissions.
|
||
|
||
All rights granted under this License are granted for the term of
|
||
copyright on the Program, and are irrevocable provided the stated
|
||
conditions are met. This License explicitly affirms your unlimited
|
||
permission to run the unmodified Program. The output from running a
|
||
covered work is covered by this License only if the output, given its
|
||
content, constitutes a covered work. This License acknowledges your
|
||
rights of fair use or other equivalent, as provided by copyright law.
|
||
|
||
You may make, run and propagate covered works that you do not
|
||
convey, without conditions so long as your license otherwise remains
|
||
in force. You may convey covered works to others for the sole purpose
|
||
of having them make modifications exclusively for you, or provide you
|
||
with facilities for running those works, provided that you comply with
|
||
the terms of this License in conveying all material for which you do
|
||
not control copyright. Those thus making or running the covered works
|
||
for you must do so exclusively on your behalf, under your direction
|
||
and control, on terms that prohibit them from making any copies of
|
||
your copyrighted material outside their relationship with you.
|
||
|
||
Conveying under any other circumstances is permitted solely under
|
||
the conditions stated below. Sublicensing is not allowed; section 10
|
||
makes it unnecessary.
|
||
|
||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||
|
||
No covered work shall be deemed part of an effective technological
|
||
measure under any applicable law fulfilling obligations under article
|
||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||
similar laws prohibiting or restricting circumvention of such
|
||
measures.
|
||
|
||
When you convey a covered work, you waive any legal power to forbid
|
||
circumvention of technological measures to the extent such circumvention
|
||
is effected by exercising rights under this License with respect to
|
||
the covered work, and you disclaim any intention to limit operation or
|
||
modification of the work as a means of enforcing, against the work's
|
||
users, your or third parties' legal rights to forbid circumvention of
|
||
technological measures.
|
||
|
||
4. Conveying Verbatim Copies.
|
||
|
||
You may convey verbatim copies of the Program's source code as you
|
||
receive it, in any medium, provided that you conspicuously and
|
||
appropriately publish on each copy an appropriate copyright notice;
|
||
keep intact all notices stating that this License and any
|
||
non-permissive terms added in accord with section 7 apply to the code;
|
||
keep intact all notices of the absence of any warranty; and give all
|
||
recipients a copy of this License along with the Program.
|
||
|
||
You may charge any price or no price for each copy that you convey,
|
||
and you may offer support or warranty protection for a fee.
|
||
|
||
5. Conveying Modified Source Versions.
|
||
|
||
You may convey a work based on the Program, or the modifications to
|
||
produce it from the Program, in the form of source code under the
|
||
terms of section 4, provided that you also meet all of these conditions:
|
||
|
||
a) The work must carry prominent notices stating that you modified
|
||
it, and giving a relevant date.
|
||
|
||
b) The work must carry prominent notices stating that it is
|
||
released under this License and any conditions added under section
|
||
7. This requirement modifies the requirement in section 4 to
|
||
"keep intact all notices".
|
||
|
||
c) You must license the entire work, as a whole, under this
|
||
License to anyone who comes into possession of a copy. This
|
||
License will therefore apply, along with any applicable section 7
|
||
additional terms, to the whole of the work, and all its parts,
|
||
regardless of how they are packaged. This License gives no
|
||
permission to license the work in any other way, but it does not
|
||
invalidate such permission if you have separately received it.
|
||
|
||
d) If the work has interactive user interfaces, each must display
|
||
Appropriate Legal Notices; however, if the Program has interactive
|
||
interfaces that do not display Appropriate Legal Notices, your
|
||
work need not make them do so.
|
||
|
||
A compilation of a covered work with other separate and independent
|
||
works, which are not by their nature extensions of the covered work,
|
||
and which are not combined with it such as to form a larger program,
|
||
in or on a volume of a storage or distribution medium, is called an
|
||
"aggregate" if the compilation and its resulting copyright are not
|
||
used to limit the access or legal rights of the compilation's users
|
||
beyond what the individual works permit. Inclusion of a covered work
|
||
in an aggregate does not cause this License to apply to the other
|
||
parts of the aggregate.
|
||
|
||
6. Conveying Non-Source Forms.
|
||
|
||
You may convey a covered work in object code form under the terms
|
||
of sections 4 and 5, provided that you also convey the
|
||
machine-readable Corresponding Source under the terms of this License,
|
||
in one of these ways:
|
||
|
||
a) Convey the object code in, or embodied in, a physical product
|
||
(including a physical distribution medium), accompanied by the
|
||
Corresponding Source fixed on a durable physical medium
|
||
customarily used for software interchange.
|
||
|
||
b) Convey the object code in, or embodied in, a physical product
|
||
(including a physical distribution medium), accompanied by a
|
||
written offer, valid for at least three years and valid for as
|
||
long as you offer spare parts or customer support for that product
|
||
model, to give anyone who possesses the object code either (1) a
|
||
copy of the Corresponding Source for all the software in the
|
||
product that is covered by this License, on a durable physical
|
||
medium customarily used for software interchange, for a price no
|
||
more than your reasonable cost of physically performing this
|
||
conveying of source, or (2) access to copy the
|
||
Corresponding Source from a network server at no charge.
|
||
|
||
c) Convey individual copies of the object code with a copy of the
|
||
written offer to provide the Corresponding Source. This
|
||
alternative is allowed only occasionally and noncommercially, and
|
||
only if you received the object code with such an offer, in accord
|
||
with subsection 6b.
|
||
|
||
d) Convey the object code by offering access from a designated
|
||
place (gratis or for a charge), and offer equivalent access to the
|
||
Corresponding Source in the same way through the same place at no
|
||
further charge. You need not require recipients to copy the
|
||
Corresponding Source along with the object code. If the place to
|
||
copy the object code is a network server, the Corresponding Source
|
||
may be on a different server (operated by you or a third party)
|
||
that supports equivalent copying facilities, provided you maintain
|
||
clear directions next to the object code saying where to find the
|
||
Corresponding Source. Regardless of what server hosts the
|
||
Corresponding Source, you remain obligated to ensure that it is
|
||
available for as long as needed to satisfy these requirements.
|
||
|
||
e) Convey the object code using peer-to-peer transmission, provided
|
||
you inform other peers where the object code and Corresponding
|
||
Source of the work are being offered to the general public at no
|
||
charge under subsection 6d.
|
||
|
||
A separable portion of the object code, whose source code is excluded
|
||
from the Corresponding Source as a System Library, need not be
|
||
included in conveying the object code work.
|
||
|
||
A "User Product" is either (1) a "consumer product", which means any
|
||
tangible personal property which is normally used for personal, family,
|
||
or household purposes, or (2) anything designed or sold for incorporation
|
||
into a dwelling. In determining whether a product is a consumer product,
|
||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||
product received by a particular user, "normally used" refers to a
|
||
typical or common use of that class of product, regardless of the status
|
||
of the particular user or of the way in which the particular user
|
||
actually uses, or expects or is expected to use, the product. A product
|
||
is a consumer product regardless of whether the product has substantial
|
||
commercial, industrial or non-consumer uses, unless such uses represent
|
||
the only significant mode of use of the product.
|
||
|
||
"Installation Information" for a User Product means any methods,
|
||
procedures, authorization keys, or other information required to install
|
||
and execute modified versions of a covered work in that User Product from
|
||
a modified version of its Corresponding Source. The information must
|
||
suffice to ensure that the continued functioning of the modified object
|
||
code is in no case prevented or interfered with solely because
|
||
modification has been made.
|
||
|
||
If you convey an object code work under this section in, or with, or
|
||
specifically for use in, a User Product, and the conveying occurs as
|
||
part of a transaction in which the right of possession and use of the
|
||
User Product is transferred to the recipient in perpetuity or for a
|
||
fixed term (regardless of how the transaction is characterized), the
|
||
Corresponding Source conveyed under this section must be accompanied
|
||
by the Installation Information. But this requirement does not apply
|
||
if neither you nor any third party retains the ability to install
|
||
modified object code on the User Product (for example, the work has
|
||
been installed in ROM).
|
||
|
||
The requirement to provide Installation Information does not include a
|
||
requirement to continue to provide support service, warranty, or updates
|
||
for a work that has been modified or installed by the recipient, or for
|
||
the User Product in which it has been modified or installed. Access to a
|
||
network may be denied when the modification itself materially and
|
||
adversely affects the operation of the network or violates the rules and
|
||
protocols for communication across the network.
|
||
|
||
Corresponding Source conveyed, and Installation Information provided,
|
||
in accord with this section must be in a format that is publicly
|
||
documented (and with an implementation available to the public in
|
||
source code form), and must require no special password or key for
|
||
unpacking, reading or copying.
|
||
|
||
7. Additional Terms.
|
||
|
||
"Additional permissions" are terms that supplement the terms of this
|
||
License by making exceptions from one or more of its conditions.
|
||
Additional permissions that are applicable to the entire Program shall
|
||
be treated as though they were included in this License, to the extent
|
||
that they are valid under applicable law. If additional permissions
|
||
apply only to part of the Program, that part may be used separately
|
||
under those permissions, but the entire Program remains governed by
|
||
this License without regard to the additional permissions.
|
||
|
||
When you convey a copy of a covered work, you may at your option
|
||
remove any additional permissions from that copy, or from any part of
|
||
it. (Additional permissions may be written to require their own
|
||
removal in certain cases when you modify the work.) You may place
|
||
additional permissions on material, added by you to a covered work,
|
||
for which you have or can give appropriate copyright permission.
|
||
|
||
Notwithstanding any other provision of this License, for material you
|
||
add to a covered work, you may (if authorized by the copyright holders of
|
||
that material) supplement the terms of this License with terms:
|
||
|
||
a) Disclaiming warranty or limiting liability differently from the
|
||
terms of sections 15 and 16 of this License; or
|
||
|
||
b) Requiring preservation of specified reasonable legal notices or
|
||
author attributions in that material or in the Appropriate Legal
|
||
Notices displayed by works containing it; or
|
||
|
||
c) Prohibiting misrepresentation of the origin of that material, or
|
||
requiring that modified versions of such material be marked in
|
||
reasonable ways as different from the original version; or
|
||
|
||
d) Limiting the use for publicity purposes of names of licensors or
|
||
authors of the material; or
|
||
|
||
e) Declining to grant rights under trademark law for use of some
|
||
trade names, trademarks, or service marks; or
|
||
|
||
f) Requiring indemnification of licensors and authors of that
|
||
material by anyone who conveys the material (or modified versions of
|
||
it) with contractual assumptions of liability to the recipient, for
|
||
any liability that these contractual assumptions directly impose on
|
||
those licensors and authors.
|
||
|
||
All other non-permissive additional terms are considered "further
|
||
restrictions" within the meaning of section 10. If the Program as you
|
||
received it, or any part of it, contains a notice stating that it is
|
||
governed by this License along with a term that is a further
|
||
restriction, you may remove that term. If a license document contains
|
||
a further restriction but permits relicensing or conveying under this
|
||
License, you may add to a covered work material governed by the terms
|
||
of that license document, provided that the further restriction does
|
||
not survive such relicensing or conveying.
|
||
|
||
If you add terms to a covered work in accord with this section, you
|
||
must place, in the relevant source files, a statement of the
|
||
additional terms that apply to those files, or a notice indicating
|
||
where to find the applicable terms.
|
||
|
||
Additional terms, permissive or non-permissive, may be stated in the
|
||
form of a separately written license, or stated as exceptions;
|
||
the above requirements apply either way.
|
||
|
||
8. Termination.
|
||
|
||
You may not propagate or modify a covered work except as expressly
|
||
provided under this License. Any attempt otherwise to propagate or
|
||
modify it is void, and will automatically terminate your rights under
|
||
this License (including any patent licenses granted under the third
|
||
paragraph of section 11).
|
||
|
||
However, if you cease all violation of this License, then your
|
||
license from a particular copyright holder is reinstated (a)
|
||
provisionally, unless and until the copyright holder explicitly and
|
||
finally terminates your license, and (b) permanently, if the copyright
|
||
holder fails to notify you of the violation by some reasonable means
|
||
prior to 60 days after the cessation.
|
||
|
||
Moreover, your license from a particular copyright holder is
|
||
reinstated permanently if the copyright holder notifies you of the
|
||
violation by some reasonable means, this is the first time you have
|
||
received notice of violation of this License (for any work) from that
|
||
copyright holder, and you cure the violation prior to 30 days after
|
||
your receipt of the notice.
|
||
|
||
Termination of your rights under this section does not terminate the
|
||
licenses of parties who have received copies or rights from you under
|
||
this License. If your rights have been terminated and not permanently
|
||
reinstated, you do not qualify to receive new licenses for the same
|
||
material under section 10.
|
||
|
||
9. Acceptance Not Required for Having Copies.
|
||
|
||
You are not required to accept this License in order to receive or
|
||
run a copy of the Program. Ancillary propagation of a covered work
|
||
occurring solely as a consequence of using peer-to-peer transmission
|
||
to receive a copy likewise does not require acceptance. However,
|
||
nothing other than this License grants you permission to propagate or
|
||
modify any covered work. These actions infringe copyright if you do
|
||
not accept this License. Therefore, by modifying or propagating a
|
||
covered work, you indicate your acceptance of this License to do so.
|
||
|
||
10. Automatic Licensing of Downstream Recipients.
|
||
|
||
Each time you convey a covered work, the recipient automatically
|
||
receives a license from the original licensors, to run, modify and
|
||
propagate that work, subject to this License. You are not responsible
|
||
for enforcing compliance by third parties with this License.
|
||
|
||
An "entity transaction" is a transaction transferring control of an
|
||
organization, or substantially all assets of one, or subdividing an
|
||
organization, or merging organizations. If propagation of a covered
|
||
work results from an entity transaction, each party to that
|
||
transaction who receives a copy of the work also receives whatever
|
||
licenses to the work the party's predecessor in interest had or could
|
||
give under the previous paragraph, plus a right to possession of the
|
||
Corresponding Source of the work from the predecessor in interest, if
|
||
the predecessor has it or can get it with reasonable efforts.
|
||
|
||
You may not impose any further restrictions on the exercise of the
|
||
rights granted or affirmed under this License. For example, you may
|
||
not impose a license fee, royalty, or other charge for exercise of
|
||
rights granted under this License, and you may not initiate litigation
|
||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||
any patent claim is infringed by making, using, selling, offering for
|
||
sale, or importing the Program or any portion of it.
|
||
|
||
11. Patents.
|
||
|
||
A "contributor" is a copyright holder who authorizes use under this
|
||
License of the Program or a work on which the Program is based. The
|
||
work thus licensed is called the contributor's "contributor version".
|
||
|
||
A contributor's "essential patent claims" are all patent claims
|
||
owned or controlled by the contributor, whether already acquired or
|
||
hereafter acquired, that would be infringed by some manner, permitted
|
||
by this License, of making, using, or selling its contributor version,
|
||
but do not include claims that would be infringed only as a
|
||
consequence of further modification of the contributor version. For
|
||
purposes of this definition, "control" includes the right to grant
|
||
patent sublicenses in a manner consistent with the requirements of
|
||
this License.
|
||
|
||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||
patent license under the contributor's essential patent claims, to
|
||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||
propagate the contents of its contributor version.
|
||
|
||
In the following three paragraphs, a "patent license" is any express
|
||
agreement or commitment, however denominated, not to enforce a patent
|
||
(such as an express permission to practice a patent or covenant not to
|
||
sue for patent infringement). To "grant" such a patent license to a
|
||
party means to make such an agreement or commitment not to enforce a
|
||
patent against the party.
|
||
|
||
If you convey a covered work, knowingly relying on a patent license,
|
||
and the Corresponding Source of the work is not available for anyone
|
||
to copy, free of charge and under the terms of this License, through a
|
||
publicly available network server or other readily accessible means,
|
||
then you must either (1) cause the Corresponding Source to be so
|
||
available, or (2) arrange to deprive yourself of the benefit of the
|
||
patent license for this particular work, or (3) arrange, in a manner
|
||
consistent with the requirements of this License, to extend the patent
|
||
license to downstream recipients. "Knowingly relying" means you have
|
||
actual knowledge that, but for the patent license, your conveying the
|
||
covered work in a country, or your recipient's use of the covered work
|
||
in a country, would infringe one or more identifiable patents in that
|
||
country that you have reason to believe are valid.
|
||
|
||
If, pursuant to or in connection with a single transaction or
|
||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||
covered work, and grant a patent license to some of the parties
|
||
receiving the covered work authorizing them to use, propagate, modify
|
||
or convey a specific copy of the covered work, then the patent license
|
||
you grant is automatically extended to all recipients of the covered
|
||
work and works based on it.
|
||
|
||
A patent license is "discriminatory" if it does not include within
|
||
the scope of its coverage, prohibits the exercise of, or is
|
||
conditioned on the non-exercise of one or more of the rights that are
|
||
specifically granted under this License. You may not convey a covered
|
||
work if you are a party to an arrangement with a third party that is
|
||
in the business of distributing software, under which you make payment
|
||
to the third party based on the extent of your activity of conveying
|
||
the work, and under which the third party grants, to any of the
|
||
parties who would receive the covered work from you, a discriminatory
|
||
patent license (a) in connection with copies of the covered work
|
||
conveyed by you (or copies made from those copies), or (b) primarily
|
||
for and in connection with specific products or compilations that
|
||
contain the covered work, unless you entered into that arrangement,
|
||
or that patent license was granted, prior to 28 March 2007.
|
||
|
||
Nothing in this License shall be construed as excluding or limiting
|
||
any implied license or other defenses to infringement that may
|
||
otherwise be available to you under applicable patent law.
|
||
|
||
12. No Surrender of Others' Freedom.
|
||
|
||
If conditions are imposed on you (whether by court order, agreement or
|
||
otherwise) that contradict the conditions of this License, they do not
|
||
excuse you from the conditions of this License. If you cannot convey a
|
||
covered work so as to satisfy simultaneously your obligations under this
|
||
License and any other pertinent obligations, then as a consequence you may
|
||
not convey it at all. For example, if you agree to terms that obligate you
|
||
to collect a royalty for further conveying from those to whom you convey
|
||
the Program, the only way you could satisfy both those terms and this
|
||
License would be to refrain entirely from conveying the Program.
|
||
|
||
13. Use with the GNU Affero General Public License.
|
||
|
||
Notwithstanding any other provision of this License, you have
|
||
permission to link or combine any covered work with a work licensed
|
||
under version 3 of the GNU Affero General Public License into a single
|
||
combined work, and to convey the resulting work. The terms of this
|
||
License will continue to apply to the part which is the covered work,
|
||
but the special requirements of the GNU Affero General Public License,
|
||
section 13, concerning interaction through a network will apply to the
|
||
combination as such.
|
||
|
||
14. Revised Versions of this License.
|
||
|
||
The Free Software Foundation may publish revised and/or new versions of
|
||
the GNU General Public License from time to time. Such new versions will
|
||
be similar in spirit to the present version, but may differ in detail to
|
||
address new problems or concerns.
|
||
|
||
Each version is given a distinguishing version number. If the
|
||
Program specifies that a certain numbered version of the GNU General
|
||
Public License "or any later version" applies to it, you have the
|
||
option of following the terms and conditions either of that numbered
|
||
version or of any later version published by the Free Software
|
||
Foundation. If the Program does not specify a version number of the
|
||
GNU General Public License, you may choose any version ever published
|
||
by the Free Software Foundation.
|
||
|
||
If the Program specifies that a proxy can decide which future
|
||
versions of the GNU General Public License can be used, that proxy's
|
||
public statement of acceptance of a version permanently authorizes you
|
||
to choose that version for the Program.
|
||
|
||
Later license versions may give you additional or different
|
||
permissions. However, no additional obligations are imposed on any
|
||
author or copyright holder as a result of your choosing to follow a
|
||
later version.
|
||
|
||
15. Disclaimer of Warranty.
|
||
|
||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||
|
||
16. Limitation of Liability.
|
||
|
||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||
SUCH DAMAGES.
|
||
|
||
17. Interpretation of Sections 15 and 16.
|
||
|
||
If the disclaimer of warranty and limitation of liability provided
|
||
above cannot be given local legal effect according to their terms,
|
||
reviewing courts shall apply local law that most closely approximates
|
||
an absolute waiver of all civil liability in connection with the
|
||
Program, unless a warranty or assumption of liability accompanies a
|
||
copy of the Program in return for a fee.
|
||
|
||
END OF TERMS AND CONDITIONS
|
||
|
||
How to Apply These Terms to Your New Programs
|
||
|
||
If you develop a new program, and you want it to be of the greatest
|
||
possible use to the public, the best way to achieve this is to make it
|
||
free software which everyone can redistribute and change under these terms.
|
||
|
||
To do so, attach the following notices to the program. It is safest
|
||
to attach them to the start of each source file to most effectively
|
||
state the exclusion of warranty; and each file should have at least
|
||
the "copyright" line and a pointer to where the full notice is found.
|
||
|
||
<one line to give the program's name and a brief idea of what it does.>
|
||
Copyright (C) <year> <name of author>
|
||
|
||
This program is free software: you can redistribute it and/or modify
|
||
it under the terms of the GNU 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 General Public License for more details.
|
||
|
||
You should have received a copy of the GNU General Public License
|
||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
|
||
Also add information on how to contact you by electronic and paper mail.
|
||
|
||
If the program does terminal interaction, make it output a short
|
||
notice like this when it starts in an interactive mode:
|
||
|
||
<program> Copyright (C) <year> <name of author>
|
||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||
This is free software, and you are welcome to redistribute it
|
||
under certain conditions; type `show c' for details.
|
||
|
||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||
parts of the General Public License. Of course, your program's commands
|
||
might be different; for a GUI interface, you would use an "about box".
|
||
|
||
You should also get your employer (if you work as a programmer) or school,
|
||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||
For more information on this, and how to apply and follow the GNU GPL, see
|
||
<http://www.gnu.org/licenses/>.
|
||
|
||
The GNU General Public License does not permit incorporating your program
|
||
into proprietary programs. If your program is a subroutine library, you
|
||
may consider it more useful to permit linking proprietary applications with
|
||
the library. If this is what you want to do, use the GNU Lesser General
|
||
Public License instead of this License. But first, please read
|
||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||
|
||
This version of the GNU Lesser General Public License incorporates
|
||
the terms and conditions of version 3 of the GNU General Public
|
||
License, supplemented by the additional permissions listed below.
|
||
|
||
0. Additional Definitions.
|
||
|
||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||
General Public License.
|
||
|
||
"The Library" refers to a covered work governed by this License,
|
||
other than an Application or a Combined Work as defined below.
|
||
|
||
An "Application" is any work that makes use of an interface provided
|
||
by the Library, but which is not otherwise based on the Library.
|
||
Defining a subclass of a class defined by the Library is deemed a mode
|
||
of using an interface provided by the Library.
|
||
|
||
A "Combined Work" is a work produced by combining or linking an
|
||
Application with the Library. The particular version of the Library
|
||
with which the Combined Work was made is also called the "Linked
|
||
Version".
|
||
|
||
The "Minimal Corresponding Source" for a Combined Work means the
|
||
Corresponding Source for the Combined Work, excluding any source code
|
||
for portions of the Combined Work that, considered in isolation, are
|
||
based on the Application, and not on the Linked Version.
|
||
|
||
The "Corresponding Application Code" for a Combined Work means the
|
||
object code and/or source code for the Application, including any data
|
||
and utility programs needed for reproducing the Combined Work from the
|
||
Application, but excluding the System Libraries of the Combined Work.
|
||
|
||
1. Exception to Section 3 of the GNU GPL.
|
||
|
||
You may convey a covered work under sections 3 and 4 of this License
|
||
without being bound by section 3 of the GNU GPL.
|
||
|
||
2. Conveying Modified Versions.
|
||
|
||
If you modify a copy of the Library, and, in your modifications, a
|
||
facility refers to a function or data to be supplied by an Application
|
||
that uses the facility (other than as an argument passed when the
|
||
facility is invoked), then you may convey a copy of the modified
|
||
version:
|
||
|
||
a) under this License, provided that you make a good faith effort to
|
||
ensure that, in the event an Application does not supply the
|
||
function or data, the facility still operates, and performs
|
||
whatever part of its purpose remains meaningful, or
|
||
|
||
b) under the GNU GPL, with none of the additional permissions of
|
||
this License applicable to that copy.
|
||
|
||
3. Object Code Incorporating Material from Library Header Files.
|
||
|
||
The object code form of an Application may incorporate material from
|
||
a header file that is part of the Library. You may convey such object
|
||
code under terms of your choice, provided that, if the incorporated
|
||
material is not limited to numerical parameters, data structure
|
||
layouts and accessors, or small macros, inline functions and templates
|
||
(ten or fewer lines in length), you do both of the following:
|
||
|
||
a) Give prominent notice with each copy of the object code that the
|
||
Library is used in it and that the Library and its use are
|
||
covered by this License.
|
||
|
||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||
document.
|
||
|
||
4. Combined Works.
|
||
|
||
You may convey a Combined Work under terms of your choice that,
|
||
taken together, effectively do not restrict modification of the
|
||
portions of the Library contained in the Combined Work and reverse
|
||
engineering for debugging such modifications, if you also do each of
|
||
the following:
|
||
|
||
a) Give prominent notice with each copy of the Combined Work that
|
||
the Library is used in it and that the Library and its use are
|
||
covered by this License.
|
||
|
||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||
document.
|
||
|
||
c) For a Combined Work that displays copyright notices during
|
||
execution, include the copyright notice for the Library among
|
||
these notices, as well as a reference directing the user to the
|
||
copies of the GNU GPL and this license document.
|
||
|
||
d) Do one of the following:
|
||
|
||
0) Convey the Minimal Corresponding Source under the terms of this
|
||
License, and the Corresponding Application Code in a form
|
||
suitable for, and under terms that permit, the user to
|
||
recombine or relink the Application with a modified version of
|
||
the Linked Version to produce a modified Combined Work, in the
|
||
manner specified by section 6 of the GNU GPL for conveying
|
||
Corresponding Source.
|
||
|
||
1) Use a suitable shared library mechanism for linking with the
|
||
Library. A suitable mechanism is one that (a) uses at run time
|
||
a copy of the Library already present on the user's computer
|
||
system, and (b) will operate properly with a modified version
|
||
of the Library that is interface-compatible with the Linked
|
||
Version.
|
||
|
||
e) Provide Installation Information, but only if you would otherwise
|
||
be required to provide such information under section 6 of the
|
||
GNU GPL, and only to the extent that such information is
|
||
necessary to install and execute a modified version of the
|
||
Combined Work produced by recombining or relinking the
|
||
Application with a modified version of the Linked Version. (If
|
||
you use option 4d0, the Installation Information must accompany
|
||
the Minimal Corresponding Source and Corresponding Application
|
||
Code. If you use option 4d1, you must provide the Installation
|
||
Information in the manner specified by section 6 of the GNU GPL
|
||
for conveying Corresponding Source.)
|
||
|
||
5. Combined Libraries.
|
||
|
||
You may place library facilities that are a work based on the
|
||
Library side by side in a single library together with other library
|
||
facilities that are not Applications and are not covered by this
|
||
License, and convey such a combined library under terms of your
|
||
choice, if you do both of the following:
|
||
|
||
a) Accompany the combined library with a copy of the same work based
|
||
on the Library, uncombined with any other library facilities,
|
||
conveyed under the terms of this License.
|
||
|
||
b) Give prominent notice with the combined library that part of it
|
||
is a work based on the Library, and explaining where to find the
|
||
accompanying uncombined form of the same work.
|
||
|
||
6. Revised Versions of the GNU Lesser General Public License.
|
||
|
||
The Free Software Foundation may publish revised and/or new versions
|
||
of the GNU Lesser General Public License from time to time. Such new
|
||
versions will be similar in spirit to the present version, but may
|
||
differ in detail to address new problems or concerns.
|
||
|
||
Each version is given a distinguishing version number. If the
|
||
Library as you received it specifies that a certain numbered version
|
||
of the GNU Lesser General Public License "or any later version"
|
||
applies to it, you have the option of following the terms and
|
||
conditions either of that published version or of any later version
|
||
published by the Free Software Foundation. If the Library as you
|
||
received it does not specify a version number of the GNU Lesser
|
||
General Public License, you may choose any version of the GNU Lesser
|
||
General Public License ever published by the Free Software Foundation.
|
||
|
||
If the Library as you received it specifies that a proxy can decide
|
||
whether future versions of the GNU Lesser General Public License shall
|
||
apply, that proxy's public statement of acceptance of any version is
|
||
permanent authorization for you to choose that version for the
|
||
Library.
|
ALfA/ALfA-PI/pom.xml | ||
---|---|---|
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>alfa-pi</artifactId>
|
||
<version>1.99</version>
|
||
<version>2.0</version>
|
||
<packaging>jar</packaging>
|
||
|
||
<name>ALfA-PI</name>
|
ALfA/ALfA-PI/src/main/java/fr/unicaen/iota/application/AccessInterface.java | ||
---|---|---|
* Copyright © 2008-2012 Orange Labs
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU General Public License as published by
|
||
* it under the terms of the GNU Lesser 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 General Public License for more details.
|
||
* GNU Lesser General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
... | ... | |
package fr.unicaen.iota.application;
|
||
|
||
import fr.unicaen.iota.application.rmi.CallbackClient;
|
||
import fr.unicaen.iota.ds.model.TEventItem;
|
||
import fr.unicaen.iota.ds.model.TServiceType;
|
||
import fr.unicaen.iota.ds.model.DSEvent;
|
||
import fr.unicaen.iota.nu.ONSEntryType;
|
||
import fr.unicaen.iota.tau.model.Identity;
|
||
import java.rmi.RemoteException;
|
||
... | ... | |
* @return a list of DS events
|
||
* @throws RemoteException
|
||
*/
|
||
public List<TEventItem> queryDS(Identity identity, String EPC, String DSAddress) throws RemoteException;
|
||
public List<DSEvent> queryDS(Identity identity, String EPC, String DSAddress) throws RemoteException;
|
||
|
||
/**
|
||
* Queries a given Discovery Service for all events concerning a given EPC
|
||
... | ... | |
* @return a list of DS events
|
||
* @throws RemoteException
|
||
*/
|
||
public List<TEventItem> queryDS(Identity identity, String EPC, String DSAddress, TServiceType serviceType) throws RemoteException;
|
||
public List<DSEvent> queryDS(Identity identity, String EPC, String DSAddress, ONSEntryType serviceType) throws RemoteException;
|
||
|
||
/**
|
||
* Gets all the EPCIS events concerning a given EPC code.
|
ALfA/ALfA-PI/src/main/java/fr/unicaen/iota/application/rmi/CallbackClient.java | ||
---|---|---|
* Copyright © 2008-2012 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU General Public License as published by
|
||
* it under the terms of the GNU Lesser 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 General Public License for more details.
|
||
* GNU Lesser General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
ALfA/ALfA-PI/src/main/java/fr/unicaen/iota/application/rmi/RMIAccessInterface.java | ||
---|---|---|
* Copyright © 2008-2012 Orange Labs
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU General Public License as published by
|
||
* it under the terms of the GNU Lesser 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 General Public License for more details.
|
||
* GNU Lesser General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
ALfA/ALfA-PI/src/main/resources/META-INF/LICENSE | ||
---|---|---|
GNU GENERAL PUBLIC LICENSE
|
||
GNU LESSER GENERAL PUBLIC LICENSE
|
||
Version 3, 29 June 2007
|
||
|
||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||
Everyone is permitted to copy and distribute verbatim copies
|
||
of this license document, but changing it is not allowed.
|
||
|
||
Preamble
|
||
|
||
The GNU General Public License is a free, copyleft license for
|
||
software and other kinds of works.
|
||
|
||
The licenses for most software and other practical works are designed
|
||
to take away your freedom to share and change the works. By contrast,
|
||
the GNU General Public License is intended to guarantee your freedom to
|
||
share and change all versions of a program--to make sure it remains free
|
||
software for all its users. We, the Free Software Foundation, use the
|
||
GNU General Public License for most of our software; it applies also to
|
||
any other work released this way by its authors. You can apply it to
|
||
your programs, too.
|
||
|
||
When we speak of free software, we are referring to freedom, not
|
||
price. Our General Public Licenses are designed to make sure that you
|
||
have the freedom to distribute copies of free software (and charge for
|
||
them if you wish), that you receive source code or can get it if you
|
||
want it, that you can change the software or use pieces of it in new
|
||
free programs, and that you know you can do these things.
|
||
|
||
To protect your rights, we need to prevent others from denying you
|
||
these rights or asking you to surrender the rights. Therefore, you have
|
||
certain responsibilities if you distribute copies of the software, or if
|
||
you modify it: responsibilities to respect the freedom of others.
|
||
|
||
For example, if you distribute copies of such a program, whether
|
||
gratis or for a fee, you must pass on to the recipients the same
|
||
freedoms that you received. You must make sure that they, too, receive
|
||
or can get the source code. And you must show them these terms so they
|
||
know their rights.
|
||
|
||
Developers that use the GNU GPL protect your rights with two steps:
|
||
(1) assert copyright on the software, and (2) offer you this License
|
||
giving you legal permission to copy, distribute and/or modify it.
|
||
|
||
For the developers' and authors' protection, the GPL clearly explains
|
||
that there is no warranty for this free software. For both users' and
|
||
authors' sake, the GPL requires that modified versions be marked as
|
||
changed, so that their problems will not be attributed erroneously to
|
||
authors of previous versions.
|
||
|
||
Some devices are designed to deny users access to install or run
|
||
modified versions of the software inside them, although the manufacturer
|
||
can do so. This is fundamentally incompatible with the aim of
|
||
protecting users' freedom to change the software. The systematic
|
||
pattern of such abuse occurs in the area of products for individuals to
|
||
use, which is precisely where it is most unacceptable. Therefore, we
|
||
have designed this version of the GPL to prohibit the practice for those
|
||
products. If such problems arise substantially in other domains, we
|
||
stand ready to extend this provision to those domains in future versions
|
||
of the GPL, as needed to protect the freedom of users.
|
||
|
||
Finally, every program is threatened constantly by software patents.
|
||
States should not allow patents to restrict development and use of
|
||
software on general-purpose computers, but in those that do, we wish to
|
||
avoid the special danger that patents applied to a free program could
|
||
make it effectively proprietary. To prevent this, the GPL assures that
|
||
patents cannot be used to render the program non-free.
|
||
|
||
The precise terms and conditions for copying, distribution and
|
||
modification follow.
|
||
|
||
TERMS AND CONDITIONS
|
||
|
||
0. Definitions.
|
||
|
||
"This License" refers to version 3 of the GNU General Public License.
|
||
|
||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||
works, such as semiconductor masks.
|
||
|
||
"The Program" refers to any copyrightable work licensed under this
|
||
License. Each licensee is addressed as "you". "Licensees" and
|
||
"recipients" may be individuals or organizations.
|
||
|
||
To "modify" a work means to copy from or adapt all or part of the work
|
||
in a fashion requiring copyright permission, other than the making of an
|
||
exact copy. The resulting work is called a "modified version" of the
|
||
earlier work or a work "based on" the earlier work.
|
||
|
||
A "covered work" means either the unmodified Program or a work based
|
||
on the Program.
|
||
|
||
To "propagate" a work means to do anything with it that, without
|
||
permission, would make you directly or secondarily liable for
|
||
infringement under applicable copyright law, except executing it on a
|
||
computer or modifying a private copy. Propagation includes copying,
|
||
distribution (with or without modification), making available to the
|
||
public, and in some countries other activities as well.
|
||
|
||
To "convey" a work means any kind of propagation that enables other
|
||
parties to make or receive copies. Mere interaction with a user through
|
||
a computer network, with no transfer of a copy, is not conveying.
|
||
|
||
An interactive user interface displays "Appropriate Legal Notices"
|
||
to the extent that it includes a convenient and prominently visible
|
||
feature that (1) displays an appropriate copyright notice, and (2)
|
||
tells the user that there is no warranty for the work (except to the
|
||
extent that warranties are provided), that licensees may convey the
|
||
work under this License, and how to view a copy of this License. If
|
||
the interface presents a list of user commands or options, such as a
|
||
menu, a prominent item in the list meets this criterion.
|
||
|
||
1. Source Code.
|
||
|
||
The "source code" for a work means the preferred form of the work
|
||
for making modifications to it. "Object code" means any non-source
|
||
form of a work.
|
||
|
||
A "Standard Interface" means an interface that either is an official
|
||
standard defined by a recognized standards body, or, in the case of
|
||
interfaces specified for a particular programming language, one that
|
||
is widely used among developers working in that language.
|
||
|
||
The "System Libraries" of an executable work include anything, other
|
||
than the work as a whole, that (a) is included in the normal form of
|
||
packaging a Major Component, but which is not part of that Major
|
||
Component, and (b) serves only to enable use of the work with that
|
||
Major Component, or to implement a Standard Interface for which an
|
||
implementation is available to the public in source code form. A
|
||
"Major Component", in this context, means a major essential component
|
||
(kernel, window system, and so on) of the specific operating system
|
||
(if any) on which the executable work runs, or a compiler used to
|
||
produce the work, or an object code interpreter used to run it.
|
||
|
||
The "Corresponding Source" for a work in object code form means all
|
||
the source code needed to generate, install, and (for an executable
|
||
work) run the object code and to modify the work, including scripts to
|
||
control those activities. However, it does not include the work's
|
||
System Libraries, or general-purpose tools or generally available free
|
||
programs which are used unmodified in performing those activities but
|
||
which are not part of the work. For example, Corresponding Source
|
||
includes interface definition files associated with source files for
|
||
the work, and the source code for shared libraries and dynamically
|
||
linked subprograms that the work is specifically designed to require,
|
||
such as by intimate data communication or control flow between those
|
||
subprograms and other parts of the work.
|
||
|
||
The Corresponding Source need not include anything that users
|
||
can regenerate automatically from other parts of the Corresponding
|
||
Source.
|
||
|
||
The Corresponding Source for a work in source code form is that
|
||
same work.
|
||
|
||
2. Basic Permissions.
|
||
|
||
All rights granted under this License are granted for the term of
|
||
copyright on the Program, and are irrevocable provided the stated
|
||
conditions are met. This License explicitly affirms your unlimited
|
||
permission to run the unmodified Program. The output from running a
|
||
covered work is covered by this License only if the output, given its
|
||
content, constitutes a covered work. This License acknowledges your
|
||
rights of fair use or other equivalent, as provided by copyright law.
|
||
|
||
You may make, run and propagate covered works that you do not
|
||
convey, without conditions so long as your license otherwise remains
|
||
in force. You may convey covered works to others for the sole purpose
|
||
of having them make modifications exclusively for you, or provide you
|
||
with facilities for running those works, provided that you comply with
|
||
the terms of this License in conveying all material for which you do
|
||
not control copyright. Those thus making or running the covered works
|
||
for you must do so exclusively on your behalf, under your direction
|
||
and control, on terms that prohibit them from making any copies of
|
||
your copyrighted material outside their relationship with you.
|
||
|
||
Conveying under any other circumstances is permitted solely under
|
||
the conditions stated below. Sublicensing is not allowed; section 10
|
||
makes it unnecessary.
|
||
|
||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||
|
||
No covered work shall be deemed part of an effective technological
|
||
measure under any applicable law fulfilling obligations under article
|
||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||
similar laws prohibiting or restricting circumvention of such
|
||
measures.
|
||
|
||
When you convey a covered work, you waive any legal power to forbid
|
||
circumvention of technological measures to the extent such circumvention
|
||
is effected by exercising rights under this License with respect to
|
||
the covered work, and you disclaim any intention to limit operation or
|
||
modification of the work as a means of enforcing, against the work's
|
||
users, your or third parties' legal rights to forbid circumvention of
|
||
technological measures.
|
||
|
||
4. Conveying Verbatim Copies.
|
||
|
||
You may convey verbatim copies of the Program's source code as you
|
||
receive it, in any medium, provided that you conspicuously and
|
||
appropriately publish on each copy an appropriate copyright notice;
|
||
keep intact all notices stating that this License and any
|
||
non-permissive terms added in accord with section 7 apply to the code;
|
||
keep intact all notices of the absence of any warranty; and give all
|
||
recipients a copy of this License along with the Program.
|
||
|
||
You may charge any price or no price for each copy that you convey,
|
||
and you may offer support or warranty protection for a fee.
|
||
|
||
5. Conveying Modified Source Versions.
|
||
|
||
You may convey a work based on the Program, or the modifications to
|
||
produce it from the Program, in the form of source code under the
|
||
terms of section 4, provided that you also meet all of these conditions:
|
||
|
||
a) The work must carry prominent notices stating that you modified
|
||
it, and giving a relevant date.
|
||
|
||
b) The work must carry prominent notices stating that it is
|
||
released under this License and any conditions added under section
|
||
7. This requirement modifies the requirement in section 4 to
|
||
"keep intact all notices".
|
||
|
||
c) You must license the entire work, as a whole, under this
|
||
License to anyone who comes into possession of a copy. This
|
||
License will therefore apply, along with any applicable section 7
|
||
additional terms, to the whole of the work, and all its parts,
|
||
regardless of how they are packaged. This License gives no
|
||
permission to license the work in any other way, but it does not
|
||
invalidate such permission if you have separately received it.
|
||
|
||
d) If the work has interactive user interfaces, each must display
|
||
Appropriate Legal Notices; however, if the Program has interactive
|
||
interfaces that do not display Appropriate Legal Notices, your
|
||
work need not make them do so.
|
||
|
||
A compilation of a covered work with other separate and independent
|
||
works, which are not by their nature extensions of the covered work,
|
||
and which are not combined with it such as to form a larger program,
|
||
in or on a volume of a storage or distribution medium, is called an
|
||
"aggregate" if the compilation and its resulting copyright are not
|
||
used to limit the access or legal rights of the compilation's users
|
||
beyond what the individual works permit. Inclusion of a covered work
|
||
in an aggregate does not cause this License to apply to the other
|
||
parts of the aggregate.
|
||
|
||
6. Conveying Non-Source Forms.
|
||
|
||
You may convey a covered work in object code form under the terms
|
||
of sections 4 and 5, provided that you also convey the
|
||
machine-readable Corresponding Source under the terms of this License,
|
||
in one of these ways:
|
||
|
||
a) Convey the object code in, or embodied in, a physical product
|
||
(including a physical distribution medium), accompanied by the
|
||
Corresponding Source fixed on a durable physical medium
|
||
customarily used for software interchange.
|
||
|
||
b) Convey the object code in, or embodied in, a physical product
|
||
(including a physical distribution medium), accompanied by a
|
||
written offer, valid for at least three years and valid for as
|
||
long as you offer spare parts or customer support for that product
|
||
model, to give anyone who possesses the object code either (1) a
|
||
copy of the Corresponding Source for all the software in the
|
||
product that is covered by this License, on a durable physical
|
||
medium customarily used for software interchange, for a price no
|
||
more than your reasonable cost of physically performing this
|
||
conveying of source, or (2) access to copy the
|
||
Corresponding Source from a network server at no charge.
|
||
|
||
c) Convey individual copies of the object code with a copy of the
|
||
written offer to provide the Corresponding Source. This
|
||
alternative is allowed only occasionally and noncommercially, and
|
||
only if you received the object code with such an offer, in accord
|
||
with subsection 6b.
|
||
|
||
d) Convey the object code by offering access from a designated
|
||
place (gratis or for a charge), and offer equivalent access to the
|
||
Corresponding Source in the same way through the same place at no
|
||
further charge. You need not require recipients to copy the
|
||
Corresponding Source along with the object code. If the place to
|
||
copy the object code is a network server, the Corresponding Source
|
||
may be on a different server (operated by you or a third party)
|
||
that supports equivalent copying facilities, provided you maintain
|
||
clear directions next to the object code saying where to find the
|
||
Corresponding Source. Regardless of what server hosts the
|
||
Corresponding Source, you remain obligated to ensure that it is
|
||
available for as long as needed to satisfy these requirements.
|
||
|
||
e) Convey the object code using peer-to-peer transmission, provided
|
||
you inform other peers where the object code and Corresponding
|
||
Source of the work are being offered to the general public at no
|
||
charge under subsection 6d.
|
||
|
||
A separable portion of the object code, whose source code is excluded
|
||
from the Corresponding Source as a System Library, need not be
|
||
included in conveying the object code work.
|
||
|
||
A "User Product" is either (1) a "consumer product", which means any
|
||
tangible personal property which is normally used for personal, family,
|
||
or household purposes, or (2) anything designed or sold for incorporation
|
||
into a dwelling. In determining whether a product is a consumer product,
|
||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||
product received by a particular user, "normally used" refers to a
|
||
typical or common use of that class of product, regardless of the status
|
||
of the particular user or of the way in which the particular user
|
||
actually uses, or expects or is expected to use, the product. A product
|
||
is a consumer product regardless of whether the product has substantial
|
||
commercial, industrial or non-consumer uses, unless such uses represent
|
||
the only significant mode of use of the product.
|
||
|
||
"Installation Information" for a User Product means any methods,
|
||
procedures, authorization keys, or other information required to install
|
||
and execute modified versions of a covered work in that User Product from
|
||
a modified version of its Corresponding Source. The information must
|
||
suffice to ensure that the continued functioning of the modified object
|
||
code is in no case prevented or interfered with solely because
|
||
modification has been made.
|
||
|
||
If you convey an object code work under this section in, or with, or
|
||
specifically for use in, a User Product, and the conveying occurs as
|
||
part of a transaction in which the right of possession and use of the
|
||
User Product is transferred to the recipient in perpetuity or for a
|
||
fixed term (regardless of how the transaction is characterized), the
|
||
Corresponding Source conveyed under this section must be accompanied
|
||
by the Installation Information. But this requirement does not apply
|
||
if neither you nor any third party retains the ability to install
|
||
modified object code on the User Product (for example, the work has
|
||
been installed in ROM).
|
||
|
||
The requirement to provide Installation Information does not include a
|
||
requirement to continue to provide support service, warranty, or updates
|
||
for a work that has been modified or installed by the recipient, or for
|
||
the User Product in which it has been modified or installed. Access to a
|
||
network may be denied when the modification itself materially and
|
||
adversely affects the operation of the network or violates the rules and
|
||
protocols for communication across the network.
|
||
|
||
Corresponding Source conveyed, and Installation Information provided,
|
||
in accord with this section must be in a format that is publicly
|
||
documented (and with an implementation available to the public in
|
||
source code form), and must require no special password or key for
|
||
unpacking, reading or copying.
|
||
|
||
7. Additional Terms.
|
||
|
||
"Additional permissions" are terms that supplement the terms of this
|
||
License by making exceptions from one or more of its conditions.
|
||
Additional permissions that are applicable to the entire Program shall
|
||
be treated as though they were included in this License, to the extent
|
||
that they are valid under applicable law. If additional permissions
|
||
apply only to part of the Program, that part may be used separately
|
||
under those permissions, but the entire Program remains governed by
|
||
this License without regard to the additional permissions.
|
||
|
||
When you convey a copy of a covered work, you may at your option
|
||
remove any additional permissions from that copy, or from any part of
|
||
it. (Additional permissions may be written to require their own
|
||
removal in certain cases when you modify the work.) You may place
|
||
additional permissions on material, added by you to a covered work,
|
||
for which you have or can give appropriate copyright permission.
|
||
|
||
Notwithstanding any other provision of this License, for material you
|
||
add to a covered work, you may (if authorized by the copyright holders of
|
||
that material) supplement the terms of this License with terms:
|
||
|
||
a) Disclaiming warranty or limiting liability differently from the
|
||
terms of sections 15 and 16 of this License; or
|
||
|
||
b) Requiring preservation of specified reasonable legal notices or
|
||
author attributions in that material or in the Appropriate Legal
|
||
Notices displayed by works containing it; or
|
||
|
||
c) Prohibiting misrepresentation of the origin of that material, or
|
||
requiring that modified versions of such material be marked in
|
||
reasonable ways as different from the original version; or
|
||
|
||
d) Limiting the use for publicity purposes of names of licensors or
|
||
authors of the material; or
|
||
|
||
e) Declining to grant rights under trademark law for use of some
|
||
trade names, trademarks, or service marks; or
|
||
|
||
f) Requiring indemnification of licensors and authors of that
|
||
material by anyone who conveys the material (or modified versions of
|
||
it) with contractual assumptions of liability to the recipient, for
|
||
any liability that these contractual assumptions directly impose on
|
||
those licensors and authors.
|
||
|
||
All other non-permissive additional terms are considered "further
|
||
restrictions" within the meaning of section 10. If the Program as you
|
||
received it, or any part of it, contains a notice stating that it is
|
||
governed by this License along with a term that is a further
|
||
restriction, you may remove that term. If a license document contains
|
||
a further restriction but permits relicensing or conveying under this
|
||
License, you may add to a covered work material governed by the terms
|
||
of that license document, provided that the further restriction does
|
||
not survive such relicensing or conveying.
|
||
|
||
If you add terms to a covered work in accord with this section, you
|
||
must place, in the relevant source files, a statement of the
|
||
additional terms that apply to those files, or a notice indicating
|
||
where to find the applicable terms.
|
||
|
||
Additional terms, permissive or non-permissive, may be stated in the
|
||
form of a separately written license, or stated as exceptions;
|
||
the above requirements apply either way.
|
||
|
||
8. Termination.
|
||
|
||
You may not propagate or modify a covered work except as expressly
|
||
provided under this License. Any attempt otherwise to propagate or
|
||
modify it is void, and will automatically terminate your rights under
|
||
this License (including any patent licenses granted under the third
|
||
paragraph of section 11).
|
||
|
||
However, if you cease all violation of this License, then your
|
||
license from a particular copyright holder is reinstated (a)
|
||
provisionally, unless and until the copyright holder explicitly and
|
||
finally terminates your license, and (b) permanently, if the copyright
|
||
holder fails to notify you of the violation by some reasonable means
|
||
prior to 60 days after the cessation.
|
||
|
||
Moreover, your license from a particular copyright holder is
|
||
reinstated permanently if the copyright holder notifies you of the
|
||
violation by some reasonable means, this is the first time you have
|
||
received notice of violation of this License (for any work) from that
|
||
copyright holder, and you cure the violation prior to 30 days after
|
||
your receipt of the notice.
|
||
|
||
Termination of your rights under this section does not terminate the
|
||
licenses of parties who have received copies or rights from you under
|
||
this License. If your rights have been terminated and not permanently
|
||
reinstated, you do not qualify to receive new licenses for the same
|
||
material under section 10.
|
||
|
||
9. Acceptance Not Required for Having Copies.
|
||
|
||
You are not required to accept this License in order to receive or
|
||
run a copy of the Program. Ancillary propagation of a covered work
|
||
occurring solely as a consequence of using peer-to-peer transmission
|
||
to receive a copy likewise does not require acceptance. However,
|
||
nothing other than this License grants you permission to propagate or
|
||
modify any covered work. These actions infringe copyright if you do
|
||
not accept this License. Therefore, by modifying or propagating a
|
||
covered work, you indicate your acceptance of this License to do so.
|
||
|
||
10. Automatic Licensing of Downstream Recipients.
|
||
|
||
Each time you convey a covered work, the recipient automatically
|
||
receives a license from the original licensors, to run, modify and
|
||
propagate that work, subject to this License. You are not responsible
|
||
for enforcing compliance by third parties with this License.
|
||
|
||
An "entity transaction" is a transaction transferring control of an
|
||
organization, or substantially all assets of one, or subdividing an
|
||
organization, or merging organizations. If propagation of a covered
|
||
work results from an entity transaction, each party to that
|
||
transaction who receives a copy of the work also receives whatever
|
||
licenses to the work the party's predecessor in interest had or could
|
||
give under the previous paragraph, plus a right to possession of the
|
||
Corresponding Source of the work from the predecessor in interest, if
|
||
the predecessor has it or can get it with reasonable efforts.
|
||
|
||
You may not impose any further restrictions on the exercise of the
|
||
rights granted or affirmed under this License. For example, you may
|
||
not impose a license fee, royalty, or other charge for exercise of
|
||
rights granted under this License, and you may not initiate litigation
|
||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||
any patent claim is infringed by making, using, selling, offering for
|
||
sale, or importing the Program or any portion of it.
|
||
|
||
11. Patents.
|
||
|
||
A "contributor" is a copyright holder who authorizes use under this
|
||
License of the Program or a work on which the Program is based. The
|
||
work thus licensed is called the contributor's "contributor version".
|
||
|
||
A contributor's "essential patent claims" are all patent claims
|
||
owned or controlled by the contributor, whether already acquired or
|
||
hereafter acquired, that would be infringed by some manner, permitted
|
||
by this License, of making, using, or selling its contributor version,
|
||
but do not include claims that would be infringed only as a
|
||
consequence of further modification of the contributor version. For
|
||
purposes of this definition, "control" includes the right to grant
|
||
patent sublicenses in a manner consistent with the requirements of
|
||
this License.
|
||
|
||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||
patent license under the contributor's essential patent claims, to
|
||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||
propagate the contents of its contributor version.
|
||
|
||
In the following three paragraphs, a "patent license" is any express
|
||
agreement or commitment, however denominated, not to enforce a patent
|
||
(such as an express permission to practice a patent or covenant not to
|
||
sue for patent infringement). To "grant" such a patent license to a
|
||
party means to make such an agreement or commitment not to enforce a
|
||
patent against the party.
|
||
|
||
If you convey a covered work, knowingly relying on a patent license,
|
||
and the Corresponding Source of the work is not available for anyone
|
||
to copy, free of charge and under the terms of this License, through a
|
||
publicly available network server or other readily accessible means,
|
||
then you must either (1) cause the Corresponding Source to be so
|
||
available, or (2) arrange to deprive yourself of the benefit of the
|
||
patent license for this particular work, or (3) arrange, in a manner
|
||
consistent with the requirements of this License, to extend the patent
|
||
license to downstream recipients. "Knowingly relying" means you have
|
||
actual knowledge that, but for the patent license, your conveying the
|
||
covered work in a country, or your recipient's use of the covered work
|
||
in a country, would infringe one or more identifiable patents in that
|
||
country that you have reason to believe are valid.
|
||
|
||
If, pursuant to or in connection with a single transaction or
|
||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||
covered work, and grant a patent license to some of the parties
|
||
receiving the covered work authorizing them to use, propagate, modify
|
||
or convey a specific copy of the covered work, then the patent license
|
||
you grant is automatically extended to all recipients of the covered
|
||
work and works based on it.
|
||
|
||
A patent license is "discriminatory" if it does not include within
|
||
the scope of its coverage, prohibits the exercise of, or is
|
||
conditioned on the non-exercise of one or more of the rights that are
|
||
specifically granted under this License. You may not convey a covered
|
||
work if you are a party to an arrangement with a third party that is
|
||
in the business of distributing software, under which you make payment
|
||
to the third party based on the extent of your activity of conveying
|
||
the work, and under which the third party grants, to any of the
|
||
parties who would receive the covered work from you, a discriminatory
|
||
patent license (a) in connection with copies of the covered work
|
||
conveyed by you (or copies made from those copies), or (b) primarily
|
||
for and in connection with specific products or compilations that
|
||
contain the covered work, unless you entered into that arrangement,
|
||
or that patent license was granted, prior to 28 March 2007.
|
||
|
||
Nothing in this License shall be construed as excluding or limiting
|
||
any implied license or other defenses to infringement that may
|
||
otherwise be available to you under applicable patent law.
|
||
|
||
12. No Surrender of Others' Freedom.
|
||
|
||
If conditions are imposed on you (whether by court order, agreement or
|
||
otherwise) that contradict the conditions of this License, they do not
|
||
excuse you from the conditions of this License. If you cannot convey a
|
||
covered work so as to satisfy simultaneously your obligations under this
|
||
License and any other pertinent obligations, then as a consequence you may
|
||
not convey it at all. For example, if you agree to terms that obligate you
|
||
to collect a royalty for further conveying from those to whom you convey
|
||
the Program, the only way you could satisfy both those terms and this
|
||
License would be to refrain entirely from conveying the Program.
|
||
|
||
13. Use with the GNU Affero General Public License.
|
||
|
||
Notwithstanding any other provision of this License, you have
|
||
permission to link or combine any covered work with a work licensed
|
||
under version 3 of the GNU Affero General Public License into a single
|
||
combined work, and to convey the resulting work. The terms of this
|
||
License will continue to apply to the part which is the covered work,
|
||
but the special requirements of the GNU Affero General Public License,
|
||
section 13, concerning interaction through a network will apply to the
|
||
combination as such.
|
||
|
||
14. Revised Versions of this License.
|
||
|
||
The Free Software Foundation may publish revised and/or new versions of
|
||
the GNU General Public License from time to time. Such new versions will
|
||
be similar in spirit to the present version, but may differ in detail to
|
||
address new problems or concerns.
|
||
|
||
Each version is given a distinguishing version number. If the
|
||
Program specifies that a certain numbered version of the GNU General
|
||
Public License "or any later version" applies to it, you have the
|
||
option of following the terms and conditions either of that numbered
|
||
version or of any later version published by the Free Software
|
||
Foundation. If the Program does not specify a version number of the
|
||
GNU General Public License, you may choose any version ever published
|
||
by the Free Software Foundation.
|
||
|
||
If the Program specifies that a proxy can decide which future
|
||
versions of the GNU General Public License can be used, that proxy's
|
||
public statement of acceptance of a version permanently authorizes you
|
||
to choose that version for the Program.
|
||
|
||
Later license versions may give you additional or different
|
||
permissions. However, no additional obligations are imposed on any
|
||
author or copyright holder as a result of your choosing to follow a
|
||
later version.
|
||
|
||
15. Disclaimer of Warranty.
|
||
|
||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||
|
||
16. Limitation of Liability.
|
||
|
||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||
SUCH DAMAGES.
|
||
|
||
17. Interpretation of Sections 15 and 16.
|
||
|
||
If the disclaimer of warranty and limitation of liability provided
|
||
above cannot be given local legal effect according to their terms,
|
||
reviewing courts shall apply local law that most closely approximates
|
||
an absolute waiver of all civil liability in connection with the
|
||
Program, unless a warranty or assumption of liability accompanies a
|
||
copy of the Program in return for a fee.
|
||
|
||
END OF TERMS AND CONDITIONS
|
||
|
||
How to Apply These Terms to Your New Programs
|
||
|
||
If you develop a new program, and you want it to be of the greatest
|
||
possible use to the public, the best way to achieve this is to make it
|
||
free software which everyone can redistribute and change under these terms.
|
||
|
||
To do so, attach the following notices to the program. It is safest
|
||
to attach them to the start of each source file to most effectively
|
||
state the exclusion of warranty; and each file should have at least
|
||
the "copyright" line and a pointer to where the full notice is found.
|
||
|
||
<one line to give the program's name and a brief idea of what it does.>
|
||
Copyright (C) <year> <name of author>
|
||
|
||
This program is free software: you can redistribute it and/or modify
|
||
it under the terms of the GNU 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 General Public License for more details.
|
||
|
||
You should have received a copy of the GNU General Public License
|
||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
|
||
Also add information on how to contact you by electronic and paper mail.
|
||
|
||
If the program does terminal interaction, make it output a short
|
||
notice like this when it starts in an interactive mode:
|
||
|
||
<program> Copyright (C) <year> <name of author>
|
||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||
This is free software, and you are welcome to redistribute it
|
||
under certain conditions; type `show c' for details.
|
||
|
||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||
parts of the General Public License. Of course, your program's commands
|
||
might be different; for a GUI interface, you would use an "about box".
|
||
|
||
You should also get your employer (if you work as a programmer) or school,
|
||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||
For more information on this, and how to apply and follow the GNU GPL, see
|
||
<http://www.gnu.org/licenses/>.
|
||
|
||
The GNU General Public License does not permit incorporating your program
|
||
into proprietary programs. If your program is a subroutine library, you
|
||
may consider it more useful to permit linking proprietary applications with
|
||
the library. If this is what you want to do, use the GNU Lesser General
|
||
Public License instead of this License. But first, please read
|
||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||
|
||
This version of the GNU Lesser General Public License incorporates
|
||
the terms and conditions of version 3 of the GNU General Public
|
||
License, supplemented by the additional permissions listed below.
|
||
|
||
0. Additional Definitions.
|
||
|
||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||
General Public License.
|
||
|
||
"The Library" refers to a covered work governed by this License,
|
||
other than an Application or a Combined Work as defined below.
|
||
|
||
An "Application" is any work that makes use of an interface provided
|
||
by the Library, but which is not otherwise based on the Library.
|
||
Defining a subclass of a class defined by the Library is deemed a mode
|
||
of using an interface provided by the Library.
|
||
|
||
A "Combined Work" is a work produced by combining or linking an
|
||
Application with the Library. The particular version of the Library
|
||
with which the Combined Work was made is also called the "Linked
|
||
Version".
|
||
|
||
The "Minimal Corresponding Source" for a Combined Work means the
|
||
Corresponding Source for the Combined Work, excluding any source code
|
||
for portions of the Combined Work that, considered in isolation, are
|
||
based on the Application, and not on the Linked Version.
|
||
|
||
The "Corresponding Application Code" for a Combined Work means the
|
||
object code and/or source code for the Application, including any data
|
||
and utility programs needed for reproducing the Combined Work from the
|
||
Application, but excluding the System Libraries of the Combined Work.
|
||
|
||
1. Exception to Section 3 of the GNU GPL.
|
||
|
||
You may convey a covered work under sections 3 and 4 of this License
|
||
without being bound by section 3 of the GNU GPL.
|
||
|
||
2. Conveying Modified Versions.
|
||
|
||
If you modify a copy of the Library, and, in your modifications, a
|
||
facility refers to a function or data to be supplied by an Application
|
||
that uses the facility (other than as an argument passed when the
|
||
facility is invoked), then you may convey a copy of the modified
|
||
version:
|
||
|
||
a) under this License, provided that you make a good faith effort to
|
||
ensure that, in the event an Application does not supply the
|
||
function or data, the facility still operates, and performs
|
||
whatever part of its purpose remains meaningful, or
|
||
|
||
b) under the GNU GPL, with none of the additional permissions of
|
||
this License applicable to that copy.
|
||
|
||
3. Object Code Incorporating Material from Library Header Files.
|
||
|
||
The object code form of an Application may incorporate material from
|
||
a header file that is part of the Library. You may convey such object
|
||
code under terms of your choice, provided that, if the incorporated
|
||
material is not limited to numerical parameters, data structure
|
||
layouts and accessors, or small macros, inline functions and templates
|
||
(ten or fewer lines in length), you do both of the following:
|
||
|
||
a) Give prominent notice with each copy of the object code that the
|
||
Library is used in it and that the Library and its use are
|
||
covered by this License.
|
||
|
||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||
document.
|
||
|
||
4. Combined Works.
|
||
|
||
You may convey a Combined Work under terms of your choice that,
|
||
taken together, effectively do not restrict modification of the
|
||
portions of the Library contained in the Combined Work and reverse
|
||
engineering for debugging such modifications, if you also do each of
|
||
the following:
|
||
|
||
a) Give prominent notice with each copy of the Combined Work that
|
||
the Library is used in it and that the Library and its use are
|
||
covered by this License.
|
||
|
||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||
document.
|
||
|
||
c) For a Combined Work that displays copyright notices during
|
||
execution, include the copyright notice for the Library among
|
||
these notices, as well as a reference directing the user to the
|
||
copies of the GNU GPL and this license document.
|
||
|
||
d) Do one of the following:
|
||
|
||
0) Convey the Minimal Corresponding Source under the terms of this
|
||
License, and the Corresponding Application Code in a form
|
||
suitable for, and under terms that permit, the user to
|
||
recombine or relink the Application with a modified version of
|
||
the Linked Version to produce a modified Combined Work, in the
|
||
manner specified by section 6 of the GNU GPL for conveying
|
||
Corresponding Source.
|
||
|
||
1) Use a suitable shared library mechanism for linking with the
|
||
Library. A suitable mechanism is one that (a) uses at run time
|
||
a copy of the Library already present on the user's computer
|
||
system, and (b) will operate properly with a modified version
|
||
of the Library that is interface-compatible with the Linked
|
||
Version.
|
||
|
||
e) Provide Installation Information, but only if you would otherwise
|
||
be required to provide such information under section 6 of the
|
||
GNU GPL, and only to the extent that such information is
|
||
necessary to install and execute a modified version of the
|
||
Combined Work produced by recombining or relinking the
|
||
Application with a modified version of the Linked Version. (If
|
||
you use option 4d0, the Installation Information must accompany
|
||
the Minimal Corresponding Source and Corresponding Application
|
||
Code. If you use option 4d1, you must provide the Installation
|
||
Information in the manner specified by section 6 of the GNU GPL
|
||
for conveying Corresponding Source.)
|
||
|
||
5. Combined Libraries.
|
||
|
||
You may place library facilities that are a work based on the
|
||
Library side by side in a single library together with other library
|
||
facilities that are not Applications and are not covered by this
|
||
License, and convey such a combined library under terms of your
|
||
choice, if you do both of the following:
|
||
|
||
a) Accompany the combined library with a copy of the same work based
|
||
on the Library, uncombined with any other library facilities,
|
||
conveyed under the terms of this License.
|
||
|
||
b) Give prominent notice with the combined library that part of it
|
||
is a work based on the Library, and explaining where to find the
|
||
accompanying uncombined form of the same work.
|
||
|
||
6. Revised Versions of the GNU Lesser General Public License.
|
||
|
||
The Free Software Foundation may publish revised and/or new versions
|
||
of the GNU Lesser General Public License from time to time. Such new
|
||
versions will be similar in spirit to the present version, but may
|
||
differ in detail to address new problems or concerns.
|
||
|
||
Each version is given a distinguishing version number. If the
|
||
Library as you received it specifies that a certain numbered version
|
||
of the GNU Lesser General Public License "or any later version"
|
||
applies to it, you have the option of following the terms and
|
||
conditions either of that published version or of any later version
|
||
published by the Free Software Foundation. If the Library as you
|
||
received it does not specify a version number of the GNU Lesser
|
||
General Public License, you may choose any version of the GNU Lesser
|
||
General Public License ever published by the Free Software Foundation.
|
||
|
||
If the Library as you received it specifies that a proxy can decide
|
||
whether future versions of the GNU Lesser General Public License shall
|
||
apply, that proxy's public statement of acceptance of any version is
|
||
permanent authorization for you to choose that version for the
|
||
Library.
|
ALfA/ALfA-RMI/pom.xml | ||
---|---|---|
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>alfa-rmi</artifactId>
|
||
<version>1.99</version>
|
||
<version>2.0</version>
|
||
<packaging>jar</packaging>
|
||
|
||
<name>ALfA-RMI</name>
|
ALfA/ALfA-RMI/src/main/java/fr/unicaen/iota/application/rmi/AccessModule.java | ||
---|---|---|
package fr.unicaen.iota.application.rmi;
|
||
|
||
import fr.unicaen.iota.application.ALfA;
|
||
import fr.unicaen.iota.ds.model.TEventItem;
|
||
import fr.unicaen.iota.ds.model.TServiceType;
|
||
import fr.unicaen.iota.ds.model.DSEvent;
|
||
import fr.unicaen.iota.nu.ONSEntryType;
|
||
import fr.unicaen.iota.tau.model.Identity;
|
||
import java.rmi.RemoteException;
|
||
... | ... | |
}
|
||
|
||
@Override
|
||
public synchronized List<TEventItem> queryDS(Identity identity, String EPC, String DSAddress) throws RemoteException {
|
||
public synchronized List<DSEvent> queryDS(Identity identity, String EPC, String DSAddress) throws RemoteException {
|
||
return controler.queryDS(identity, EPC, DSAddress);
|
||
}
|
||
|
||
@Override
|
||
public synchronized List<TEventItem> queryDS(Identity identity, String EPC, String DSAddress, TServiceType serviceType) throws RemoteException {
|
||
public synchronized List<DSEvent> queryDS(Identity identity, String EPC, String DSAddress, ONSEntryType serviceType) throws RemoteException {
|
||
return controler.queryDS(identity, EPC, DSAddress, serviceType);
|
||
}
|
||
|
ALfA/ALfA-RMI/src/main/resources/application.properties | ||
---|---|---|
rmi-server-port = 1099
|
||
|
||
# ONS address or hostname
|
||
ons = localhost
|
||
ons-hosts = localhost
|
||
|
||
# ONS root domain (to construct FQDN from EPCs)
|
||
ons-domain-prefix = ons-peer.com.
|
||
... | ... | |
|
||
# nomenclature of the NAPTR fields
|
||
ons-epcis-entry = epc\\+epcis
|
||
ons-ided-epcis-entry = epc\\+ided_epcis
|
||
ons-ds-entry = epc\\+ds
|
||
ons-ided-ds-entry = epc\\+ided_ds
|
||
ons-html-entry = epc\\+html
|
||
ons-entry-regex = \\!\\^\\.\\*\\$\\!|\\!
|
ALfA/ALfA/pom.xml | ||
---|---|---|
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>alfa</artifactId>
|
||
<version>1.99</version>
|
||
<version>2.0</version>
|
||
<packaging>jar</packaging>
|
||
|
||
<name>ALfA</name>
|
ALfA/ALfA/src/main/java/fr/unicaen/iota/application/ALfA.java | ||
---|---|---|
import fr.unicaen.iota.application.operations.TraceEPC;
|
||
import fr.unicaen.iota.application.operations.TraceEPCAsync;
|
||
import fr.unicaen.iota.application.rmi.CallbackClient;
|
||
import fr.unicaen.iota.ds.model.TEventItem;
|
||
import fr.unicaen.iota.ds.model.TServiceType;
|
||
import fr.unicaen.iota.ds.model.DSEvent;
|
||
import fr.unicaen.iota.nu.ONSEntryType;
|
||
import fr.unicaen.iota.nu.ONSOperation;
|
||
import fr.unicaen.iota.tau.model.Identity;
|
||
... | ... | |
}
|
||
|
||
@Override
|
||
public List<TEventItem> queryDS(Identity identity, String EPC, String DSAddress) throws RemoteException {
|
||
public List<DSEvent> queryDS(Identity identity, String EPC, String DSAddress) throws RemoteException {
|
||
LOG.trace("[COMMAND]--[QUERY DS]");
|
||
DiscoveryOperation dsOperation = new DiscoveryOperation(identity, DSAddress, pksFilename, pksPassword, trustPksFilename, trustPksPassword);
|
||
List<TEventItem> list = dsOperation.getDSEvents(EPC);
|
||
List<DSEvent> list = dsOperation.getDSEvents(EPC);
|
||
return list;
|
||
}
|
||
|
||
@Override
|
||
public List<TEventItem> queryDS(Identity identity, String EPC, String DSAddress, TServiceType serviceType) throws RemoteException {
|
||
public List<DSEvent> queryDS(Identity identity, String EPC, String DSAddress, ONSEntryType serviceType) throws RemoteException {
|
||
LOG.trace("[COMMAND]--[QUERY DS]");
|
||
try {
|
||
DiscoveryOperation dsOperation = new DiscoveryOperation(identity, DSAddress, pksFilename, pksPassword, trustPksFilename, trustPksPassword);
|
||
List<TEventItem> list = dsOperation.getDSEvents(EPC, serviceType);
|
||
List<DSEvent> list = dsOperation.getDSEvents(EPC, serviceType);
|
||
return list;
|
||
} catch (Exception e) {
|
||
LOG.error(null, e);
|
ALfA/ALfA/src/main/java/fr/unicaen/iota/application/operations/DiscoveryOperation.java | ||
---|---|---|
package fr.unicaen.iota.application.operations;
|
||
|
||
import fr.unicaen.iota.application.rmi.CallbackClient;
|
||
import fr.unicaen.iota.discovery.client.util.EnhancedProtocolException;
|
||
import fr.unicaen.iota.ds.model.TEventItem;
|
||
import fr.unicaen.iota.ds.model.TServiceItem;
|
||
import fr.unicaen.iota.ds.model.TServiceType;
|
||
import fr.unicaen.iota.ds.model.DSEvent;
|
||
import fr.unicaen.iota.ds.soap.ImplementationExceptionResponse;
|
||
import fr.unicaen.iota.ds.soap.InternalExceptionResponse;
|
||
import fr.unicaen.iota.dseta.client.DSeTaClient;
|
||
import fr.unicaen.iota.dseta.soap.SecurityExceptionResponse;
|
||
import fr.unicaen.iota.nu.ONSEntryType;
|
||
import fr.unicaen.iota.tau.model.Identity;
|
||
import java.rmi.RemoteException;
|
||
import java.util.*;
|
||
import org.apache.axis2.databinding.types.URI.MalformedURIException;
|
||
import java.util.ArrayList;
|
||
import java.util.Collection;
|
||
import java.util.HashSet;
|
||
import java.util.List;
|
||
import java.util.Set;
|
||
import org.apache.commons.logging.Log;
|
||
import org.apache.commons.logging.LogFactory;
|
||
|
||
... | ... | |
private final CallbackClient client;
|
||
private final String sessionID;
|
||
private final Set<String> visitedSet = new HashSet<String>();
|
||
private final DSeTaClient dSClient;
|
||
private DSeTaClient dsetaClient;
|
||
|
||
public DiscoveryOperation(Identity identity, String ds_service_address, String pksFilename, String pksPassword, String trustPksFilename, String trustPksPassword) {
|
||
super();
|
||
... | ... | |
this.trustPksPassword = trustPksPassword;
|
||
this.client = null;
|
||
this.sessionID = null;
|
||
this.dSClient = new DSeTaClient(identity, DS_SERVICE_ADDRESS, pksFilename, pksPassword, trustPksFilename, trustPksPassword);
|
||
this.dsetaClient = new DSeTaClient(identity, DS_SERVICE_ADDRESS, pksFilename, pksPassword, trustPksFilename, trustPksPassword);
|
||
}
|
||
|
||
public DiscoveryOperation(Identity identity, String dsAddress, String pksFilename, String pksPassword, String trustPksFilename, String trustPksPassword, String sessionID, CallbackClient client) {
|
||
... | ... | |
this.trustPksPassword = trustPksPassword;
|
||
this.client = client;
|
||
this.sessionID = sessionID;
|
||
this.dSClient = new DSeTaClient(identity, DS_SERVICE_ADDRESS, pksFilename, pksPassword, trustPksFilename, trustPksPassword);
|
||
this.dsetaClient = new DSeTaClient(identity, DS_SERVICE_ADDRESS, pksFilename, pksPassword, trustPksFilename, trustPksPassword);
|
||
}
|
||
|
||
private List<TEventItem> getEvents(String EPC) throws RemoteException {
|
||
List<TEventItem> dsClientEventList;
|
||
private List<DSEvent> getEvents(String epc) throws RemoteException {
|
||
List<DSEvent> dsClientEventList;
|
||
try {
|
||
dsClientEventList = dSClient.eventLookup(EPC, null, null, null);
|
||
} catch (MalformedURIException ex) {
|
||
dsClientEventList = dsetaClient.eventLookup(epc, null, null, null, null, null);
|
||
} catch (ImplementationExceptionResponse ex) {
|
||
log.error("Unable to process eventLookup", ex);
|
||
throw new RemoteException("Unable to process eventLookup");
|
||
} catch (EnhancedProtocolException ex) {
|
||
} catch (InternalExceptionResponse ex) {
|
||
log.error("Unable to process eventLookup", ex);
|
||
throw new RemoteException("Unable to process eventLookup");
|
||
} catch (SecurityExceptionResponse ex) {
|
||
log.error("Unable to process eventLookup", ex);
|
||
throw new RemoteException("Unable to process eventLookup");
|
||
}
|
||
log.debug(EPC + " -> dsEvents in repository: " + dsClientEventList.size());
|
||
log.debug(epc + " -> dsEvents in repository: " + dsClientEventList.size());
|
||
return dsClientEventList;
|
||
}
|
||
|
||
public Set<String> discover(String EPC) {
|
||
public Set<String> discover(String epc) {
|
||
Set<String> result = discover(epc, DS_SERVICE_ADDRESS, DS_SERVICE_ADDRESS);
|
||
this.dsetaClient = new DSeTaClient(identity, DS_SERVICE_ADDRESS, pksFilename, pksPassword, trustPksFilename, trustPksPassword);
|
||
return result;
|
||
}
|
||
|
||
private Set<String> discover(String epc, String oldDSAddress, String dsAddress) {
|
||
Set<String> result = new HashSet<String>();
|
||
Collection<TEventItem> evtList;
|
||
Collection<DSEvent> evtList;
|
||
if (dsAddress == null || dsAddress.isEmpty()) {
|
||
return result;
|
||
}
|
||
else if (!dsAddress.equals(oldDSAddress) || dsetaClient == null) {
|
||
try {
|
||
dsetaClient = new DSeTaClient(identity, dsAddress, pksFilename, pksPassword, trustPksFilename, trustPksPassword);
|
||
} catch (Exception e) {
|
||
log.error(null, e);
|
||
return result;
|
||
}
|
||
}
|
||
try {
|
||
evtList = getEvents(EPC);
|
||
evtList = getEvents(epc);
|
||
} catch (RemoteException e) {
|
||
log.error(null, e);
|
||
return new HashSet<String>();
|
||
return result;
|
||
}
|
||
for (TEventItem evt : evtList) {
|
||
log.trace("Source found: " + evt.getP());
|
||
Collection<TServiceItem> serviceList = evt.getServiceList().getService();
|
||
log.trace(serviceList.size());
|
||
|
||
for (TServiceItem s : serviceList) {
|
||
log.trace(" PartnerID: " + evt.getP());
|
||
log.trace(" | service type: " + s.getType());
|
||
log.trace(" | service address: " + s.getUri());
|
||
// TODO: also handle TServiceType.DS (?)
|
||
if (s.getType() == TServiceType.IDED_DS) {
|
||
// TODO: Quick'n'dirty correction
|
||
String old_addr = DS_SERVICE_ADDRESS;
|
||
DS_SERVICE_ADDRESS = s.getUri().toString();
|
||
result.addAll(discover(EPC));
|
||
DS_SERVICE_ADDRESS = old_addr;
|
||
} else if (s.getType() == TServiceType.IDED_EPCIS) {
|
||
result.add(s.getUri().toString());
|
||
if (client != null && !visitedSet.contains(s.getUri().toString())) {
|
||
new EpcisRequest(s.getUri().toString(), pksFilename, pksPassword, trustPksFilename, trustPksPassword, EPC, identity, sessionID, client).start();
|
||
visitedSet.add(s.getUri().toString());
|
||
}
|
||
} // else: do nothing
|
||
for (DSEvent evt : evtList) {
|
||
// TODO: also handle TServiceType.DS (?)
|
||
if (ONSEntryType.ided_ds.name().equals(evt.getServiceType())) {
|
||
// TODO: Quick'n'dirty correction
|
||
result.addAll(discover(epc, dsAddress, evt.getServiceAddress()));
|
||
}
|
||
else if (ONSEntryType.ided_epcis.name().equals(evt.getServiceType())) {
|
||
result.add(evt.getServiceAddress());
|
||
if (client != null && !visitedSet.contains(evt.getServiceAddress())) {
|
||
new EpcisRequest(evt.getServiceAddress(), pksFilename, pksPassword, trustPksFilename, trustPksPassword, epc, identity, sessionID, client).start();
|
||
visitedSet.add(evt.getServiceAddress());
|
||
}
|
||
} // else: do nothing
|
||
}
|
||
return result;
|
||
}
|
||
|
||
public List<TEventItem> getDSEvents(String EPC) throws RemoteException {
|
||
List<TEventItem> result = new ArrayList<TEventItem>();
|
||
for (TEventItem dsClientEvent : getEvents(EPC)) {
|
||
TServiceItem first = dsClientEvent.getServiceList().getService().get(0);
|
||
log.debug(EPC + " | partnerID: " + first.getId());
|
||
log.debug(EPC + " | partner info size: " + dsClientEvent.getServiceList().getService().size());
|
||
log.debug(EPC + " | partner type: " + first.getType());
|
||
result.add(dsClientEvent);
|
||
public List<DSEvent> getDSEvents(String epc) throws RemoteException {
|
||
List<DSEvent> result = new ArrayList<DSEvent>();
|
||
for (DSEvent event : getEvents(epc)) {
|
||
result.add(event);
|
||
}
|
||
log.debug(epc + " -> dsEvents with corresponding type: " + result.size());
|
||
return result;
|
||
}
|
||
|
||
public List<TEventItem> getDSEvents(String EPC, TServiceType serviceType) throws RemoteException {
|
||
List<TEventItem> result = new ArrayList<TEventItem>();
|
||
for (TEventItem dsClientEvent : getEvents(EPC)) {
|
||
if (!dsClientEvent.getServiceList().getService().isEmpty()) {
|
||
TServiceItem firstService = dsClientEvent.getServiceList().getService().get(0);
|
||
log.debug(EPC + " | partnerID:" + firstService.getId());
|
||
log.debug(EPC + " | partner info size:" + dsClientEvent.getServiceList().getService().size());
|
||
log.debug(EPC + " | partner type: " + firstService.getType());
|
||
if (firstService.getType() == serviceType) {
|
||
result.add(dsClientEvent);
|
||
}
|
||
public List<DSEvent> getDSEvents(String epc, ONSEntryType serviceType) throws RemoteException {
|
||
List<DSEvent> result = new ArrayList<DSEvent>();
|
||
for (DSEvent event : getEvents(epc)) {
|
||
if (event.getServiceType() != null && serviceType.name().equals(event.getServiceType())) {
|
||
result.add(event);
|
||
}
|
||
}
|
||
log.debug(EPC + " -> dsEvents with corresponding type: " + result.size());
|
||
log.debug(epc + " -> dsEvents with corresponding type: " + result.size());
|
||
return result;
|
||
}
|
||
}
|
ALfA/ALfA/src/main/java/fr/unicaen/iota/application/operations/TraceEPC.java | ||
---|---|---|
log.trace("nbr epc events: " + list.size());
|
||
Collection<EPCISEventType> children = epcisOperation.getAggregationEventFromEPC(EPC, filters);
|
||
eventList.addAll(children);
|
||
log.trace("nbr child events: " + children.size());
|
||
/*log.trace("nbr child events: " + children.size());
|
||
for (EPCISEventType o : children) {
|
||
AggregationEventType event = (AggregationEventType) o;
|
||
for (EPC childEpc : event.getChildEPCs().getEpc()) {
|
||
log.trace("new traceEPC: " + childEpc.getValue());
|
||
eventList.addAll(traceEPCAux(childEpc.getValue(), filters));
|
||
}
|
||
}
|
||
}*/
|
||
Collection<EPCISEventType> trans = epcisOperation.getTransactionEventFromEPC(EPC, filters);
|
||
eventList.addAll(trans);
|
||
for (EPCISEventType o : trans) {
|
||
/*for (EPCISEventType o : trans) {
|
||
TransactionEventType event = (TransactionEventType) o;
|
||
for (EPC childEpc : event.getEpcList().getEpc()) {
|
||
log.trace("new traceEPC: " + childEpc.getValue());
|
||
eventList.addAll(traceEPCAux(childEpc.getValue(), filters));
|
||
}
|
||
}
|
||
}*/
|
||
}
|
||
return eventList;
|
||
}
|
||
... | ... | |
List<EPCISEventType> children = epcisOperation.getAggregationEventFromEPC(EPC, filters);
|
||
addToMap(eventListByEPCIS, EPCIS_SERVICE_ADDRESS, children);
|
||
log.trace("nbr child events: " + children.size());
|
||
for (EPCISEventType o : children) {
|
||
/*for (EPCISEventType o : children) {
|
||
AggregationEventType event = (AggregationEventType) o;
|
||
for (EPC childEpc : event.getChildEPCs().getEpc()) {
|
||
log.trace("new traceEPC: " + childEpc.getValue());
|
||
Map<String, List<EPCISEventType>> agEventMap = traceEPCAuxByEPCIS(childEpc.getValue(), filters);
|
||
addToMap(eventListByEPCIS, agEventMap);
|
||
}
|
||
}
|
||
}*/
|
||
List<EPCISEventType> trans = epcisOperation.getTransactionEventFromEPC(EPC, filters);
|
||
addToMap(eventListByEPCIS, EPCIS_SERVICE_ADDRESS, trans);
|
||
for (EPCISEventType o : trans) {
|
||
/*for (EPCISEventType o : trans) {
|
||
TransactionEventType event = (TransactionEventType) o;
|
||
for (EPC childEpc : event.getEpcList().getEpc()) {
|
||
log.trace("new traceEPC: " + childEpc.getValue());
|
||
Map<String, List<EPCISEventType>> transEventMap = traceEPCAuxByEPCIS(childEpc.getValue(), filters);
|
||
addToMap(eventListByEPCIS, transEventMap);
|
||
}
|
||
}
|
||
}*/
|
||
}
|
||
return eventListByEPCIS;
|
||
}
|
ALfA/ALfA/src/main/resources/application.properties | ||
---|---|---|
rmi-server-port = 1099
|
||
|
||
# ONS address or hostname
|
||
ons = localhost
|
||
ons-hosts = localhost
|
||
|
||
# ONS root domain (to construct FQDN from EPCs)
|
||
ons-domain-prefix = ons-peer.com.
|
||
... | ... | |
|
||
# nomenclature of the NAPTR fields
|
||
ons-epcis-entry = epc\\+epcis
|
||
ons-ided-epcis-entry = epc\\+ided_epcis
|
||
ons-ds-entry = epc\\+ds
|
||
ons-ided-ds-entry = epc\\+ided_ds
|
||
ons-html-entry = epc\\+html
|
||
ons-entry-regex = \\!\\^\\.\\*\\$\\!|\\!
|
BETa/pom.xml | ||
---|---|---|
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>beta</artifactId>
|
||
<version>1.99</version>
|
||
<version>2.0</version>
|
||
<packaging>jar</packaging>
|
||
|
||
<name>BETa</name>
|
CaPPa/DS-Xi-Client/pom.xml | ||
---|---|---|
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>ds-xi-client</artifactId>
|
||
<version>1.99</version>
|
||
<version>2.0</version>
|
||
<packaging>jar</packaging>
|
||
|
||
<name>DS-Xi-Client</name>
|
||
... | ... | |
|
||
</build>
|
||
|
||
<!--
|
||
<repositories>
|
||
<repository>
|
||
<id>sunxacml-repository</id>
|
||
<name>sunxacml Repository</name>
|
||
<url>http://sourceforge.net/projects/sunxacml/files/maven/snapshots</url>
|
||
</repository>
|
||
</repositories>
|
||
-->
|
||
|
||
</project>
|
CaPPa/DS-Xi-Client/src/main/java/fr/unicaen/iota/xi/client/DSPEP.java | ||
---|---|---|
* process access control policy for the Hello method.
|
||
*
|
||
* @param userId connected user
|
||
* @param partnerId corresponding partnerId
|
||
* @param ownerId corresponding ownerId
|
||
* @param module Query, Capture or Admin
|
||
* @return
|
||
*/
|
||
@Override
|
||
public int hello(String userId, String partnerId, String module) {
|
||
public int hello(String userId, String ownerId, String module) {
|
||
log.trace("process hello policy for user: " + userId);
|
||
EventRequest eventRequest = new EventRequest(userId, "hello", partnerId, module);
|
||
return processXACMLRequest(eventRequest);
|
||
}
|
||
|
||
/**
|
||
* process access control policy for the partnerInfo method.
|
||
*
|
||
* @param userId connected user
|
||
* @param partnerId partner concerned by the request
|
||
* @return
|
||
*/
|
||
@Override
|
||
public int partnerInfo(String userId, String partnerId) {
|
||
log.trace("process partnerInfo policy for user: " + userId);
|
||
EventRequest eventRequest = new EventRequest(userId, "partnerInfo", partnerId, Module.queryModule.getValue());
|
||
EventRequest eventRequest = new EventRequest(userId, "hello", ownerId, module);
|
||
return processXACMLRequest(eventRequest);
|
||
}
|
||
|
||
... | ... | |
}
|
||
|
||
@Override
|
||
public int canBe(String userId, String partnerId) {
|
||
public int canBe(String userId, String ownerId) {
|
||
log.trace("process canBe policy for user: " + userId);
|
||
EventRequest eventRequest = new EventRequest(userId, "canBe", partnerId, Module.queryModule.getValue());
|
||
EventRequest eventRequest = new EventRequest(userId, "canBe", ownerId, Module.queryModule.getValue());
|
||
return processXACMLRequest(eventRequest);
|
||
}
|
||
|
||
... | ... | |
return processXACMLRequest(eventRequest);
|
||
}
|
||
|
||
@Override
|
||
public int voidEvent(String userId, XACMLDSEvent dsEvent) {
|
||
log.trace("process voidEvent policy for user: " + userId);
|
||
EventRequest eventRequest = new EventRequest(userId, "voidEvent", dsEvent, Module.captureModule.getValue());
|
||
return processXACMLRequest(eventRequest);
|
||
}
|
||
|
||
@Override
|
||
public int multipleEventCreate(String userId, XACMLDSEvent dsEvent) {
|
||
log.trace("process multipleEventCreate policy for user: " + userId);
|
||
... | ... | |
return processXACMLRequest(eventRequest);
|
||
}
|
||
|
||
public int userLookup(String userId, String partner) {
|
||
public int userLookup(String userId, String owner) {
|
||
log.trace("process userLookup policy for user: " + userId);
|
||
EventRequest eventRequest = new EventRequest(userId, "userLookup", partner, Module.administrationModule.getValue());
|
||
EventRequest eventRequest = new EventRequest(userId, "userLookup", owner, Module.administrationModule.getValue());
|
||
return processXACMLRequest(eventRequest);
|
||
}
|
||
|
||
public int userCreate(String userId, String partner) {
|
||
public int userCreate(String userId, String owner) {
|
||
log.trace("process userCreate policy for user: " + userId);
|
||
EventRequest eventRequest = new EventRequest(userId, "userCreate", partner, Module.administrationModule.getValue());
|
||
EventRequest eventRequest = new EventRequest(userId, "userCreate", owner, Module.administrationModule.getValue());
|
||
return processXACMLRequest(eventRequest);
|
||
}
|
||
|
||
public int userInfo(String userId, String partner) {
|
||
public int userInfo(String userId, String owner) {
|
||
log.trace("process userInfo policy for user: " + userId);
|
||
EventRequest eventRequest = new EventRequest(userId, "userInfo", partner, Module.administrationModule.getValue());
|
||
EventRequest eventRequest = new EventRequest(userId, "userInfo", owner, Module.administrationModule.getValue());
|
||
return processXACMLRequest(eventRequest);
|
||
}
|
||
|
||
public int userUpdate(String userId, String partner) {
|
||
public int userUpdate(String userId, String owner) {
|
||
log.trace("process userUpdate policy for user: " + userId);
|
||
EventRequest eventRequest = new EventRequest(userId, "userUpdate", partner, Module.administrationModule.getValue());
|
||
EventRequest eventRequest = new EventRequest(userId, "userUpdate", owner, Module.administrationModule.getValue());
|
||
return processXACMLRequest(eventRequest);
|
||
}
|
||
|
||
public int userDelete(String userId, String partner) {
|
||
public int userDelete(String userId, String owner) {
|
||
log.trace("process userDelete policy for user: " + userId);
|
||
EventRequest eventRequest = new EventRequest(userId, "userDelete", partner, Module.administrationModule.getValue());
|
||
EventRequest eventRequest = new EventRequest(userId, "userDelete", owner, Module.administrationModule.getValue());
|
||
return processXACMLRequest(eventRequest);
|
||
}
|
||
|
||
public int partnerUpdate(String userId, String partner) {
|
||
log.trace("process partnerUpdate policy for user: " + userId);
|
||
EventRequest eventRequest = new EventRequest(userId, "partnerUpdate", partner, Module.administrationModule.getValue());
|
||
public int ownerUpdate(String userId, String owner) {
|
||
log.trace("process ownerUpdate policy for user: " + userId);
|
||
EventRequest eventRequest = new EventRequest(userId, "ownerUpdate", owner, Module.administrationModule.getValue());
|
||
return processXACMLRequest(eventRequest);
|
||
}
|
||
|
||
public int partnerLookup(String userId, String partner) {
|
||
log.trace("process partnerLookup policy for user: " + userId);
|
||
EventRequest eventRequest = new EventRequest(userId, "partnerLookup", partner, Module.administrationModule.getValue());
|
||
public int ownerLookup(String userId, String owner) {
|
||
log.trace("process ownerLookup policy for user: " + userId);
|
||
EventRequest eventRequest = new EventRequest(userId, "ownerLookup", owner, Module.administrationModule.getValue());
|
||
return processXACMLRequest(eventRequest);
|
||
}
|
||
|
||
public int partnerDelete(String userId, String partner) {
|
||
log.trace("process partnerDelete policy for user: " + userId);
|
||
EventRequest eventRequest = new EventRequest(userId, "partnerDelete", partner, Module.administrationModule.getValue());
|
||
public int ownerDelete(String userId, String owner) {
|
||
log.trace("process ownerDelete policy for user: " + userId);
|
||
EventRequest eventRequest = new EventRequest(userId, "ownerDelete", owner, Module.administrationModule.getValue());
|
||
return processXACMLRequest(eventRequest);
|
||
}
|
||
|
||
public int partnerCreate(String userId, String partner) {
|
||
log.trace("process partnerCreate policy for user: " + userId);
|
||
EventRequest eventRequest = new EventRequest(userId, "partnerCreate", partner, Module.administrationModule.getValue());
|
||
public int ownerCreate(String userId, String owner) {
|
||
log.trace("process ownerCreate policy for user: " + userId);
|
||
EventRequest eventRequest = new EventRequest(userId, "ownerCreate", owner, Module.administrationModule.getValue());
|
||
return processXACMLRequest(eventRequest);
|
||
}
|
||
|
||
public boolean isRootAccess(String userId, String partnerId) {
|
||
public boolean isRootAccess(String userId, String ownerId) {
|
||
log.trace("process checkRootAccess policy for user: " + userId);
|
||
EventRequest eventRequest = new EventRequest(userId, "superadmin", partnerId, Module.administrationModule.getValue());
|
||
EventRequest eventRequest = new EventRequest(userId, "superadmin", ownerId, Module.administrationModule.getValue());
|
||
return processXACMLRequest(eventRequest) == Result.DECISION_PERMIT;
|
||
}
|
||
}
|
CaPPa/EPCIS-Xi-Client/pom.xml | ||
---|---|---|
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>epcis-xi-client</artifactId>
|
||
<version>1.99</version>
|
||
<version>2.0</version>
|
||
<packaging>jar</packaging>
|
||
|
||
<name>EPCIS-Xi-Client</name>
|
||
... | ... | |
|
||
</build>
|
||
|
||
<!--
|
||
<repositories>
|
||
<repository>
|
||
<id>sunxacml-repository</id>
|
||
<name>sunxacml Repository</name>
|
||
<url>http://sourceforge.net/projects/sunxacml/files/maven/snapshots</url>
|
||
</repository>
|
||
</repositories>
|
||
-->
|
||
|
||
</project>
|
CaPPa/EPCIS-Xi-Client/src/main/java/fr/unicaen/iota/xi/client/EPCISPEP.java | ||
---|---|---|
return processXACMLRequest(eventRequest);
|
||
}
|
||
|
||
@Override
|
||
public int subscribe(String userId, String partnerId) {
|
||
log.debug("process subscribe policy for user: " + userId);
|
||
EventRequest eventRequest = new EventRequest(userId, "subscribe", partnerId, Module.queryModule.getValue());
|
||
return processXACMLRequest(eventRequest);
|
||
}
|
||
|
||
@Override
|
||
public int unsubscribe(String userId, String partnerId) {
|
||
log.debug("process unsubscribe policy for user: " + userId);
|
||
EventRequest eventRequest = new EventRequest(userId, "unsubscribe", partnerId, Module.queryModule.getValue());
|
||
return processXACMLRequest(eventRequest);
|
||
}
|
||
|
||
@Override
|
||
public int canBe(String userId, String partnerId) {
|
||
log.debug("process canBe policy for user: " + userId);
|
||
... | ... | |
|
||
@Override
|
||
public int captureMasterData(String userId, XACMLEPCISMasterData epcisMasterData) {
|
||
log.debug("process captureMasterDataEvent policy for user: " + userId);
|
||
EventRequest eventRequest = new EventRequest(userId, "captureMasterDataEvent", epcisMasterData, Module.captureModule.getValue());
|
||
log.debug("process captureMasterData policy for user: " + userId);
|
||
EventRequest eventRequest = new EventRequest(userId, "captureMasterData", epcisMasterData, Module.captureModule.getValue());
|
||
return processXACMLRequest(eventRequest);
|
||
}
|
||
|
DELTa/pom.xml | ||
---|---|---|
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>delta</artifactId>
|
||
<version>1.99</version>
|
||
<version>2.0</version>
|
||
<packaging>jar</packaging>
|
||
|
||
<name>DELTa</name>
|
DS/DS-Client/LICENSE | ||
---|---|---|
GNU LESSER GENERAL PUBLIC LICENSE
|
||
Version 3, 29 June 2007
|
||
|
||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||
Everyone is permitted to copy and distribute verbatim copies
|
||
of this license document, but changing it is not allowed.
|
||
|
||
|
||
This version of the GNU Lesser General Public License incorporates
|
||
the terms and conditions of version 3 of the GNU General Public
|
||
License, supplemented by the additional permissions listed below.
|
||
|
||
0. Additional Definitions.
|
||
|
||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||
General Public License.
|
||
|
||
"The Library" refers to a covered work governed by this License,
|
||
other than an Application or a Combined Work as defined below.
|
||
|
||
An "Application" is any work that makes use of an interface provided
|
||
by the Library, but which is not otherwise based on the Library.
|
||
Defining a subclass of a class defined by the Library is deemed a mode
|
||
of using an interface provided by the Library.
|
||
|
||
A "Combined Work" is a work produced by combining or linking an
|
||
Application with the Library. The particular version of the Library
|
||
with which the Combined Work was made is also called the "Linked
|
||
Version".
|
||
|
||
The "Minimal Corresponding Source" for a Combined Work means the
|
||
Corresponding Source for the Combined Work, excluding any source code
|
||
for portions of the Combined Work that, considered in isolation, are
|
||
based on the Application, and not on the Linked Version.
|
||
|
||
The "Corresponding Application Code" for a Combined Work means the
|
||
object code and/or source code for the Application, including any data
|
||
and utility programs needed for reproducing the Combined Work from the
|
||
Application, but excluding the System Libraries of the Combined Work.
|
||
|
||
1. Exception to Section 3 of the GNU GPL.
|
||
|
||
You may convey a covered work under sections 3 and 4 of this License
|
||
without being bound by section 3 of the GNU GPL.
|
||
|
||
2. Conveying Modified Versions.
|
||
|
||
If you modify a copy of the Library, and, in your modifications, a
|
||
facility refers to a function or data to be supplied by an Application
|
||
that uses the facility (other than as an argument passed when the
|
||
facility is invoked), then you may convey a copy of the modified
|
||
version:
|
||
|
||
a) under this License, provided that you make a good faith effort to
|
||
ensure that, in the event an Application does not supply the
|
||
function or data, the facility still operates, and performs
|
||
whatever part of its purpose remains meaningful, or
|
||
|
||
b) under the GNU GPL, with none of the additional permissions of
|
||
this License applicable to that copy.
|
||
|
||
3. Object Code Incorporating Material from Library Header Files.
|
||
|
||
The object code form of an Application may incorporate material from
|
||
a header file that is part of the Library. You may convey such object
|
||
code under terms of your choice, provided that, if the incorporated
|
||
material is not limited to numerical parameters, data structure
|
||
layouts and accessors, or small macros, inline functions and templates
|
||
(ten or fewer lines in length), you do both of the following:
|
||
|
||
a) Give prominent notice with each copy of the object code that the
|
||
Library is used in it and that the Library and its use are
|
||
covered by this License.
|
||
|
||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||
document.
|
||
|
||
4. Combined Works.
|
||
|
||
You may convey a Combined Work under terms of your choice that,
|
||
taken together, effectively do not restrict modification of the
|
||
portions of the Library contained in the Combined Work and reverse
|
||
engineering for debugging such modifications, if you also do each of
|
||
the following:
|
||
|
||
a) Give prominent notice with each copy of the Combined Work that
|
||
the Library is used in it and that the Library and its use are
|
||
covered by this License.
|
||
|
||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||
document.
|
||
|
||
c) For a Combined Work that displays copyright notices during
|
||
execution, include the copyright notice for the Library among
|
||
these notices, as well as a reference directing the user to the
|
||
copies of the GNU GPL and this license document.
|
||
|
||
d) Do one of the following:
|
||
|
||
0) Convey the Minimal Corresponding Source under the terms of this
|
||
License, and the Corresponding Application Code in a form
|
||
suitable for, and under terms that permit, the user to
|
||
recombine or relink the Application with a modified version of
|
||
the Linked Version to produce a modified Combined Work, in the
|
||
manner specified by section 6 of the GNU GPL for conveying
|
||
Corresponding Source.
|
||
|
||
1) Use a suitable shared library mechanism for linking with the
|
||
Library. A suitable mechanism is one that (a) uses at run time
|
||
a copy of the Library already present on the user's computer
|
||
system, and (b) will operate properly with a modified version
|
||
of the Library that is interface-compatible with the Linked
|
||
Version.
|
||
|
||
e) Provide Installation Information, but only if you would otherwise
|
||
be required to provide such information under section 6 of the
|
||
GNU GPL, and only to the extent that such information is
|
||
necessary to install and execute a modified version of the
|
||
Combined Work produced by recombining or relinking the
|
||
Application with a modified version of the Linked Version. (If
|
||
you use option 4d0, the Installation Information must accompany
|
||
the Minimal Corresponding Source and Corresponding Application
|
||
Code. If you use option 4d1, you must provide the Installation
|
||
Information in the manner specified by section 6 of the GNU GPL
|
||
for conveying Corresponding Source.)
|
||
|
||
5. Combined Libraries.
|
||
|
||
You may place library facilities that are a work based on the
|
||
Library side by side in a single library together with other library
|
||
facilities that are not Applications and are not covered by this
|
||
License, and convey such a combined library under terms of your
|
||
choice, if you do both of the following:
|
||
|
||
a) Accompany the combined library with a copy of the same work based
|
||
on the Library, uncombined with any other library facilities,
|
||
conveyed under the terms of this License.
|
||
|
||
b) Give prominent notice with the combined library that part of it
|
||
is a work based on the Library, and explaining where to find the
|
||
accompanying uncombined form of the same work.
|
||
|
||
6. Revised Versions of the GNU Lesser General Public License.
|
||
|
||
The Free Software Foundation may publish revised and/or new versions
|
||
of the GNU Lesser General Public License from time to time. Such new
|
||
versions will be similar in spirit to the present version, but may
|
||
differ in detail to address new problems or concerns.
|
||
|
||
Each version is given a distinguishing version number. If the
|
||
Library as you received it specifies that a certain numbered version
|
||
of the GNU Lesser General Public License "or any later version"
|
||
applies to it, you have the option of following the terms and
|
||
conditions either of that published version or of any later version
|
||
published by the Free Software Foundation. If the Library as you
|
||
received it does not specify a version number of the GNU Lesser
|
||
General Public License, you may choose any version of the GNU Lesser
|
||
General Public License ever published by the Free Software Foundation.
|
||
|
||
If the Library as you received it specifies that a proxy can decide
|
||
whether future versions of the GNU Lesser General Public License shall
|
||
apply, that proxy's public statement of acceptance of any version is
|
||
permanent authorization for you to choose that version for the
|
||
Library.
|
DS/DS-Client/LISEZMOI | ||
---|---|---|
DS-Client
|
||
|
||
Bibliothèque client pour l’interfaçage avec le web service DS de IoTa.
|
||
|
||
Dépendances:
|
||
bibliothèques:
|
||
- cxf
|
||
- commons-logging
|
||
|
||
Dépendances d’utilisation:
|
||
- un DS
|
||
|
||
Utilisation:
|
||
voir ALfA ou EpcILoN pour des exemples
|
DS/DS-Client/README | ||
---|---|---|
DS-Client
|
||
|
||
Common library for interfacing with the IoTa DS web service.
|
||
|
||
Dependencies:
|
||
libraries:
|
||
- cxf
|
||
- commons-logging
|
||
|
||
Usage Dependencies:
|
||
- a DS
|
||
|
||
Usage:
|
||
see ALfA or EpcILoN for examples
|
DS/DS-Client/pom.xml | ||
---|---|---|
<?xml version="1.0" encoding="utf-8"?>
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||
<modelVersion>4.0.0</modelVersion>
|
||
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>ds-client</artifactId>
|
||
<version>2.0</version>
|
||
<packaging>jar</packaging>
|
||
|
||
<name>DS-Client</name>
|
||
|
||
<properties>
|
||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||
<lib-cxf-version>2.7.5</lib-cxf-version>
|
||
</properties>
|
||
|
||
<dependencies>
|
||
|
||
<!-- CXF dependencies -->
|
||
<dependency>
|
||
<groupId>org.apache.cxf</groupId>
|
||
<artifactId>cxf-rt-frontend-jaxws</artifactId>
|
||
<version>${lib-cxf-version}</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>org.apache.cxf</groupId>
|
||
<artifactId>cxf-rt-transports-http</artifactId>
|
||
<version>${lib-cxf-version}</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>org.apache.cxf</groupId>
|
||
<artifactId>cxf-rt-transports-local</artifactId>
|
||
<version>${lib-cxf-version}</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>org.apache.cxf</groupId>
|
||
<artifactId>cxf-rt-databinding-jaxb</artifactId>
|
||
<version>${lib-cxf-version}</version>
|
||
</dependency>
|
||
|
||
<!-- Log dependencies -->
|
||
<dependency>
|
||
<groupId>commons-logging</groupId>
|
||
<artifactId>commons-logging</artifactId>
|
||
<version>1.1.1</version>
|
||
</dependency>
|
||
|
||
</dependencies>
|
||
|
||
<build>
|
||
|
||
<plugins>
|
||
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-compiler-plugin</artifactId>
|
||
<version>2.5.1</version>
|
||
<configuration>
|
||
<source>1.6</source>
|
||
<target>1.6</target>
|
||
</configuration>
|
||
</plugin>
|
||
|
||
<plugin>
|
||
<groupId>org.apache.cxf</groupId>
|
||
<artifactId>cxf-codegen-plugin</artifactId>
|
||
<version>${lib-cxf-version}</version>
|
||
<executions>
|
||
<execution>
|
||
<id>generate-sources</id>
|
||
<phase>generate-sources</phase>
|
||
<configuration>
|
||
<sourceRoot>${project.build.directory}/generated-sources/cxf</sourceRoot>
|
||
<wsdlOptions>
|
||
<wsdlOption>
|
||
<packagenames>
|
||
<packagename>urn:unicaen:iota:ds:xsd=fr.unicaen.iota.ds.model</packagename>
|
||
<packagename>urn:unicaen:iota:ds:wsdl=fr.unicaen.iota.ds.soap</packagename>
|
||
</packagenames>
|
||
<wsdl>${basedir}/src/main/resources/wsdl/ds.wsdl</wsdl>
|
||
</wsdlOption>
|
||
</wsdlOptions>
|
||
</configuration>
|
||
<goals>
|
||
<goal>wsdl2java</goal>
|
||
</goals>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-assembly-plugin</artifactId>
|
||
<version>2.3</version>
|
||
<executions>
|
||
<execution>
|
||
<id>sources</id>
|
||
<phase>package</phase>
|
||
<goals>
|
||
<goal>single</goal>
|
||
</goals>
|
||
<configuration>
|
||
<descriptorRefs>
|
||
<descriptorRef>src</descriptorRef>
|
||
</descriptorRefs>
|
||
</configuration>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
|
||
</plugins>
|
||
|
||
</build>
|
||
|
||
</project>
|
DS/DS-Client/src/main/java/fr/unicaen/iota/ds/client/DSClient.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa Project.
|
||
*
|
||
* Copyright © 2013 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.ds.client;
|
||
|
||
import fr.unicaen.iota.ds.model.DSEvent;
|
||
import fr.unicaen.iota.ds.model.EventCreateReq;
|
||
import fr.unicaen.iota.ds.model.EventCreateResp;
|
||
import fr.unicaen.iota.ds.model.EventLookupReq;
|
||
import fr.unicaen.iota.ds.model.EventLookupResp;
|
||
import fr.unicaen.iota.ds.model.MultipleEventCreateReq;
|
||
import fr.unicaen.iota.ds.model.MultipleEventCreateResp;
|
||
import fr.unicaen.iota.ds.soap.DSService;
|
||
import fr.unicaen.iota.ds.soap.DSServicePortType;
|
||
import fr.unicaen.iota.ds.soap.ImplementationExceptionResponse;
|
||
import fr.unicaen.iota.ds.soap.InternalExceptionResponse;
|
||
import java.net.MalformedURLException;
|
||
import java.net.URL;
|
||
import java.util.List;
|
||
import javax.xml.datatype.XMLGregorianCalendar;
|
||
import org.apache.commons.logging.Log;
|
||
import org.apache.commons.logging.LogFactory;
|
||
import org.apache.cxf.endpoint.Client;
|
||
import org.apache.cxf.frontend.ClientProxy;
|
||
import org.apache.cxf.transport.http.HTTPConduit;
|
||
import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
|
||
|
||
|
||
public class DSClient {
|
||
|
||
private static final Log log = LogFactory.getLog(DSClient.class);
|
||
|
||
private DSServicePortType port;
|
||
|
||
public DSClient(String address) {
|
||
try {
|
||
this.configureService(address);
|
||
} catch (MalformedURLException ex) {
|
||
log.error(ex.getMessage(), ex);
|
||
} catch (Exception e) {
|
||
throw new RuntimeException("Can’t configure service: " + e.getMessage(), e);
|
||
}
|
||
}
|
||
|
||
public void configureService(String address) throws MalformedURLException, Exception {
|
||
URL wsdlUrl = new URL(address + "?wsdl");
|
||
DSService service = new DSService(wsdlUrl);
|
||
port = service.getPort(DSServicePortType.class);
|
||
|
||
// turn off chunked transfer encoding
|
||
Client client = ClientProxy.getClient(port);
|
||
HTTPConduit httpConduit = (HTTPConduit) client.getConduit();
|
||
HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
|
||
httpClientPolicy.setAllowChunking(false);
|
||
httpConduit.setClient(httpClientPolicy);
|
||
}
|
||
|
||
/**
|
||
* Sends the given DS event to the DS.
|
||
* @param epc The EPC of the event.
|
||
* @param eventType The type of the event.
|
||
* @param bizStep The business step of the event.
|
||
* @param eventTime The creation time of the event.
|
||
* @param serviceAddress The service address of the event.
|
||
* @param serviceType The type of the service.
|
||
* @return The response.
|
||
* @throws ImplementationExceptionResponse If this event could not be captured.
|
||
* @throws InternalExceptionResponse If a DS error occurred.
|
||
*/
|
||
public EventCreateResp eventCreate(String epc, String eventType, String bizStep, XMLGregorianCalendar eventTime,
|
||
String serviceAddress, String serviceType) throws ImplementationExceptionResponse, InternalExceptionResponse{
|
||
EventCreateReq eventCreate = new EventCreateReq();
|
||
DSEvent event = new DSEvent();
|
||
event.setEpc(epc);
|
||
event.setEventType(eventType);
|
||
event.setBizStep(bizStep);
|
||
event.setEventTime(eventTime);
|
||
event.setServiceAddress(serviceAddress);
|
||
event.setServiceType(serviceType);
|
||
eventCreate.setDsEvent(event);
|
||
return port.eventCreate(eventCreate);
|
||
}
|
||
|
||
/**
|
||
* Sends the given DS event to the DS.
|
||
* @param dsEvent The DS event to send.
|
||
* @return The response.
|
||
* @throws ImplementationExceptionResponse If this event could not be captured.
|
||
* @throws InternalExceptionResponse If a DS error occurred.
|
||
*/
|
||
public EventCreateResp eventCreate(DSEvent dsEvent) throws ImplementationExceptionResponse, InternalExceptionResponse{
|
||
EventCreateReq eventCreate = new EventCreateReq();
|
||
eventCreate.setDsEvent(dsEvent);
|
||
return port.eventCreate(eventCreate);
|
||
}
|
||
|
||
/**
|
||
* Sends the given list of DS events to the DS.
|
||
* @param dsEventList The list of DS events to send.
|
||
* @return The responses.
|
||
* @throws ImplementationExceptionResponse If these events could not be captured.
|
||
* @throws InternalExceptionResponse If a DS error occurred.
|
||
*/
|
||
public MultipleEventCreateResp multipleEventCreate(List<DSEvent> dsEventList) throws ImplementationExceptionResponse, InternalExceptionResponse{
|
||
MultipleEventCreateReq mEventCreateReq = new MultipleEventCreateReq();
|
||
mEventCreateReq.getDsEvent().addAll(dsEventList);
|
||
return port.multipleEventCreate(mEventCreateReq);
|
||
}
|
||
|
||
/**
|
||
* Performs a query to get DS events.
|
||
* @param epc The EPC to look up.
|
||
* @param eventType The event type to look up.
|
||
* @param bizStep The business step to look up.
|
||
* @param startingAt The lower time limit.
|
||
* @param endingAt The higher time limit.
|
||
* @param serviceType The type of the service.
|
||
* @return The list of DS events associated to the query.
|
||
* @throws ImplementationExceptionResponse If the query could not be performed.
|
||
* @throws InternalExceptionResponse If a DS error occurred.
|
||
*/
|
||
public EventLookupResp eventLookup(String epc, String eventType, String bizStep,
|
||
XMLGregorianCalendar startingAt, XMLGregorianCalendar endingAt, String serviceType)
|
||
throws ImplementationExceptionResponse, InternalExceptionResponse{
|
||
EventLookupReq eventLookupReq = new EventLookupReq();
|
||
eventLookupReq.setEpc(epc);
|
||
eventLookupReq.setEventType(eventType);
|
||
eventLookupReq.setBizStep(bizStep);
|
||
eventLookupReq.setStartingAt(startingAt);
|
||
eventLookupReq.setEndingAt(endingAt);
|
||
eventLookupReq.setServiceType(serviceType);
|
||
return port.eventLookup(eventLookupReq);
|
||
}
|
||
|
||
}
|
DS/DS-Client/src/main/resources/META-INF/LICENSE | ||
---|---|---|
GNU LESSER GENERAL PUBLIC LICENSE
|
||
Version 3, 29 June 2007
|
||
|
||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||
Everyone is permitted to copy and distribute verbatim copies
|
||
of this license document, but changing it is not allowed.
|
||
|
||
|
||
This version of the GNU Lesser General Public License incorporates
|
||
the terms and conditions of version 3 of the GNU General Public
|
||
License, supplemented by the additional permissions listed below.
|
||
|
||
0. Additional Definitions.
|
||
|
||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||
General Public License.
|
||
|
||
"The Library" refers to a covered work governed by this License,
|
||
other than an Application or a Combined Work as defined below.
|
||
|
||
An "Application" is any work that makes use of an interface provided
|
||
by the Library, but which is not otherwise based on the Library.
|
||
Defining a subclass of a class defined by the Library is deemed a mode
|
||
of using an interface provided by the Library.
|
||
|
||
A "Combined Work" is a work produced by combining or linking an
|
||
Application with the Library. The particular version of the Library
|
||
with which the Combined Work was made is also called the "Linked
|
||
Version".
|
||
|
||
The "Minimal Corresponding Source" for a Combined Work means the
|
||
Corresponding Source for the Combined Work, excluding any source code
|
||
for portions of the Combined Work that, considered in isolation, are
|
||
based on the Application, and not on the Linked Version.
|
||
|
||
The "Corresponding Application Code" for a Combined Work means the
|
||
object code and/or source code for the Application, including any data
|
||
and utility programs needed for reproducing the Combined Work from the
|
||
Application, but excluding the System Libraries of the Combined Work.
|
||
|
||
1. Exception to Section 3 of the GNU GPL.
|
||
|
||
You may convey a covered work under sections 3 and 4 of this License
|
||
without being bound by section 3 of the GNU GPL.
|
||
|
||
2. Conveying Modified Versions.
|
||
|
||
If you modify a copy of the Library, and, in your modifications, a
|
||
facility refers to a function or data to be supplied by an Application
|
||
that uses the facility (other than as an argument passed when the
|
||
facility is invoked), then you may convey a copy of the modified
|
||
version:
|
||
|
||
a) under this License, provided that you make a good faith effort to
|
||
ensure that, in the event an Application does not supply the
|
||
function or data, the facility still operates, and performs
|
||
whatever part of its purpose remains meaningful, or
|
||
|
||
b) under the GNU GPL, with none of the additional permissions of
|
||
this License applicable to that copy.
|
||
|
||
3. Object Code Incorporating Material from Library Header Files.
|
||
|
||
The object code form of an Application may incorporate material from
|
||
a header file that is part of the Library. You may convey such object
|
||
code under terms of your choice, provided that, if the incorporated
|
||
material is not limited to numerical parameters, data structure
|
||
layouts and accessors, or small macros, inline functions and templates
|
||
(ten or fewer lines in length), you do both of the following:
|
||
|
||
a) Give prominent notice with each copy of the object code that the
|
||
Library is used in it and that the Library and its use are
|
||
covered by this License.
|
||
|
||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||
document.
|
||
|
||
4. Combined Works.
|
||
|
||
You may convey a Combined Work under terms of your choice that,
|
||
taken together, effectively do not restrict modification of the
|
||
portions of the Library contained in the Combined Work and reverse
|
||
engineering for debugging such modifications, if you also do each of
|
||
the following:
|
||
|
||
a) Give prominent notice with each copy of the Combined Work that
|
||
the Library is used in it and that the Library and its use are
|
||
covered by this License.
|
||
|
||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||
document.
|
||
|
||
c) For a Combined Work that displays copyright notices during
|
||
execution, include the copyright notice for the Library among
|
||
these notices, as well as a reference directing the user to the
|
||
copies of the GNU GPL and this license document.
|
||
|
||
d) Do one of the following:
|
||
|
||
0) Convey the Minimal Corresponding Source under the terms of this
|
||
License, and the Corresponding Application Code in a form
|
||
suitable for, and under terms that permit, the user to
|
||
recombine or relink the Application with a modified version of
|
||
the Linked Version to produce a modified Combined Work, in the
|
||
manner specified by section 6 of the GNU GPL for conveying
|
||
Corresponding Source.
|
||
|
||
1) Use a suitable shared library mechanism for linking with the
|
||
Library. A suitable mechanism is one that (a) uses at run time
|
||
a copy of the Library already present on the user's computer
|
||
system, and (b) will operate properly with a modified version
|
||
of the Library that is interface-compatible with the Linked
|
||
Version.
|
||
|
||
e) Provide Installation Information, but only if you would otherwise
|
||
be required to provide such information under section 6 of the
|
||
GNU GPL, and only to the extent that such information is
|
||
necessary to install and execute a modified version of the
|
||
Combined Work produced by recombining or relinking the
|
||
Application with a modified version of the Linked Version. (If
|
||
you use option 4d0, the Installation Information must accompany
|
||
the Minimal Corresponding Source and Corresponding Application
|
||
Code. If you use option 4d1, you must provide the Installation
|
||
Information in the manner specified by section 6 of the GNU GPL
|
||
for conveying Corresponding Source.)
|
||
|
||
5. Combined Libraries.
|
||
|
||
You may place library facilities that are a work based on the
|
||
Library side by side in a single library together with other library
|
||
facilities that are not Applications and are not covered by this
|
||
License, and convey such a combined library under terms of your
|
||
choice, if you do both of the following:
|
||
|
||
a) Accompany the combined library with a copy of the same work based
|
||
on the Library, uncombined with any other library facilities,
|
||
conveyed under the terms of this License.
|
||
|
||
b) Give prominent notice with the combined library that part of it
|
||
is a work based on the Library, and explaining where to find the
|
||
accompanying uncombined form of the same work.
|
||
|
||
6. Revised Versions of the GNU Lesser General Public License.
|
||
|
||
The Free Software Foundation may publish revised and/or new versions
|
||
of the GNU Lesser General Public License from time to time. Such new
|
||
versions will be similar in spirit to the present version, but may
|
||
differ in detail to address new problems or concerns.
|
||
|
||
Each version is given a distinguishing version number. If the
|
||
Library as you received it specifies that a certain numbered version
|
||
of the GNU Lesser General Public License "or any later version"
|
||
applies to it, you have the option of following the terms and
|
||
conditions either of that published version or of any later version
|
||
published by the Free Software Foundation. If the Library as you
|
||
received it does not specify a version number of the GNU Lesser
|
||
General Public License, you may choose any version of the GNU Lesser
|
||
General Public License ever published by the Free Software Foundation.
|
||
|
||
If the Library as you received it specifies that a proxy can decide
|
||
whether future versions of the GNU Lesser General Public License shall
|
||
apply, that proxy's public statement of acceptance of any version is
|
||
permanent authorization for you to choose that version for the
|
||
Library.
|
DS/DS-Client/src/main/resources/wsdl/ds.wsdl | ||
---|---|---|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
||
<wsdl:definitions name="DSService"
|
||
targetNamespace="urn:unicaen:iota:ds:wsdl"
|
||
xmlns:wsoap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||
xmlns:dsw="urn:unicaen:iota:ds:wsdl"
|
||
xmlns:ds="urn:unicaen:iota:ds:xsd">
|
||
|
||
<wsdl:types>
|
||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||
<xs:import namespace="urn:unicaen:iota:ds:xsd" schemaLocation="ds.xsd"/>
|
||
</xs:schema>
|
||
</wsdl:types>
|
||
|
||
<wsdl:message name="eventCreateRequest">
|
||
<wsdl:part name="eventCreateReq" element="ds:eventCreateReq"/>
|
||
</wsdl:message>
|
||
|
||
<wsdl:message name="eventCreateResponse">
|
||
<wsdl:part name="eventCreateResp" element="ds:eventCreateResp"/>
|
||
</wsdl:message>
|
||
|
||
<wsdl:message name="multipleEventCreateRequest">
|
||
<wsdl:part name="multipleEventCreateReq" element="ds:multipleEventCreateReq"/>
|
||
</wsdl:message>
|
||
|
||
<wsdl:message name="multipleEventCreateResponse">
|
||
<wsdl:part name="multipleEventCreateResp" element="ds:multipleEventCreateResp"/>
|
||
</wsdl:message>
|
||
|
||
<wsdl:message name="eventLookupRequest">
|
||
<wsdl:part name="eventLookupReq" element="ds:eventLookupReq"/>
|
||
</wsdl:message>
|
||
|
||
<wsdl:message name="eventLookupResponse">
|
||
<wsdl:part name="eventLookResp" element="ds:eventLookupResp"/>
|
||
</wsdl:message>
|
||
|
||
<wsdl:message name="ImplementationExceptionResponse">
|
||
<wsdl:part name="fault" element="ds:ImplementationException"/>
|
||
</wsdl:message>
|
||
|
||
<wsdl:message name="InternalExceptionResponse">
|
||
<wsdl:part name="fault" element="ds:InternalException"/>
|
||
</wsdl:message>
|
||
|
||
<wsdl:portType name="DSServicePortType">
|
||
<wsdl:operation name="eventCreate">
|
||
<wsdl:input name="eventCreateRequest" message="dsw:eventCreateRequest"/>
|
||
<wsdl:output name="eventCreateResult" message="dsw:eventCreateResponse"/>
|
||
<wsdl:fault name="ImplementationExceptionFault" message="dsw:ImplementationExceptionResponse"/>
|
||
<wsdl:fault name="InternalExceptionFault" message="dsw:InternalExceptionResponse"/>
|
||
</wsdl:operation>
|
||
<wsdl:operation name="multipleEventCreate">
|
||
<wsdl:input name="multipleEventCreateRequest" message="dsw:multipleEventCreateRequest"/>
|
||
<wsdl:output name="multipleEventCreateResult" message="dsw:multipleEventCreateResponse"/>
|
||
<wsdl:fault name="ImplementationExceptionFault" message="dsw:ImplementationExceptionResponse"/>
|
||
<wsdl:fault name="InternalExceptionFault" message="dsw:InternalExceptionResponse"/>
|
||
</wsdl:operation>
|
||
<wsdl:operation name="eventLookup">
|
||
<wsdl:input name="eventLookupRequest" message="dsw:eventLookupRequest"/>
|
||
<wsdl:output name="eventLookupResult" message="dsw:eventLookupResponse"/>
|
||
<wsdl:fault name="ImplementationExceptionFault" message="dsw:ImplementationExceptionResponse"/>
|
||
<wsdl:fault name="InternalExceptionFault" message="dsw:InternalExceptionResponse"/>
|
||
</wsdl:operation>
|
||
</wsdl:portType>
|
||
|
||
<wsdl:binding name="DSBinding" type="dsw:DSServicePortType">
|
||
<wsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||
<wsdl:operation name="eventCreate">
|
||
<wsoap:operation/>
|
||
<wsdl:input>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:input>
|
||
<wsdl:output>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:output>
|
||
<wsdl:fault name="ImplementationExceptionFault">
|
||
<wsoap:fault name="ImplementationExceptionFault" use="literal"/>
|
||
</wsdl:fault>
|
||
<wsdl:fault name="InternalExceptionFault">
|
||
<wsoap:fault name="InternalExceptionFault" use="literal"/>
|
||
</wsdl:fault>
|
||
</wsdl:operation>
|
||
<wsdl:operation name="multipleEventCreate">
|
||
<wsoap:operation/>
|
||
<wsdl:input>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:input>
|
||
<wsdl:output>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:output>
|
||
<wsdl:fault name="ImplementationExceptionFault">
|
||
<wsoap:fault name="ImplementationExceptionFault" use="literal"/>
|
||
</wsdl:fault>
|
||
<wsdl:fault name="InternalExceptionFault">
|
||
<wsoap:fault name="InternalExceptionFault" use="literal"/>
|
||
</wsdl:fault>
|
||
</wsdl:operation>
|
||
<wsdl:operation name="eventLookup">
|
||
<wsoap:operation/>
|
||
<wsdl:input>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:input>
|
||
<wsdl:output>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:output>
|
||
<wsdl:fault name="ImplementationExceptionFault">
|
||
<wsoap:fault name="ImplementationExceptionFault" use="literal"/>
|
||
</wsdl:fault>
|
||
<wsdl:fault name="InternalExceptionFault">
|
||
<wsoap:fault name="InternalExceptionFault" use="literal"/>
|
||
</wsdl:fault>
|
||
</wsdl:operation>
|
||
</wsdl:binding>
|
||
|
||
<wsdl:service name="DSService">
|
||
<wsdl:port name="DSServiceServicePort" binding="dsw:DSBinding">
|
||
</wsdl:port>
|
||
</wsdl:service>
|
||
|
||
</wsdl:definitions>
|
DS/DS-Client/src/main/resources/wsdl/ds.xsd | ||
---|---|---|
<?xml version="1.0" encoding="UTF-8"?>
|
||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||
xmlns:ds="urn:unicaen:iota:ds:xsd"
|
||
targetNamespace="urn:unicaen:iota:ds:xsd"
|
||
elementFormDefault="unqualified" attributeFormDefault="unqualified">
|
||
|
||
<xs:simpleType name="createResponseType">
|
||
<xs:restriction base="xs:token">
|
||
<xs:enumeration value="createdNotPublished"/>
|
||
<xs:enumeration value="createdAndPublished"/>
|
||
<xs:enumeration value="notAdded"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:complexType name="DSEvent">
|
||
<xs:sequence>
|
||
<xs:element name="eventType" type="xs:token"/>
|
||
<xs:element name="epc" type="xs:token"/>
|
||
<xs:element name="bizStep" type="xs:token"/>
|
||
<xs:element name="eventTime" type="xs:dateTime"/>
|
||
<xs:element name="serviceAddress" type="xs:anyURI"/>
|
||
<xs:element name="serviceType" type="xs:token"/>
|
||
</xs:sequence>
|
||
</xs:complexType>
|
||
|
||
<xs:element name="eventCreateReq" type="ds:EventCreateReq"/>
|
||
<xs:complexType name="EventCreateReq">
|
||
<xs:sequence>
|
||
<xs:element name="dsEvent" type="ds:DSEvent"/>
|
||
</xs:sequence>
|
||
</xs:complexType>
|
||
|
||
<xs:element name="eventCreateResp" type="ds:EventCreateResp"/>
|
||
<xs:complexType name="EventCreateResp">
|
||
<xs:sequence>
|
||
<xs:element name="value" type="ds:createResponseType"/>
|
||
<xs:element name="message" type="xs:string" />
|
||
</xs:sequence>
|
||
</xs:complexType>
|
||
|
||
<xs:element name="multipleEventCreateReq" type="ds:MultipleEventCreateReq"/>
|
||
<xs:complexType name="MultipleEventCreateReq">
|
||
<xs:sequence>
|
||
<xs:element name="dsEvent" type="ds:DSEvent" minOccurs="0" maxOccurs="unbounded" />
|
||
</xs:sequence>
|
||
</xs:complexType>
|
||
|
||
<xs:element name="multipleEventCreateResp" type="ds:MultipleEventCreateResp"/>
|
||
<xs:complexType name="MultipleEventCreateResp">
|
||
<xs:sequence>
|
||
<xs:element name="result" type="ds:createResponseType"/>
|
||
<xs:element name="eventCreateResponses" type="ds:EventCreateResp" minOccurs="0" maxOccurs="unbounded" />
|
||
</xs:sequence>
|
||
</xs:complexType>
|
||
|
||
<xs:element name="eventLookupReq" type="ds:EventLookupReq"/>
|
||
<xs:complexType name="EventLookupReq">
|
||
<xs:sequence>
|
||
<xs:element name="epc" type="xs:token"/>
|
||
<xs:element name="eventType" type="xs:token" minOccurs="0" />
|
||
<xs:element name="bizStep" type="xs:token" minOccurs="0" />
|
||
<xs:element name="startingAt" type="xs:dateTime" minOccurs="0" />
|
||
<xs:element name="endingAt" type="xs:dateTime" minOccurs="0" />
|
||
<xs:element name="serviceType" type="xs:token" minOccurs="0" />
|
||
</xs:sequence>
|
||
</xs:complexType>
|
||
|
||
<xs:element name="eventLookupResp" type="ds:EventLookupResp"/>
|
||
<xs:complexType name="EventLookupResp">
|
||
<xs:sequence>
|
||
<xs:element name="dsEventList" type="ds:DSEvent" minOccurs="0" maxOccurs="unbounded" />
|
||
</xs:sequence>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="DSException">
|
||
<xs:sequence>
|
||
<xs:element name="reason" type="xs:string"/>
|
||
</xs:sequence>
|
||
</xs:complexType>
|
||
|
||
<xs:element name="ImplementationException" type="ds:ImplementationException"/>
|
||
<xs:complexType name="ImplementationException">
|
||
<xs:complexContent>
|
||
<xs:extension base="ds:DSException">
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:element name="InternalException" type="ds:InternalException"/>
|
||
<xs:complexType name="InternalException">
|
||
<xs:complexContent>
|
||
<xs:extension base="ds:DSException">
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
</xs:schema>
|
DS/DS-Commons/LICENSE | ||
---|---|---|
GNU GENERAL PUBLIC LICENSE
|
||
Version 3, 29 June 2007
|
||
|
||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||
Everyone is permitted to copy and distribute verbatim copies
|
||
of this license document, but changing it is not allowed.
|
||
|
||
Preamble
|
||
|
||
The GNU General Public License is a free, copyleft license for
|
||
software and other kinds of works.
|
||
|
||
The licenses for most software and other practical works are designed
|
||
to take away your freedom to share and change the works. By contrast,
|
||
the GNU General Public License is intended to guarantee your freedom to
|
||
share and change all versions of a program--to make sure it remains free
|
||
software for all its users. We, the Free Software Foundation, use the
|
||
GNU General Public License for most of our software; it applies also to
|
||
any other work released this way by its authors. You can apply it to
|
||
your programs, too.
|
||
|
||
When we speak of free software, we are referring to freedom, not
|
||
price. Our General Public Licenses are designed to make sure that you
|
||
have the freedom to distribute copies of free software (and charge for
|
||
them if you wish), that you receive source code or can get it if you
|
||
want it, that you can change the software or use pieces of it in new
|
||
free programs, and that you know you can do these things.
|
||
|
||
To protect your rights, we need to prevent others from denying you
|
||
these rights or asking you to surrender the rights. Therefore, you have
|
||
certain responsibilities if you distribute copies of the software, or if
|
||
you modify it: responsibilities to respect the freedom of others.
|
||
|
||
For example, if you distribute copies of such a program, whether
|
||
gratis or for a fee, you must pass on to the recipients the same
|
||
freedoms that you received. You must make sure that they, too, receive
|
||
or can get the source code. And you must show them these terms so they
|
||
know their rights.
|
||
|
||
Developers that use the GNU GPL protect your rights with two steps:
|
||
(1) assert copyright on the software, and (2) offer you this License
|
||
giving you legal permission to copy, distribute and/or modify it.
|
||
|
||
For the developers' and authors' protection, the GPL clearly explains
|
||
that there is no warranty for this free software. For both users' and
|
||
authors' sake, the GPL requires that modified versions be marked as
|
||
changed, so that their problems will not be attributed erroneously to
|
||
authors of previous versions.
|
||
|
||
Some devices are designed to deny users access to install or run
|
||
modified versions of the software inside them, although the manufacturer
|
||
can do so. This is fundamentally incompatible with the aim of
|
||
protecting users' freedom to change the software. The systematic
|
||
pattern of such abuse occurs in the area of products for individuals to
|
||
use, which is precisely where it is most unacceptable. Therefore, we
|
||
have designed this version of the GPL to prohibit the practice for those
|
||
products. If such problems arise substantially in other domains, we
|
||
stand ready to extend this provision to those domains in future versions
|
||
of the GPL, as needed to protect the freedom of users.
|
||
|
||
Finally, every program is threatened constantly by software patents.
|
||
States should not allow patents to restrict development and use of
|
||
software on general-purpose computers, but in those that do, we wish to
|
||
avoid the special danger that patents applied to a free program could
|
||
make it effectively proprietary. To prevent this, the GPL assures that
|
||
patents cannot be used to render the program non-free.
|
||
|
||
The precise terms and conditions for copying, distribution and
|
||
modification follow.
|
||
|
||
TERMS AND CONDITIONS
|
||
|
||
0. Definitions.
|
||
|
||
"This License" refers to version 3 of the GNU General Public License.
|
||
|
||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||
works, such as semiconductor masks.
|
||
|
||
"The Program" refers to any copyrightable work licensed under this
|
||
License. Each licensee is addressed as "you". "Licensees" and
|
||
"recipients" may be individuals or organizations.
|
||
|
||
To "modify" a work means to copy from or adapt all or part of the work
|
||
in a fashion requiring copyright permission, other than the making of an
|
||
exact copy. The resulting work is called a "modified version" of the
|
||
earlier work or a work "based on" the earlier work.
|
||
|
||
A "covered work" means either the unmodified Program or a work based
|
||
on the Program.
|
||
|
||
To "propagate" a work means to do anything with it that, without
|
||
permission, would make you directly or secondarily liable for
|
||
infringement under applicable copyright law, except executing it on a
|
||
computer or modifying a private copy. Propagation includes copying,
|
||
distribution (with or without modification), making available to the
|
||
public, and in some countries other activities as well.
|
||
|
||
To "convey" a work means any kind of propagation that enables other
|
||
parties to make or receive copies. Mere interaction with a user through
|
||
a computer network, with no transfer of a copy, is not conveying.
|
||
|
||
An interactive user interface displays "Appropriate Legal Notices"
|
||
to the extent that it includes a convenient and prominently visible
|
||
feature that (1) displays an appropriate copyright notice, and (2)
|
||
tells the user that there is no warranty for the work (except to the
|
||
extent that warranties are provided), that licensees may convey the
|
||
work under this License, and how to view a copy of this License. If
|
||
the interface presents a list of user commands or options, such as a
|
||
menu, a prominent item in the list meets this criterion.
|
||
|
||
1. Source Code.
|
||
|
||
The "source code" for a work means the preferred form of the work
|
||
for making modifications to it. "Object code" means any non-source
|
||
form of a work.
|
||
|
||
A "Standard Interface" means an interface that either is an official
|
||
standard defined by a recognized standards body, or, in the case of
|
||
interfaces specified for a particular programming language, one that
|
||
is widely used among developers working in that language.
|
||
|
||
The "System Libraries" of an executable work include anything, other
|
||
than the work as a whole, that (a) is included in the normal form of
|
||
packaging a Major Component, but which is not part of that Major
|
||
Component, and (b) serves only to enable use of the work with that
|
||
Major Component, or to implement a Standard Interface for which an
|
||
implementation is available to the public in source code form. A
|
||
"Major Component", in this context, means a major essential component
|
||
(kernel, window system, and so on) of the specific operating system
|
||
(if any) on which the executable work runs, or a compiler used to
|
||
produce the work, or an object code interpreter used to run it.
|
||
|
||
The "Corresponding Source" for a work in object code form means all
|
||
the source code needed to generate, install, and (for an executable
|
||
work) run the object code and to modify the work, including scripts to
|
||
control those activities. However, it does not include the work's
|
||
System Libraries, or general-purpose tools or generally available free
|
||
programs which are used unmodified in performing those activities but
|
||
which are not part of the work. For example, Corresponding Source
|
||
includes interface definition files associated with source files for
|
||
the work, and the source code for shared libraries and dynamically
|
||
linked subprograms that the work is specifically designed to require,
|
||
such as by intimate data communication or control flow between those
|
||
subprograms and other parts of the work.
|
||
|
||
The Corresponding Source need not include anything that users
|
||
can regenerate automatically from other parts of the Corresponding
|
||
Source.
|
||
|
||
The Corresponding Source for a work in source code form is that
|
||
same work.
|
||
|
||
2. Basic Permissions.
|
||
|
||
All rights granted under this License are granted for the term of
|
||
copyright on the Program, and are irrevocable provided the stated
|
||
conditions are met. This License explicitly affirms your unlimited
|
||
permission to run the unmodified Program. The output from running a
|
||
covered work is covered by this License only if the output, given its
|
||
content, constitutes a covered work. This License acknowledges your
|
||
rights of fair use or other equivalent, as provided by copyright law.
|
||
|
||
You may make, run and propagate covered works that you do not
|
||
convey, without conditions so long as your license otherwise remains
|
||
in force. You may convey covered works to others for the sole purpose
|
||
of having them make modifications exclusively for you, or provide you
|
||
with facilities for running those works, provided that you comply with
|
||
the terms of this License in conveying all material for which you do
|
||
not control copyright. Those thus making or running the covered works
|
||
for you must do so exclusively on your behalf, under your direction
|
||
and control, on terms that prohibit them from making any copies of
|
||
your copyrighted material outside their relationship with you.
|
||
|
||
Conveying under any other circumstances is permitted solely under
|
||
the conditions stated below. Sublicensing is not allowed; section 10
|
||
makes it unnecessary.
|
||
|
||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||
|
||
No covered work shall be deemed part of an effective technological
|
||
measure under any applicable law fulfilling obligations under article
|
||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||
similar laws prohibiting or restricting circumvention of such
|
||
measures.
|
||
|
||
When you convey a covered work, you waive any legal power to forbid
|
||
circumvention of technological measures to the extent such circumvention
|
||
is effected by exercising rights under this License with respect to
|
||
the covered work, and you disclaim any intention to limit operation or
|
||
modification of the work as a means of enforcing, against the work's
|
||
users, your or third parties' legal rights to forbid circumvention of
|
||
technological measures.
|
||
|
||
4. Conveying Verbatim Copies.
|
||
|
||
You may convey verbatim copies of the Program's source code as you
|
||
receive it, in any medium, provided that you conspicuously and
|
||
appropriately publish on each copy an appropriate copyright notice;
|
||
keep intact all notices stating that this License and any
|
||
non-permissive terms added in accord with section 7 apply to the code;
|
||
keep intact all notices of the absence of any warranty; and give all
|
||
recipients a copy of this License along with the Program.
|
||
|
||
You may charge any price or no price for each copy that you convey,
|
||
and you may offer support or warranty protection for a fee.
|
||
|
||
5. Conveying Modified Source Versions.
|
||
|
||
You may convey a work based on the Program, or the modifications to
|
||
produce it from the Program, in the form of source code under the
|
||
terms of section 4, provided that you also meet all of these conditions:
|
||
|
||
a) The work must carry prominent notices stating that you modified
|
||
it, and giving a relevant date.
|
||
|
||
b) The work must carry prominent notices stating that it is
|
||
released under this License and any conditions added under section
|
||
7. This requirement modifies the requirement in section 4 to
|
||
"keep intact all notices".
|
||
|
||
c) You must license the entire work, as a whole, under this
|
||
License to anyone who comes into possession of a copy. This
|
||
License will therefore apply, along with any applicable section 7
|
||
additional terms, to the whole of the work, and all its parts,
|
||
regardless of how they are packaged. This License gives no
|
||
permission to license the work in any other way, but it does not
|
||
invalidate such permission if you have separately received it.
|
||
|
||
d) If the work has interactive user interfaces, each must display
|
||
Appropriate Legal Notices; however, if the Program has interactive
|
||
interfaces that do not display Appropriate Legal Notices, your
|
||
work need not make them do so.
|
||
|
||
A compilation of a covered work with other separate and independent
|
||
works, which are not by their nature extensions of the covered work,
|
||
and which are not combined with it such as to form a larger program,
|
||
in or on a volume of a storage or distribution medium, is called an
|
||
"aggregate" if the compilation and its resulting copyright are not
|
||
used to limit the access or legal rights of the compilation's users
|
||
beyond what the individual works permit. Inclusion of a covered work
|
||
in an aggregate does not cause this License to apply to the other
|
||
parts of the aggregate.
|
||
|
||
6. Conveying Non-Source Forms.
|
||
|
||
You may convey a covered work in object code form under the terms
|
||
of sections 4 and 5, provided that you also convey the
|
||
machine-readable Corresponding Source under the terms of this License,
|
||
in one of these ways:
|
||
|
||
a) Convey the object code in, or embodied in, a physical product
|
||
(including a physical distribution medium), accompanied by the
|
||
Corresponding Source fixed on a durable physical medium
|
||
customarily used for software interchange.
|
||
|
||
b) Convey the object code in, or embodied in, a physical product
|
||
(including a physical distribution medium), accompanied by a
|
||
written offer, valid for at least three years and valid for as
|
||
long as you offer spare parts or customer support for that product
|
||
model, to give anyone who possesses the object code either (1) a
|
||
copy of the Corresponding Source for all the software in the
|
||
product that is covered by this License, on a durable physical
|
||
medium customarily used for software interchange, for a price no
|
||
more than your reasonable cost of physically performing this
|
||
conveying of source, or (2) access to copy the
|
||
Corresponding Source from a network server at no charge.
|
||
|
||
c) Convey individual copies of the object code with a copy of the
|
||
written offer to provide the Corresponding Source. This
|
||
alternative is allowed only occasionally and noncommercially, and
|
||
only if you received the object code with such an offer, in accord
|
||
with subsection 6b.
|
||
|
||
d) Convey the object code by offering access from a designated
|
||
place (gratis or for a charge), and offer equivalent access to the
|
||
Corresponding Source in the same way through the same place at no
|
||
further charge. You need not require recipients to copy the
|
||
Corresponding Source along with the object code. If the place to
|
||
copy the object code is a network server, the Corresponding Source
|
||
may be on a different server (operated by you or a third party)
|
||
that supports equivalent copying facilities, provided you maintain
|
||
clear directions next to the object code saying where to find the
|
||
Corresponding Source. Regardless of what server hosts the
|
||
Corresponding Source, you remain obligated to ensure that it is
|
||
available for as long as needed to satisfy these requirements.
|
||
|
||
e) Convey the object code using peer-to-peer transmission, provided
|
||
you inform other peers where the object code and Corresponding
|
||
Source of the work are being offered to the general public at no
|
||
charge under subsection 6d.
|
||
|
||
A separable portion of the object code, whose source code is excluded
|
||
from the Corresponding Source as a System Library, need not be
|
||
included in conveying the object code work.
|
||
|
||
A "User Product" is either (1) a "consumer product", which means any
|
||
tangible personal property which is normally used for personal, family,
|
||
or household purposes, or (2) anything designed or sold for incorporation
|
||
into a dwelling. In determining whether a product is a consumer product,
|
||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||
product received by a particular user, "normally used" refers to a
|
||
typical or common use of that class of product, regardless of the status
|
||
of the particular user or of the way in which the particular user
|
||
actually uses, or expects or is expected to use, the product. A product
|
||
is a consumer product regardless of whether the product has substantial
|
||
commercial, industrial or non-consumer uses, unless such uses represent
|
||
the only significant mode of use of the product.
|
||
|
||
"Installation Information" for a User Product means any methods,
|
||
procedures, authorization keys, or other information required to install
|
||
and execute modified versions of a covered work in that User Product from
|
||
a modified version of its Corresponding Source. The information must
|
||
suffice to ensure that the continued functioning of the modified object
|
||
code is in no case prevented or interfered with solely because
|
||
modification has been made.
|
||
|
||
If you convey an object code work under this section in, or with, or
|
||
specifically for use in, a User Product, and the conveying occurs as
|
||
part of a transaction in which the right of possession and use of the
|
||
User Product is transferred to the recipient in perpetuity or for a
|
||
fixed term (regardless of how the transaction is characterized), the
|
||
Corresponding Source conveyed under this section must be accompanied
|
||
by the Installation Information. But this requirement does not apply
|
||
if neither you nor any third party retains the ability to install
|
||
modified object code on the User Product (for example, the work has
|
||
been installed in ROM).
|
||
|
||
The requirement to provide Installation Information does not include a
|
||
requirement to continue to provide support service, warranty, or updates
|
||
for a work that has been modified or installed by the recipient, or for
|
||
the User Product in which it has been modified or installed. Access to a
|
||
network may be denied when the modification itself materially and
|
||
adversely affects the operation of the network or violates the rules and
|
||
protocols for communication across the network.
|
||
|
||
Corresponding Source conveyed, and Installation Information provided,
|
||
in accord with this section must be in a format that is publicly
|
||
documented (and with an implementation available to the public in
|
||
source code form), and must require no special password or key for
|
||
unpacking, reading or copying.
|
||
|
||
7. Additional Terms.
|
||
|
||
"Additional permissions" are terms that supplement the terms of this
|
||
License by making exceptions from one or more of its conditions.
|
||
Additional permissions that are applicable to the entire Program shall
|
||
be treated as though they were included in this License, to the extent
|
||
that they are valid under applicable law. If additional permissions
|
||
apply only to part of the Program, that part may be used separately
|
||
under those permissions, but the entire Program remains governed by
|
||
this License without regard to the additional permissions.
|
||
|
||
When you convey a copy of a covered work, you may at your option
|
||
remove any additional permissions from that copy, or from any part of
|
||
it. (Additional permissions may be written to require their own
|
||
removal in certain cases when you modify the work.) You may place
|
||
additional permissions on material, added by you to a covered work,
|
||
for which you have or can give appropriate copyright permission.
|
||
|
||
Notwithstanding any other provision of this License, for material you
|
||
add to a covered work, you may (if authorized by the copyright holders of
|
||
that material) supplement the terms of this License with terms:
|
||
|
||
a) Disclaiming warranty or limiting liability differently from the
|
||
terms of sections 15 and 16 of this License; or
|
||
|
||
b) Requiring preservation of specified reasonable legal notices or
|
||
author attributions in that material or in the Appropriate Legal
|
||
Notices displayed by works containing it; or
|
||
|
||
c) Prohibiting misrepresentation of the origin of that material, or
|
||
requiring that modified versions of such material be marked in
|
||
reasonable ways as different from the original version; or
|
||
|
||
d) Limiting the use for publicity purposes of names of licensors or
|
||
authors of the material; or
|
||
|
||
e) Declining to grant rights under trademark law for use of some
|
||
trade names, trademarks, or service marks; or
|
||
|
||
f) Requiring indemnification of licensors and authors of that
|
||
material by anyone who conveys the material (or modified versions of
|
||
it) with contractual assumptions of liability to the recipient, for
|
||
any liability that these contractual assumptions directly impose on
|
||
those licensors and authors.
|
||
|
||
All other non-permissive additional terms are considered "further
|
||
restrictions" within the meaning of section 10. If the Program as you
|
||
received it, or any part of it, contains a notice stating that it is
|
||
governed by this License along with a term that is a further
|
||
restriction, you may remove that term. If a license document contains
|
||
a further restriction but permits relicensing or conveying under this
|
||
License, you may add to a covered work material governed by the terms
|
||
of that license document, provided that the further restriction does
|
||
not survive such relicensing or conveying.
|
||
|
||
If you add terms to a covered work in accord with this section, you
|
||
must place, in the relevant source files, a statement of the
|
||
additional terms that apply to those files, or a notice indicating
|
||
where to find the applicable terms.
|
||
|
||
Additional terms, permissive or non-permissive, may be stated in the
|
||
form of a separately written license, or stated as exceptions;
|
||
the above requirements apply either way.
|
||
|
||
8. Termination.
|
||
|
||
You may not propagate or modify a covered work except as expressly
|
||
provided under this License. Any attempt otherwise to propagate or
|
||
modify it is void, and will automatically terminate your rights under
|
||
this License (including any patent licenses granted under the third
|
||
paragraph of section 11).
|
||
|
||
However, if you cease all violation of this License, then your
|
||
license from a particular copyright holder is reinstated (a)
|
||
provisionally, unless and until the copyright holder explicitly and
|
||
finally terminates your license, and (b) permanently, if the copyright
|
||
holder fails to notify you of the violation by some reasonable means
|
||
prior to 60 days after the cessation.
|
||
|
||
Moreover, your license from a particular copyright holder is
|
||
reinstated permanently if the copyright holder notifies you of the
|
||
violation by some reasonable means, this is the first time you have
|
||
received notice of violation of this License (for any work) from that
|
||
copyright holder, and you cure the violation prior to 30 days after
|
||
your receipt of the notice.
|
||
|
||
Termination of your rights under this section does not terminate the
|
||
licenses of parties who have received copies or rights from you under
|
||
this License. If your rights have been terminated and not permanently
|
||
reinstated, you do not qualify to receive new licenses for the same
|
||
material under section 10.
|
||
|
||
9. Acceptance Not Required for Having Copies.
|
||
|
||
You are not required to accept this License in order to receive or
|
||
run a copy of the Program. Ancillary propagation of a covered work
|
||
occurring solely as a consequence of using peer-to-peer transmission
|
||
to receive a copy likewise does not require acceptance. However,
|
||
nothing other than this License grants you permission to propagate or
|
||
modify any covered work. These actions infringe copyright if you do
|
||
not accept this License. Therefore, by modifying or propagating a
|
||
covered work, you indicate your acceptance of this License to do so.
|
||
|
||
10. Automatic Licensing of Downstream Recipients.
|
||
|
||
Each time you convey a covered work, the recipient automatically
|
||
receives a license from the original licensors, to run, modify and
|
||
propagate that work, subject to this License. You are not responsible
|
||
for enforcing compliance by third parties with this License.
|
||
|
||
An "entity transaction" is a transaction transferring control of an
|
||
organization, or substantially all assets of one, or subdividing an
|
||
organization, or merging organizations. If propagation of a covered
|
||
work results from an entity transaction, each party to that
|
||
transaction who receives a copy of the work also receives whatever
|
||
licenses to the work the party's predecessor in interest had or could
|
||
give under the previous paragraph, plus a right to possession of the
|
||
Corresponding Source of the work from the predecessor in interest, if
|
||
the predecessor has it or can get it with reasonable efforts.
|
||
|
||
You may not impose any further restrictions on the exercise of the
|
||
rights granted or affirmed under this License. For example, you may
|
||
not impose a license fee, royalty, or other charge for exercise of
|
||
rights granted under this License, and you may not initiate litigation
|
||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||
any patent claim is infringed by making, using, selling, offering for
|
||
sale, or importing the Program or any portion of it.
|
||
|
||
11. Patents.
|
||
|
||
A "contributor" is a copyright holder who authorizes use under this
|
||
License of the Program or a work on which the Program is based. The
|
||
work thus licensed is called the contributor's "contributor version".
|
||
|
||
A contributor's "essential patent claims" are all patent claims
|
||
owned or controlled by the contributor, whether already acquired or
|
||
hereafter acquired, that would be infringed by some manner, permitted
|
||
by this License, of making, using, or selling its contributor version,
|
||
but do not include claims that would be infringed only as a
|
||
consequence of further modification of the contributor version. For
|
||
purposes of this definition, "control" includes the right to grant
|
||
patent sublicenses in a manner consistent with the requirements of
|
||
this License.
|
||
|
||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||
patent license under the contributor's essential patent claims, to
|
||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||
propagate the contents of its contributor version.
|
||
|
||
In the following three paragraphs, a "patent license" is any express
|
||
agreement or commitment, however denominated, not to enforce a patent
|
||
(such as an express permission to practice a patent or covenant not to
|
||
sue for patent infringement). To "grant" such a patent license to a
|
||
party means to make such an agreement or commitment not to enforce a
|
||
patent against the party.
|
||
|
||
If you convey a covered work, knowingly relying on a patent license,
|
||
and the Corresponding Source of the work is not available for anyone
|
||
to copy, free of charge and under the terms of this License, through a
|
||
publicly available network server or other readily accessible means,
|
||
then you must either (1) cause the Corresponding Source to be so
|
||
available, or (2) arrange to deprive yourself of the benefit of the
|
||
patent license for this particular work, or (3) arrange, in a manner
|
||
consistent with the requirements of this License, to extend the patent
|
||
license to downstream recipients. "Knowingly relying" means you have
|
||
actual knowledge that, but for the patent license, your conveying the
|
||
covered work in a country, or your recipient's use of the covered work
|
||
in a country, would infringe one or more identifiable patents in that
|
||
country that you have reason to believe are valid.
|
||
|
||
If, pursuant to or in connection with a single transaction or
|
||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||
covered work, and grant a patent license to some of the parties
|
||
receiving the covered work authorizing them to use, propagate, modify
|
||
or convey a specific copy of the covered work, then the patent license
|
||
you grant is automatically extended to all recipients of the covered
|
||
work and works based on it.
|
||
|
||
A patent license is "discriminatory" if it does not include within
|
||
the scope of its coverage, prohibits the exercise of, or is
|
||
conditioned on the non-exercise of one or more of the rights that are
|
||
specifically granted under this License. You may not convey a covered
|
||
work if you are a party to an arrangement with a third party that is
|
||
in the business of distributing software, under which you make payment
|
||
to the third party based on the extent of your activity of conveying
|
||
the work, and under which the third party grants, to any of the
|
||
parties who would receive the covered work from you, a discriminatory
|
||
patent license (a) in connection with copies of the covered work
|
||
conveyed by you (or copies made from those copies), or (b) primarily
|
||
for and in connection with specific products or compilations that
|
||
contain the covered work, unless you entered into that arrangement,
|
||
or that patent license was granted, prior to 28 March 2007.
|
||
|
||
Nothing in this License shall be construed as excluding or limiting
|
||
any implied license or other defenses to infringement that may
|
||
otherwise be available to you under applicable patent law.
|
||
|
||
12. No Surrender of Others' Freedom.
|
||
|
||
If conditions are imposed on you (whether by court order, agreement or
|
||
otherwise) that contradict the conditions of this License, they do not
|
||
excuse you from the conditions of this License. If you cannot convey a
|
||
covered work so as to satisfy simultaneously your obligations under this
|
||
License and any other pertinent obligations, then as a consequence you may
|
||
not convey it at all. For example, if you agree to terms that obligate you
|
||
to collect a royalty for further conveying from those to whom you convey
|
||
the Program, the only way you could satisfy both those terms and this
|
||
License would be to refrain entirely from conveying the Program.
|
||
|
||
13. Use with the GNU Affero General Public License.
|
||
|
||
Notwithstanding any other provision of this License, you have
|
||
permission to link or combine any covered work with a work licensed
|
||
under version 3 of the GNU Affero General Public License into a single
|
||
combined work, and to convey the resulting work. The terms of this
|
||
License will continue to apply to the part which is the covered work,
|
||
but the special requirements of the GNU Affero General Public License,
|
||
section 13, concerning interaction through a network will apply to the
|
||
combination as such.
|
||
|
||
14. Revised Versions of this License.
|
||
|
||
The Free Software Foundation may publish revised and/or new versions of
|
||
the GNU General Public License from time to time. Such new versions will
|
||
be similar in spirit to the present version, but may differ in detail to
|
||
address new problems or concerns.
|
||
|
||
Each version is given a distinguishing version number. If the
|
||
Program specifies that a certain numbered version of the GNU General
|
||
Public License "or any later version" applies to it, you have the
|
||
option of following the terms and conditions either of that numbered
|
||
version or of any later version published by the Free Software
|
||
Foundation. If the Program does not specify a version number of the
|
||
GNU General Public License, you may choose any version ever published
|
||
by the Free Software Foundation.
|
||
|
||
If the Program specifies that a proxy can decide which future
|
||
versions of the GNU General Public License can be used, that proxy's
|
||
public statement of acceptance of a version permanently authorizes you
|
||
to choose that version for the Program.
|
||
|
||
Later license versions may give you additional or different
|
||
permissions. However, no additional obligations are imposed on any
|
||
author or copyright holder as a result of your choosing to follow a
|
||
later version.
|
||
|
||
15. Disclaimer of Warranty.
|
||
|
||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||
|
||
16. Limitation of Liability.
|
||
|
||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||
SUCH DAMAGES.
|
||
|
||
17. Interpretation of Sections 15 and 16.
|
||
|
||
If the disclaimer of warranty and limitation of liability provided
|
||
above cannot be given local legal effect according to their terms,
|
||
reviewing courts shall apply local law that most closely approximates
|
||
an absolute waiver of all civil liability in connection with the
|
||
Program, unless a warranty or assumption of liability accompanies a
|
||
copy of the Program in return for a fee.
|
||
|
||
END OF TERMS AND CONDITIONS
|
||
|
||
How to Apply These Terms to Your New Programs
|
||
|
||
If you develop a new program, and you want it to be of the greatest
|
||
possible use to the public, the best way to achieve this is to make it
|
||
free software which everyone can redistribute and change under these terms.
|
||
|
||
To do so, attach the following notices to the program. It is safest
|
||
to attach them to the start of each source file to most effectively
|
||
state the exclusion of warranty; and each file should have at least
|
||
the "copyright" line and a pointer to where the full notice is found.
|
||
|
||
<one line to give the program's name and a brief idea of what it does.>
|
||
Copyright (C) <year> <name of author>
|
||
|
||
This program is free software: you can redistribute it and/or modify
|
||
it under the terms of the GNU 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 General Public License for more details.
|
||
|
||
You should have received a copy of the GNU General Public License
|
||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
|
||
Also add information on how to contact you by electronic and paper mail.
|
||
|
||
If the program does terminal interaction, make it output a short
|
||
notice like this when it starts in an interactive mode:
|
||
|
||
<program> Copyright (C) <year> <name of author>
|
||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||
This is free software, and you are welcome to redistribute it
|
||
under certain conditions; type `show c' for details.
|
||
|
||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||
parts of the General Public License. Of course, your program's commands
|
||
might be different; for a GUI interface, you would use an "about box".
|
||
|
||
You should also get your employer (if you work as a programmer) or school,
|
||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||
For more information on this, and how to apply and follow the GNU GPL, see
|
||
<http://www.gnu.org/licenses/>.
|
||
|
||
The GNU General Public License does not permit incorporating your program
|
||
into proprietary programs. If your program is a subroutine library, you
|
||
may consider it more useful to permit linking proprietary applications with
|
||
the library. If this is what you want to do, use the GNU Lesser General
|
||
Public License instead of this License. But first, please read
|
||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
DS/DS-Commons/LISEZMOI | ||
---|---|---|
DS-Commons
|
||
|
||
Bibliothèque pour la gestion des évènements DS.
|
||
|
||
Dépendances::
|
||
modules IoTa:
|
||
- ds-client
|
||
- nu-pi
|
||
- nu
|
||
bibliothèques:
|
||
- activemq
|
||
- commons-logging
|
||
|
||
Utilisation:
|
DS/DS-Commons/README | ||
---|---|---|
DS-Commons
|
||
|
||
Library for the DS events management.
|
||
|
||
Dependencies:
|
||
IoTa modules:
|
||
- ds-client
|
||
- nu-pi
|
||
- nu
|
||
libraries:
|
||
- activemq
|
||
- commons-logging
|
||
|
||
Usage:
|
DS/DS-Commons/pom.xml | ||
---|---|---|
<?xml version="1.0" encoding="utf-8"?>
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||
<modelVersion>4.0.0</modelVersion>
|
||
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>ds-commons</artifactId>
|
||
<version>2.0</version>
|
||
<packaging>jar</packaging>
|
||
|
||
<name>DS-Commons</name>
|
||
|
||
<properties>
|
||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||
</properties>
|
||
|
||
<dependencies>
|
||
|
||
<!-- IoTa dependencies -->
|
||
<dependency>
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>ds-client</artifactId>
|
||
<version>${project.version}</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>nu</artifactId>
|
||
<version>${project.version}</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>nu-pi</artifactId>
|
||
<version>${project.version}</version>
|
||
</dependency>
|
||
|
||
<!-- JMS dependencies -->
|
||
<dependency>
|
||
<groupId>org.apache.activemq</groupId>
|
||
<artifactId>activemq-client</artifactId>
|
||
<version>5.8.0</version>
|
||
</dependency>
|
||
|
||
<!-- Log dependencies -->
|
||
<dependency>
|
||
<groupId>commons-logging</groupId>
|
||
<artifactId>commons-logging</artifactId>
|
||
<version>1.1.1</version>
|
||
</dependency>
|
||
|
||
</dependencies>
|
||
|
||
<build>
|
||
|
||
<plugins>
|
||
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-compiler-plugin</artifactId>
|
||
<version>2.5.1</version>
|
||
<configuration>
|
||
<source>1.6</source>
|
||
<target>1.6</target>
|
||
</configuration>
|
||
</plugin>
|
||
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-assembly-plugin</artifactId>
|
||
<version>2.3</version>
|
||
<executions>
|
||
<execution>
|
||
<id>sources</id>
|
||
<phase>package</phase>
|
||
<goals>
|
||
<goal>single</goal>
|
||
</goals>
|
||
<configuration>
|
||
<descriptorRefs>
|
||
<descriptorRef>src</descriptorRef>
|
||
</descriptorRefs>
|
||
</configuration>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
|
||
</plugins>
|
||
|
||
</build>
|
||
|
||
</project>
|
DS/DS-Commons/src/main/java/fr/unicaen/iota/ds/commons/OperationsBackendSQL.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2013 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.ds.commons;
|
||
|
||
import fr.unicaen.iota.ds.model.DSEvent;
|
||
import java.sql.Connection;
|
||
import java.sql.PreparedStatement;
|
||
import java.sql.SQLException;
|
||
import java.sql.Timestamp;
|
||
import java.util.Calendar;
|
||
import java.util.GregorianCalendar;
|
||
import java.util.LinkedHashMap;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import javax.sql.DataSource;
|
||
import javax.xml.datatype.DatatypeConfigurationException;
|
||
import javax.xml.datatype.DatatypeFactory;
|
||
import javax.xml.datatype.XMLGregorianCalendar;
|
||
|
||
public class OperationsBackendSQL {
|
||
|
||
/**
|
||
* Inserts an event in the database.
|
||
* @param session The session wrapping a database connection.
|
||
* @param dsEvent The DS event to insert.
|
||
* @param objParamMap The other parameters (in SQL types!) to add.
|
||
* @return True if the event is correctly added.
|
||
* @throws SQLException An error involving the database occurred.
|
||
*/
|
||
public boolean eventCreate(final OperationsSession session,
|
||
DSEvent dsEvent, Map<String, Object> objParamMap) throws SQLException {
|
||
StringBuilder insert = new StringBuilder("INSERT INTO events (epc, eventType, bizStep, eventTime, serviceAddress, serviceType");
|
||
Map<String, Object> objParamLinkedMap = null;
|
||
if (objParamMap != null) {
|
||
objParamLinkedMap = new LinkedHashMap(objParamMap);
|
||
for (String columnName : objParamMap.keySet()) {
|
||
insert.append(",");
|
||
insert.append(columnName);
|
||
}
|
||
}
|
||
insert.append(") VALUES (?, ?, ?, ?, ?, ?");
|
||
if (objParamLinkedMap != null) {
|
||
for (int i = 0; i < objParamLinkedMap.size(); i++) {
|
||
insert.append(",?");
|
||
}
|
||
}
|
||
insert.append(")");
|
||
PreparedStatement stmt = session.getPreparedStatement(insert.toString());
|
||
stmt.setString(1, dsEvent.getEpc());
|
||
stmt.setString(2, dsEvent.getEventType());
|
||
stmt.setString(3, dsEvent.getBizStep());
|
||
stmt.setTimestamp(4, XMLGregorianToTimestamp(dsEvent.getEventTime()));
|
||
stmt.setString(5, dsEvent.getServiceAddress());
|
||
stmt.setString(6, dsEvent.getServiceType());
|
||
if (objParamLinkedMap != null) {
|
||
int i = 7;
|
||
for (Object param : objParamLinkedMap.values()) {
|
||
stmt.setObject(i, param);
|
||
i++;
|
||
}
|
||
}
|
||
stmt.executeUpdate();
|
||
session.commit();
|
||
return true;
|
||
}
|
||
|
||
/**
|
||
* Retrieves a <code>PreParedStatement<code> corresponding to the parameters.
|
||
* @param session The session wrapping a database connection.
|
||
* @param epc The EPC to get.
|
||
* @param eventType The event type to get.
|
||
* @param bizStep The business step to get.
|
||
* @param startingAt The lower limit of the event time.
|
||
* @param endingAt The upper limit of the event time.
|
||
* @param serviceType The type of the service.
|
||
* @param columns The other column names to select.
|
||
* @return The PreparedStatement corresponding to the parameters.
|
||
* @throws SQLException An error involving the database occurred.
|
||
*/
|
||
public PreparedStatement getPreparedStatementSelect(final OperationsSession session, String epc,
|
||
String eventType, String bizStep, XMLGregorianCalendar startingAt,
|
||
XMLGregorianCalendar endingAt, String serviceType, List<String> columns) throws SQLException {
|
||
StringBuilder select = new StringBuilder("SELECT ");
|
||
for (String columnName : columns) {
|
||
select.append(columnName);
|
||
select.append(",");
|
||
}
|
||
if (',' == select.charAt(select.length()-1)) {
|
||
select.deleteCharAt(select.length()-1);
|
||
}
|
||
select.append(" FROM events WHERE");
|
||
boolean parameterBefore = false;
|
||
boolean epcIsPresent = false;
|
||
boolean eventTypeIsPresent = false;
|
||
boolean bizStepIsPresent = false;
|
||
boolean startingAtIsPresent = false;
|
||
boolean endingAtIsPresent = false;
|
||
boolean serviceTypeIsPresent = false;
|
||
/*
|
||
* Beware of the parameter order
|
||
*
|
||
*/
|
||
if (epc != null && !epc.isEmpty()) {
|
||
select.append(" epc=?");
|
||
epcIsPresent = true;
|
||
parameterBefore = true;
|
||
}
|
||
if (eventType != null && !eventType.isEmpty()) {
|
||
if (parameterBefore) {
|
||
select.append(" AND");
|
||
}
|
||
select.append(" eventType=?");
|
||
eventTypeIsPresent = true;
|
||
parameterBefore = true;
|
||
}
|
||
if (bizStep != null && !bizStep.isEmpty()) {
|
||
if (parameterBefore) {
|
||
select.append(" AND");
|
||
}
|
||
select.append(" bizStep=?");
|
||
bizStepIsPresent = true;
|
||
parameterBefore = true;
|
||
}
|
||
if (startingAt != null) {
|
||
if (parameterBefore) {
|
||
select.append(" AND");
|
||
}
|
||
select.append(" eventTime>=?");
|
||
startingAtIsPresent = true;
|
||
parameterBefore = true;
|
||
}
|
||
if (endingAt != null) {
|
||
if (parameterBefore) {
|
||
select.append(" AND");
|
||
}
|
||
select.append(" eventTime<=?");
|
||
endingAtIsPresent = true;
|
||
parameterBefore = true;
|
||
}
|
||
if (serviceType != null && !serviceType.isEmpty()) {
|
||
if (parameterBefore) {
|
||
select.append(" AND");
|
||
}
|
||
select.append(" serviceType=?");
|
||
serviceTypeIsPresent = true;
|
||
parameterBefore = true;
|
||
}
|
||
PreparedStatement stmt = session.getPreparedStatement(select.toString());
|
||
int i = 1;
|
||
if (epcIsPresent) {
|
||
stmt.setString(i, epc);
|
||
i++;
|
||
}
|
||
if (eventTypeIsPresent) {
|
||
stmt.setString(i, eventType);
|
||
i++;
|
||
}
|
||
if (bizStepIsPresent) {
|
||
stmt.setString(i, bizStep);
|
||
i++;
|
||
}
|
||
if (startingAtIsPresent) {
|
||
stmt.setTimestamp(i, XMLGregorianToTimestamp(startingAt));
|
||
i++;
|
||
}
|
||
if (endingAtIsPresent) {
|
||
stmt.setTimestamp(i, XMLGregorianToTimestamp(endingAt));
|
||
i++;
|
||
}
|
||
if (serviceTypeIsPresent) {
|
||
stmt.setString(i, serviceType);
|
||
i++;
|
||
}
|
||
return stmt;
|
||
}
|
||
|
||
/**
|
||
* Opens a new session for the database transaction.
|
||
*
|
||
* @param dataSource The DataSource object to retrieve the database connection from.
|
||
* @return A OperationsSession instantiated with the database connection retrieved from the given DataSource.
|
||
* @throws SQLException If an error with the database occurred.
|
||
*/
|
||
public OperationsSession openSession(final DataSource dataSource) throws SQLException {
|
||
Connection connection = dataSource.getConnection();
|
||
return new OperationsSession(connection);
|
||
}
|
||
|
||
/**
|
||
* Gets {@link XMLGregorianCalendar} object corresponding to the {@link Timestamp}
|
||
* @param time The {@link Timestamp} to convert.
|
||
* @return The {@link XMLGregorianCalendar} associated to the timestamp.
|
||
* @throws DatatypeConfigurationException If an error occurred during the conversion.
|
||
*/
|
||
public XMLGregorianCalendar timestampToXmlCalendar(Timestamp time) throws DatatypeConfigurationException {
|
||
DatatypeFactory factory = DatatypeFactory.newInstance();
|
||
Calendar cal = Calendar.getInstance();
|
||
cal.setTimeInMillis(time.getTime());
|
||
return factory.newXMLGregorianCalendar((GregorianCalendar) cal);
|
||
}
|
||
|
||
/**
|
||
* Gets {@link XMLGregorianCalendar} object corresponding to the {@link Timestamp}
|
||
* @param time The {@link XMLGregorianCalendar} to convert.
|
||
* @return The {@link Timestamp} associated to the XMLGregorianCalandar.
|
||
*/
|
||
public Timestamp XMLGregorianToTimestamp(XMLGregorianCalendar time){
|
||
return (time != null)? new Timestamp(time.toGregorianCalendar().getTimeInMillis()) : null;
|
||
}
|
||
}
|
DS/DS-Commons/src/main/java/fr/unicaen/iota/ds/commons/OperationsSession.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2011-2013 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.ds.commons;
|
||
|
||
import java.sql.Connection;
|
||
import java.sql.PreparedStatement;
|
||
import java.sql.SQLException;
|
||
import java.util.HashMap;
|
||
import java.util.Map;
|
||
import org.apache.commons.logging.Log;
|
||
import org.apache.commons.logging.LogFactory;
|
||
|
||
/**
|
||
* The <code>OperationsSession</code> maintains SQL queries.
|
||
* A <code>PreparedStatements</code> is created and stored on first used.
|
||
*/
|
||
public class OperationsSession {
|
||
|
||
private static final Log LOG = LogFactory.getLog(OperationsSession.class);
|
||
|
||
private Connection connection;
|
||
|
||
private Map<String, PreparedStatement> namedStatements = new HashMap<String, PreparedStatement>();
|
||
|
||
public OperationsSession(final Connection connection) {
|
||
this.connection = connection;
|
||
}
|
||
|
||
/**
|
||
* Lazy instantiation of prepared statements: the PreparedStatement is
|
||
* created when it is first used by the application and is then cached here.
|
||
*
|
||
* @param sql The SQL query to instantiate.
|
||
* @return The <code>PreparedStatement</code> associated to the SQL query.
|
||
* @throws SQLException An error involving the database occurred
|
||
*/
|
||
public PreparedStatement getPreparedStatement(final String sql) throws SQLException {
|
||
PreparedStatement ps = namedStatements.get(sql);
|
||
if (ps == null) {
|
||
ps = connection.prepareStatement(sql);
|
||
LOG.trace("Prepared SQL statement: " + sql);
|
||
namedStatements.put(sql, ps);
|
||
}
|
||
ps.clearParameters();
|
||
return ps;
|
||
}
|
||
|
||
/**
|
||
* Gets the <code>Connection</code> object.
|
||
*
|
||
* @return The Connection object.
|
||
*/
|
||
public Connection getConnection() {
|
||
return connection;
|
||
}
|
||
|
||
/**
|
||
* Rollbacks transaction.
|
||
*
|
||
* @throws SQLException If a database access error occurs.
|
||
*/
|
||
public void rollback() throws SQLException {
|
||
connection.rollback();
|
||
}
|
||
|
||
/**
|
||
* Commits the transaction.
|
||
*
|
||
* @throws SQLException If a database access error occurs.
|
||
*/
|
||
public void commit() throws SQLException {
|
||
connection.commit();
|
||
}
|
||
|
||
/**
|
||
* Closes this <code>Connection</code>.
|
||
*
|
||
* @throws SQLException If a database access error occurs.
|
||
*/
|
||
public void close() throws SQLException {
|
||
for (PreparedStatement ps : namedStatements.values()) {
|
||
try {
|
||
ps.close();
|
||
} catch (SQLException e) {
|
||
LOG.warn("Error closing prepared statement: " + e.toString() + ". Will continue ... ");
|
||
}
|
||
}
|
||
connection.close();
|
||
LOG.debug("Database connection for session closed");
|
||
}
|
||
}
|
DS/DS-Commons/src/main/java/fr/unicaen/iota/ds/commons/Publish.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2013 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.ds.commons;
|
||
|
||
import fr.unicaen.iota.ds.client.DSClient;
|
||
import fr.unicaen.iota.ds.model.CreateResponseType;
|
||
import fr.unicaen.iota.ds.model.DSEvent;
|
||
import fr.unicaen.iota.ds.model.EventCreateResp;
|
||
import fr.unicaen.iota.nu.ONSEntryType;
|
||
import fr.unicaen.iota.nu.ONSOperation;
|
||
import java.io.IOException;
|
||
import java.util.HashMap;
|
||
import java.util.Map;
|
||
import javax.jms.Connection;
|
||
import javax.jms.Destination;
|
||
import javax.jms.JMSException;
|
||
import javax.jms.Message;
|
||
import javax.jms.MessageConsumer;
|
||
import javax.jms.MessageProducer;
|
||
import javax.jms.Queue;
|
||
import javax.jms.Session;
|
||
import javax.jms.TextMessage;
|
||
import javax.xml.bind.JAXBException;
|
||
import javax.xml.parsers.ParserConfigurationException;
|
||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||
import org.apache.commons.logging.Log;
|
||
import org.apache.commons.logging.LogFactory;
|
||
import org.xml.sax.SAXException;
|
||
|
||
public class Publish {
|
||
|
||
private String myAddress;
|
||
private String jmsUrl;
|
||
private String jmsLogin;
|
||
private String jmsPassword;
|
||
private String timeProperty;
|
||
private Connection connection;
|
||
private ONSOperation ons;
|
||
private Map<String, String> dsAddressesByEPC;
|
||
private static final Log LOG = LogFactory.getLog(Publish.class);
|
||
|
||
public Publish(String myAddress, String[] onsHosts, String jmsUrl, String jmsLogin, String jmsPassword, String timeProperty) {
|
||
this.myAddress = myAddress;
|
||
ons = new ONSOperation(onsHosts);
|
||
this.jmsUrl = jmsUrl;
|
||
this.jmsLogin = jmsLogin;
|
||
this.jmsPassword = jmsPassword;
|
||
this.timeProperty = timeProperty;
|
||
this.dsAddressesByEPC = new HashMap<String,String>();
|
||
}
|
||
|
||
public String getTimeProperty() {
|
||
return timeProperty;
|
||
}
|
||
|
||
/**
|
||
* Creates a JMS connection.
|
||
* @throws JMSException If the connection could not be established.
|
||
*/
|
||
public void createsJMSConnection() throws JMSException {
|
||
ActiveMQConnectionFactory factory;
|
||
if (jmsLogin != null && jmsPassword != null && !jmsLogin.isEmpty() && !jmsPassword.isEmpty()) {
|
||
factory = new ActiveMQConnectionFactory(jmsLogin, jmsPassword, jmsUrl);
|
||
} else {
|
||
factory = new ActiveMQConnectionFactory(jmsUrl);
|
||
}
|
||
this.connection = factory.createConnection();
|
||
}
|
||
|
||
/**
|
||
* Starts the JMS connection.
|
||
* @throws JMSException If the JMS provider fails to start message delivery due to some internal error.
|
||
*/
|
||
public void startsJMSConnection() throws JMSException {
|
||
connection.start();
|
||
}
|
||
|
||
/**
|
||
* Closes the JMS connection.
|
||
* @throws JMSException If the JMS provider fails to start message delivery due to some internal error.
|
||
*/
|
||
public void closesJMSConnection() throws JMSException {
|
||
connection.close();
|
||
}
|
||
|
||
/**
|
||
* Creates a <code>Session</code> object.
|
||
* See {@link javax.jms.Connection#createSession(boolean, int)}
|
||
*/
|
||
public Session createsJMSSession(boolean transacted, int acknowledge) throws JMSException {
|
||
return connection.createSession(transacted, acknowledge);
|
||
}
|
||
|
||
/**
|
||
* Creates a <code>Queue</code> object.
|
||
* See {@link javax.jms.Session#createQueue(java.lang.String)}
|
||
*/
|
||
public Queue createsJMSQueue(Session session, String queueName) throws JMSException {
|
||
return session.createQueue(queueName);
|
||
}
|
||
|
||
/**
|
||
* Creates a <code>MessageConsumer</code> object.
|
||
* See {@link javax.jms.Session#createConsumer(javax.jms.Destination) }
|
||
*/
|
||
public MessageConsumer createsJMSConsumer(Session session, Destination dest) throws JMSException {
|
||
return session.createConsumer(dest);
|
||
}
|
||
|
||
/**
|
||
* Creates a <code>MessageProducer</code> object.
|
||
* See {@link javax.jms.Session#createProducer(javax.jms.Destination) }
|
||
*/
|
||
public MessageProducer createJMSProducer(Session session, Destination dest) throws JMSException {
|
||
return session.createProducer(dest);
|
||
}
|
||
|
||
/**
|
||
* Queries ONS to fetch the address associated to the EPC.
|
||
* @param epc The EPC to query.
|
||
* @param type The type of the address.
|
||
* @return The DS address associated to the EPC.
|
||
*/
|
||
public String getDSAdress(String epc, ONSEntryType type) {
|
||
if (dsAddressesByEPC.containsKey(epc)) {
|
||
return dsAddressesByEPC.get(epc);
|
||
}
|
||
else {
|
||
Map<ONSEntryType, String> addresses = ons.queryONS(epc);
|
||
String dsAddress = (addresses != null)? addresses.get(type) : null;
|
||
if (dsAddress == null) {
|
||
return null;
|
||
}
|
||
dsAddressesByEPC.put(epc, dsAddress);
|
||
return dsAddress;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Publishes the event. If the event can not be published, the event is resend to the queue.
|
||
* @param consumer The JMS consumer which retrieves the event to publish.
|
||
* @param timeout Waits until this time expires (in milliseconds).
|
||
* @param producerSession The JMS session associated to the producer.
|
||
* @param producer The JMS producer which sends the event to the next queue if the event could not be published.
|
||
* @param runtime The runtime.
|
||
* @return True if the publishing can continue.
|
||
* @throws JMSException If an error occurred with the JMS provider.
|
||
* @throws JAXBException If an error occurred during the conversion from the string to <code>DSEvent</code>.
|
||
* @throws ParserConfigurationException If an error occurred during the conversion from the JMS message to string.
|
||
* @throws SAXException If an error occurred during the conversion from the JMS message to string.
|
||
* @throws IOException If an I/O error occurred.
|
||
*/
|
||
public boolean publishEvent(MessageConsumer consumer, long timeout, Session producerSession, MessageProducer producer,
|
||
long runtime) throws JMSException, JAXBException, ParserConfigurationException, SAXException, IOException {
|
||
boolean continuePublishing = true;
|
||
boolean republish = true;
|
||
Message message = consumer.receive(timeout);
|
||
if (message == null) {
|
||
return false;
|
||
}
|
||
TextMessage text = (TextMessage) message;
|
||
String docText = text.getText();
|
||
if (text.getLongProperty(timeProperty) <= runtime) {
|
||
DSEvent event = Utils.extractsDSEvent(docText);
|
||
String epc = event.getEpc();
|
||
String dsAddress = getDSAdress(epc, ONSEntryType.ds);
|
||
if (dsAddress == null) {
|
||
LOG.error("Could not get the referent DS address for " + epc);
|
||
}
|
||
else {
|
||
try {
|
||
if (notMe(dsAddress)) {
|
||
DSClient dsClient = new DSClient(dsAddress);
|
||
EventCreateResp result = dsClient.eventCreate(event);
|
||
if (!CreateResponseType.NOT_ADDED.equals(result.getValue())) {
|
||
republish = false;
|
||
LOG.info("Event published to " + dsAddress);
|
||
}
|
||
}
|
||
else {
|
||
republish = false;
|
||
LOG.info("Event not published: already in the corresponding DS.");
|
||
}
|
||
} catch (Exception ex) {
|
||
String msg = "Fails to send event to " + dsAddress;
|
||
if (LOG.isDebugEnabled()) {
|
||
LOG.debug(msg, ex);
|
||
}
|
||
else {
|
||
LOG.info(msg);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
else {
|
||
continuePublishing = false;
|
||
}
|
||
|
||
if (republish) {
|
||
sendsEvent(producerSession, producer, docText);
|
||
}
|
||
message.acknowledge();
|
||
return continuePublishing;
|
||
}
|
||
|
||
/**
|
||
* Sends event with the specified message producer.
|
||
* @param session The JMS session used to send the message.
|
||
* @param producer The JMS message producer used to send the message.
|
||
* @param eventToReturn The event to send in String format.
|
||
* @throws JMSException If an error occurred with the JMS provider.
|
||
*/
|
||
public void sendsEvent(Session session, MessageProducer producer, String eventToReturn) throws JMSException {
|
||
TextMessage tMsg = session.createTextMessage(eventToReturn);
|
||
tMsg.setLongProperty(timeProperty, System.currentTimeMillis());
|
||
producer.send(tMsg);
|
||
}
|
||
|
||
/**
|
||
* Sends event with the specified message producer.
|
||
* @param session The JMS session used to send the message.
|
||
* @param producer The JMS message producer used to send the message.
|
||
* @param event The event to send.
|
||
* @throws JAXBException If the event could not be parse as String.
|
||
* @throws JMSException If an error occurred with the JMS provider.
|
||
*/
|
||
public void sendsEvent(Session session, MessageProducer producer, DSEvent event) throws JAXBException, JMSException {
|
||
String stringEvent = Utils.convertsDSEventToString(event);
|
||
TextMessage tMsg = session.createTextMessage(stringEvent);
|
||
tMsg.setLongProperty(timeProperty, System.currentTimeMillis());
|
||
producer.send(tMsg);
|
||
}
|
||
|
||
/**
|
||
* Returns <code>True</code> if the specified address is not the publisher's address.
|
||
* @param address The address to compare.
|
||
* @return True if the specified address is not the publisher's address.
|
||
*/
|
||
public boolean notMe(String address) {
|
||
return !myAddress.equals(address);
|
||
}
|
||
|
||
}
|
DS/DS-Commons/src/main/java/fr/unicaen/iota/ds/commons/Utils.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2013 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.ds.commons;
|
||
|
||
import fr.unicaen.iota.ds.model.DSEvent;
|
||
import java.io.IOException;
|
||
import java.io.StringReader;
|
||
import java.io.StringWriter;
|
||
import javax.xml.bind.JAXBContext;
|
||
import javax.xml.bind.JAXBElement;
|
||
import javax.xml.bind.JAXBException;
|
||
import javax.xml.bind.Marshaller;
|
||
import javax.xml.bind.Unmarshaller;
|
||
import javax.xml.namespace.QName;
|
||
import javax.xml.parsers.DocumentBuilder;
|
||
import javax.xml.parsers.DocumentBuilderFactory;
|
||
import javax.xml.parsers.ParserConfigurationException;
|
||
import org.w3c.dom.Document;
|
||
import org.xml.sax.InputSource;
|
||
import org.xml.sax.SAXException;
|
||
|
||
public class Utils {
|
||
|
||
/**
|
||
* Extracts a DSEvent object from a String.
|
||
* @param xmlString The string to parse.
|
||
* @return The DSEvent associated to the string.
|
||
* @throws JAXBException If an error occurred during the conversion.
|
||
* @throws ParserConfigurationException If a DocumentBuilder cannot be created.
|
||
* @throws SAXException If an error processing the XML document occurred.
|
||
* @throws IOException If an I/O error occurred.
|
||
*/
|
||
public static DSEvent extractsDSEvent(String xmlString) throws JAXBException,
|
||
ParserConfigurationException, SAXException, IOException {
|
||
Document doc = extractsDocument(xmlString);
|
||
JAXBContext context;
|
||
context = JAXBContext.newInstance("fr.unicaen.iota.ds.model");
|
||
Unmarshaller unmarshaller = context.createUnmarshaller();
|
||
JAXBElement<DSEvent> jaxbObject = (JAXBElement<DSEvent>) unmarshaller.unmarshal(doc, DSEvent.class);
|
||
return jaxbObject.getValue();
|
||
}
|
||
|
||
/**
|
||
* Extracts a DSEvent object from a XML document.
|
||
* @param doc The XML document to parse.
|
||
* @return The DSEvent object associated to the string.
|
||
* @throws JAXBException If an error occurred during the conversion.
|
||
*/
|
||
public static DSEvent extractsDSEvent(Document doc) throws JAXBException {
|
||
JAXBContext context;
|
||
context = JAXBContext.newInstance("fr.unicaen.iota.ds.model");
|
||
Unmarshaller unmarshaller = context.createUnmarshaller();
|
||
JAXBElement<DSEvent> jaxbObject = (JAXBElement<DSEvent>) unmarshaller.unmarshal(doc, DSEvent.class);
|
||
return jaxbObject.getValue();
|
||
}
|
||
|
||
/**
|
||
* Converts a DSEvent object to XML document.
|
||
* @param dsEvent The DSEvent to convert.
|
||
* @return The XML document associated to the DSEvent.
|
||
* @throws JAXBException If an error occurred during the conversion.
|
||
* @throws ParserConfigurationException If a DocumentBuilder cannot be created.
|
||
*/
|
||
public static Document convertsDSEventToDocument(DSEvent dsEvent)
|
||
throws JAXBException, ParserConfigurationException {
|
||
JAXBContext context = JAXBContext.newInstance("fr.unicaen.iota.ds.model");
|
||
Marshaller marshaller = context.createMarshaller();
|
||
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
||
DocumentBuilder db = dbf.newDocumentBuilder();
|
||
Document doc = db.newDocument();
|
||
marshaller.marshal(new JAXBElement(new QName("urn:unicaen:iota:ds:xsd","ds"), DSEvent.class, dsEvent), doc);
|
||
return doc;
|
||
}
|
||
|
||
/**
|
||
* Converts a DSEvent to String.
|
||
* @param dsEvent The DSEvent to convert.
|
||
* @return The String associated to the DSEvent.
|
||
* @throws JAXBException If an error occurred during the conversion.
|
||
*/
|
||
public static String convertsDSEventToString(DSEvent dsEvent) throws JAXBException {
|
||
JAXBContext context = JAXBContext.newInstance("fr.unicaen.iota.ds.model");
|
||
Marshaller marshaller = context.createMarshaller();
|
||
StringWriter stringWriter = new StringWriter();
|
||
marshaller.marshal(new JAXBElement(new QName("urn:unicaen:iota:ds:xsd","ds"), DSEvent.class, dsEvent), stringWriter);
|
||
return stringWriter.toString();
|
||
}
|
||
|
||
/**
|
||
* Extracts a XML document from a String.
|
||
* @param xmlString The string to parse.
|
||
* @return The Document object.
|
||
* @throws ParserConfigurationException If a DocumentBuilder cannot be created.
|
||
* @throws SAXException If an error processing the XML document occurred.
|
||
* @throws IOException If an I/O error occurred.
|
||
*/
|
||
public static Document extractsDocument(String xmlString)
|
||
throws ParserConfigurationException, SAXException, IOException {
|
||
Document document;
|
||
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
||
DocumentBuilder builder = factory.newDocumentBuilder();
|
||
document = builder.parse(new InputSource(new StringReader(xmlString)));
|
||
return document;
|
||
}
|
||
|
||
}
|
DS/DS-Commons/src/main/resources/META-INF/LICENSE | ||
---|---|---|
GNU GENERAL PUBLIC LICENSE
|
||
Version 3, 29 June 2007
|
||
|
||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||
Everyone is permitted to copy and distribute verbatim copies
|
||
of this license document, but changing it is not allowed.
|
||
|
||
Preamble
|
||
|
||
The GNU General Public License is a free, copyleft license for
|
||
software and other kinds of works.
|
||
|
||
The licenses for most software and other practical works are designed
|
||
to take away your freedom to share and change the works. By contrast,
|
||
the GNU General Public License is intended to guarantee your freedom to
|
||
share and change all versions of a program--to make sure it remains free
|
||
software for all its users. We, the Free Software Foundation, use the
|
||
GNU General Public License for most of our software; it applies also to
|
||
any other work released this way by its authors. You can apply it to
|
||
your programs, too.
|
||
|
||
When we speak of free software, we are referring to freedom, not
|
||
price. Our General Public Licenses are designed to make sure that you
|
||
have the freedom to distribute copies of free software (and charge for
|
||
them if you wish), that you receive source code or can get it if you
|
||
want it, that you can change the software or use pieces of it in new
|
||
free programs, and that you know you can do these things.
|
||
|
||
To protect your rights, we need to prevent others from denying you
|
||
these rights or asking you to surrender the rights. Therefore, you have
|
||
certain responsibilities if you distribute copies of the software, or if
|
||
you modify it: responsibilities to respect the freedom of others.
|
||
|
||
For example, if you distribute copies of such a program, whether
|
||
gratis or for a fee, you must pass on to the recipients the same
|
||
freedoms that you received. You must make sure that they, too, receive
|
||
or can get the source code. And you must show them these terms so they
|
||
know their rights.
|
||
|
||
Developers that use the GNU GPL protect your rights with two steps:
|
||
(1) assert copyright on the software, and (2) offer you this License
|
||
giving you legal permission to copy, distribute and/or modify it.
|
||
|
||
For the developers' and authors' protection, the GPL clearly explains
|
||
that there is no warranty for this free software. For both users' and
|
||
authors' sake, the GPL requires that modified versions be marked as
|
||
changed, so that their problems will not be attributed erroneously to
|
||
authors of previous versions.
|
||
|
||
Some devices are designed to deny users access to install or run
|
||
modified versions of the software inside them, although the manufacturer
|
||
can do so. This is fundamentally incompatible with the aim of
|
||
protecting users' freedom to change the software. The systematic
|
||
pattern of such abuse occurs in the area of products for individuals to
|
||
use, which is precisely where it is most unacceptable. Therefore, we
|
||
have designed this version of the GPL to prohibit the practice for those
|
||
products. If such problems arise substantially in other domains, we
|
||
stand ready to extend this provision to those domains in future versions
|
||
of the GPL, as needed to protect the freedom of users.
|
||
|
||
Finally, every program is threatened constantly by software patents.
|
||
States should not allow patents to restrict development and use of
|
||
software on general-purpose computers, but in those that do, we wish to
|
||
avoid the special danger that patents applied to a free program could
|
||
make it effectively proprietary. To prevent this, the GPL assures that
|
||
patents cannot be used to render the program non-free.
|
||
|
||
The precise terms and conditions for copying, distribution and
|
||
modification follow.
|
||
|
||
TERMS AND CONDITIONS
|
||
|
||
0. Definitions.
|
||
|
||
"This License" refers to version 3 of the GNU General Public License.
|
||
|
||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||
works, such as semiconductor masks.
|
||
|
||
"The Program" refers to any copyrightable work licensed under this
|
||
License. Each licensee is addressed as "you". "Licensees" and
|
||
"recipients" may be individuals or organizations.
|
||
|
||
To "modify" a work means to copy from or adapt all or part of the work
|
||
in a fashion requiring copyright permission, other than the making of an
|
||
exact copy. The resulting work is called a "modified version" of the
|
||
earlier work or a work "based on" the earlier work.
|
||
|
||
A "covered work" means either the unmodified Program or a work based
|
||
on the Program.
|
||
|
||
To "propagate" a work means to do anything with it that, without
|
||
permission, would make you directly or secondarily liable for
|
||
infringement under applicable copyright law, except executing it on a
|
||
computer or modifying a private copy. Propagation includes copying,
|
||
distribution (with or without modification), making available to the
|
||
public, and in some countries other activities as well.
|
||
|
||
To "convey" a work means any kind of propagation that enables other
|
||
parties to make or receive copies. Mere interaction with a user through
|
||
a computer network, with no transfer of a copy, is not conveying.
|
||
|
||
An interactive user interface displays "Appropriate Legal Notices"
|
||
to the extent that it includes a convenient and prominently visible
|
||
feature that (1) displays an appropriate copyright notice, and (2)
|
||
tells the user that there is no warranty for the work (except to the
|
||
extent that warranties are provided), that licensees may convey the
|
||
work under this License, and how to view a copy of this License. If
|
||
the interface presents a list of user commands or options, such as a
|
||
menu, a prominent item in the list meets this criterion.
|
||
|
||
1. Source Code.
|
||
|
||
The "source code" for a work means the preferred form of the work
|
||
for making modifications to it. "Object code" means any non-source
|
||
form of a work.
|
||
|
||
A "Standard Interface" means an interface that either is an official
|
||
standard defined by a recognized standards body, or, in the case of
|
||
interfaces specified for a particular programming language, one that
|
||
is widely used among developers working in that language.
|
||
|
||
The "System Libraries" of an executable work include anything, other
|
||
than the work as a whole, that (a) is included in the normal form of
|
||
packaging a Major Component, but which is not part of that Major
|
||
Component, and (b) serves only to enable use of the work with that
|
||
Major Component, or to implement a Standard Interface for which an
|
||
implementation is available to the public in source code form. A
|
||
"Major Component", in this context, means a major essential component
|
||
(kernel, window system, and so on) of the specific operating system
|
||
(if any) on which the executable work runs, or a compiler used to
|
||
produce the work, or an object code interpreter used to run it.
|
||
|
||
The "Corresponding Source" for a work in object code form means all
|
||
the source code needed to generate, install, and (for an executable
|
||
work) run the object code and to modify the work, including scripts to
|
||
control those activities. However, it does not include the work's
|
||
System Libraries, or general-purpose tools or generally available free
|
||
programs which are used unmodified in performing those activities but
|
||
which are not part of the work. For example, Corresponding Source
|
||
includes interface definition files associated with source files for
|
||
the work, and the source code for shared libraries and dynamically
|
||
linked subprograms that the work is specifically designed to require,
|
||
such as by intimate data communication or control flow between those
|
||
subprograms and other parts of the work.
|
||
|
||
The Corresponding Source need not include anything that users
|
||
can regenerate automatically from other parts of the Corresponding
|
||
Source.
|
||
|
||
The Corresponding Source for a work in source code form is that
|
||
same work.
|
||
|
||
2. Basic Permissions.
|
||
|
||
All rights granted under this License are granted for the term of
|
||
copyright on the Program, and are irrevocable provided the stated
|
||
conditions are met. This License explicitly affirms your unlimited
|
||
permission to run the unmodified Program. The output from running a
|
||
covered work is covered by this License only if the output, given its
|
||
content, constitutes a covered work. This License acknowledges your
|
||
rights of fair use or other equivalent, as provided by copyright law.
|
||
|
||
You may make, run and propagate covered works that you do not
|
||
convey, without conditions so long as your license otherwise remains
|
||
in force. You may convey covered works to others for the sole purpose
|
||
of having them make modifications exclusively for you, or provide you
|
||
with facilities for running those works, provided that you comply with
|
||
the terms of this License in conveying all material for which you do
|
||
not control copyright. Those thus making or running the covered works
|
||
for you must do so exclusively on your behalf, under your direction
|
||
and control, on terms that prohibit them from making any copies of
|
||
your copyrighted material outside their relationship with you.
|
||
|
||
Conveying under any other circumstances is permitted solely under
|
||
the conditions stated below. Sublicensing is not allowed; section 10
|
||
makes it unnecessary.
|
||
|
||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||
|
||
No covered work shall be deemed part of an effective technological
|
||
measure under any applicable law fulfilling obligations under article
|
||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||
similar laws prohibiting or restricting circumvention of such
|
||
measures.
|
||
|
||
When you convey a covered work, you waive any legal power to forbid
|
||
circumvention of technological measures to the extent such circumvention
|
||
is effected by exercising rights under this License with respect to
|
||
the covered work, and you disclaim any intention to limit operation or
|
||
modification of the work as a means of enforcing, against the work's
|
||
users, your or third parties' legal rights to forbid circumvention of
|
||
technological measures.
|
||
|
||
4. Conveying Verbatim Copies.
|
||
|
||
You may convey verbatim copies of the Program's source code as you
|
||
receive it, in any medium, provided that you conspicuously and
|
||
appropriately publish on each copy an appropriate copyright notice;
|
||
keep intact all notices stating that this License and any
|
||
non-permissive terms added in accord with section 7 apply to the code;
|
||
keep intact all notices of the absence of any warranty; and give all
|
||
recipients a copy of this License along with the Program.
|
||
|
||
You may charge any price or no price for each copy that you convey,
|
||
and you may offer support or warranty protection for a fee.
|
||
|
||
5. Conveying Modified Source Versions.
|
||
|
||
You may convey a work based on the Program, or the modifications to
|
||
produce it from the Program, in the form of source code under the
|
||
terms of section 4, provided that you also meet all of these conditions:
|
||
|
||
a) The work must carry prominent notices stating that you modified
|
||
it, and giving a relevant date.
|
||
|
||
b) The work must carry prominent notices stating that it is
|
||
released under this License and any conditions added under section
|
||
7. This requirement modifies the requirement in section 4 to
|
||
"keep intact all notices".
|
||
|
||
c) You must license the entire work, as a whole, under this
|
||
License to anyone who comes into possession of a copy. This
|
||
License will therefore apply, along with any applicable section 7
|
||
additional terms, to the whole of the work, and all its parts,
|
||
regardless of how they are packaged. This License gives no
|
||
permission to license the work in any other way, but it does not
|
||
invalidate such permission if you have separately received it.
|
||
|
||
d) If the work has interactive user interfaces, each must display
|
||
Appropriate Legal Notices; however, if the Program has interactive
|
||
interfaces that do not display Appropriate Legal Notices, your
|
||
work need not make them do so.
|
||
|
||
A compilation of a covered work with other separate and independent
|
||
works, which are not by their nature extensions of the covered work,
|
||
and which are not combined with it such as to form a larger program,
|
||
in or on a volume of a storage or distribution medium, is called an
|
||
"aggregate" if the compilation and its resulting copyright are not
|
||
used to limit the access or legal rights of the compilation's users
|
||
beyond what the individual works permit. Inclusion of a covered work
|
||
in an aggregate does not cause this License to apply to the other
|
||
parts of the aggregate.
|
||
|
||
6. Conveying Non-Source Forms.
|
||
|
||
You may convey a covered work in object code form under the terms
|
||
of sections 4 and 5, provided that you also convey the
|
||
machine-readable Corresponding Source under the terms of this License,
|
||
in one of these ways:
|
||
|
||
a) Convey the object code in, or embodied in, a physical product
|
||
(including a physical distribution medium), accompanied by the
|
||
Corresponding Source fixed on a durable physical medium
|
||
customarily used for software interchange.
|
||
|
||
b) Convey the object code in, or embodied in, a physical product
|
||
(including a physical distribution medium), accompanied by a
|
||
written offer, valid for at least three years and valid for as
|
||
long as you offer spare parts or customer support for that product
|
||
model, to give anyone who possesses the object code either (1) a
|
||
copy of the Corresponding Source for all the software in the
|
||
product that is covered by this License, on a durable physical
|
||
medium customarily used for software interchange, for a price no
|
||
more than your reasonable cost of physically performing this
|
||
conveying of source, or (2) access to copy the
|
||
Corresponding Source from a network server at no charge.
|
||
|
||
c) Convey individual copies of the object code with a copy of the
|
||
written offer to provide the Corresponding Source. This
|
||
alternative is allowed only occasionally and noncommercially, and
|
||
only if you received the object code with such an offer, in accord
|
||
with subsection 6b.
|
||
|
||
d) Convey the object code by offering access from a designated
|
||
place (gratis or for a charge), and offer equivalent access to the
|
||
Corresponding Source in the same way through the same place at no
|
||
further charge. You need not require recipients to copy the
|
||
Corresponding Source along with the object code. If the place to
|
||
copy the object code is a network server, the Corresponding Source
|
||
may be on a different server (operated by you or a third party)
|
||
that supports equivalent copying facilities, provided you maintain
|
||
clear directions next to the object code saying where to find the
|
||
Corresponding Source. Regardless of what server hosts the
|
||
Corresponding Source, you remain obligated to ensure that it is
|
||
available for as long as needed to satisfy these requirements.
|
||
|
||
e) Convey the object code using peer-to-peer transmission, provided
|
||
you inform other peers where the object code and Corresponding
|
||
Source of the work are being offered to the general public at no
|
||
charge under subsection 6d.
|
||
|
||
A separable portion of the object code, whose source code is excluded
|
||
from the Corresponding Source as a System Library, need not be
|
||
included in conveying the object code work.
|
||
|
||
A "User Product" is either (1) a "consumer product", which means any
|
||
tangible personal property which is normally used for personal, family,
|
||
or household purposes, or (2) anything designed or sold for incorporation
|
||
into a dwelling. In determining whether a product is a consumer product,
|
||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||
product received by a particular user, "normally used" refers to a
|
||
typical or common use of that class of product, regardless of the status
|
||
of the particular user or of the way in which the particular user
|
||
actually uses, or expects or is expected to use, the product. A product
|
||
is a consumer product regardless of whether the product has substantial
|
||
commercial, industrial or non-consumer uses, unless such uses represent
|
||
the only significant mode of use of the product.
|
||
|
||
"Installation Information" for a User Product means any methods,
|
||
procedures, authorization keys, or other information required to install
|
||
and execute modified versions of a covered work in that User Product from
|
||
a modified version of its Corresponding Source. The information must
|
||
suffice to ensure that the continued functioning of the modified object
|
||
code is in no case prevented or interfered with solely because
|
||
modification has been made.
|
||
|
||
If you convey an object code work under this section in, or with, or
|
||
specifically for use in, a User Product, and the conveying occurs as
|
||
part of a transaction in which the right of possession and use of the
|
||
User Product is transferred to the recipient in perpetuity or for a
|
||
fixed term (regardless of how the transaction is characterized), the
|
||
Corresponding Source conveyed under this section must be accompanied
|
||
by the Installation Information. But this requirement does not apply
|
||
if neither you nor any third party retains the ability to install
|
||
modified object code on the User Product (for example, the work has
|
||
been installed in ROM).
|
||
|
||
The requirement to provide Installation Information does not include a
|
||
requirement to continue to provide support service, warranty, or updates
|
||
for a work that has been modified or installed by the recipient, or for
|
||
the User Product in which it has been modified or installed. Access to a
|
||
network may be denied when the modification itself materially and
|
||
adversely affects the operation of the network or violates the rules and
|
||
protocols for communication across the network.
|
||
|
||
Corresponding Source conveyed, and Installation Information provided,
|
||
in accord with this section must be in a format that is publicly
|
||
documented (and with an implementation available to the public in
|
||
source code form), and must require no special password or key for
|
||
unpacking, reading or copying.
|
||
|
||
7. Additional Terms.
|
||
|
||
"Additional permissions" are terms that supplement the terms of this
|
||
License by making exceptions from one or more of its conditions.
|
||
Additional permissions that are applicable to the entire Program shall
|
||
be treated as though they were included in this License, to the extent
|
||
that they are valid under applicable law. If additional permissions
|
||
apply only to part of the Program, that part may be used separately
|
||
under those permissions, but the entire Program remains governed by
|
||
this License without regard to the additional permissions.
|
||
|
||
When you convey a copy of a covered work, you may at your option
|
||
remove any additional permissions from that copy, or from any part of
|
||
it. (Additional permissions may be written to require their own
|
||
removal in certain cases when you modify the work.) You may place
|
||
additional permissions on material, added by you to a covered work,
|
||
for which you have or can give appropriate copyright permission.
|
||
|
||
Notwithstanding any other provision of this License, for material you
|
||
add to a covered work, you may (if authorized by the copyright holders of
|
||
that material) supplement the terms of this License with terms:
|
||
|
||
a) Disclaiming warranty or limiting liability differently from the
|
||
terms of sections 15 and 16 of this License; or
|
||
|
||
b) Requiring preservation of specified reasonable legal notices or
|
||
author attributions in that material or in the Appropriate Legal
|
||
Notices displayed by works containing it; or
|
||
|
||
c) Prohibiting misrepresentation of the origin of that material, or
|
||
requiring that modified versions of such material be marked in
|
||
reasonable ways as different from the original version; or
|
||
|
||
d) Limiting the use for publicity purposes of names of licensors or
|
||
authors of the material; or
|
||
|
||
e) Declining to grant rights under trademark law for use of some
|
||
trade names, trademarks, or service marks; or
|
||
|
||
f) Requiring indemnification of licensors and authors of that
|
||
material by anyone who conveys the material (or modified versions of
|
||
it) with contractual assumptions of liability to the recipient, for
|
||
any liability that these contractual assumptions directly impose on
|
||
those licensors and authors.
|
||
|
||
All other non-permissive additional terms are considered "further
|
||
restrictions" within the meaning of section 10. If the Program as you
|
||
received it, or any part of it, contains a notice stating that it is
|
||
governed by this License along with a term that is a further
|
||
restriction, you may remove that term. If a license document contains
|
||
a further restriction but permits relicensing or conveying under this
|
||
License, you may add to a covered work material governed by the terms
|
||
of that license document, provided that the further restriction does
|
||
not survive such relicensing or conveying.
|
||
|
||
If you add terms to a covered work in accord with this section, you
|
||
must place, in the relevant source files, a statement of the
|
||
additional terms that apply to those files, or a notice indicating
|
||
where to find the applicable terms.
|
||
|
||
Additional terms, permissive or non-permissive, may be stated in the
|
||
form of a separately written license, or stated as exceptions;
|
||
the above requirements apply either way.
|
||
|
||
8. Termination.
|
||
|
||
You may not propagate or modify a covered work except as expressly
|
||
provided under this License. Any attempt otherwise to propagate or
|
||
modify it is void, and will automatically terminate your rights under
|
||
this License (including any patent licenses granted under the third
|
||
paragraph of section 11).
|
||
|
||
However, if you cease all violation of this License, then your
|
||
license from a particular copyright holder is reinstated (a)
|
||
provisionally, unless and until the copyright holder explicitly and
|
||
finally terminates your license, and (b) permanently, if the copyright
|
||
holder fails to notify you of the violation by some reasonable means
|
||
prior to 60 days after the cessation.
|
||
|
||
Moreover, your license from a particular copyright holder is
|
||
reinstated permanently if the copyright holder notifies you of the
|
||
violation by some reasonable means, this is the first time you have
|
||
received notice of violation of this License (for any work) from that
|
||
copyright holder, and you cure the violation prior to 30 days after
|
||
your receipt of the notice.
|
||
|
||
Termination of your rights under this section does not terminate the
|
||
licenses of parties who have received copies or rights from you under
|
||
this License. If your rights have been terminated and not permanently
|
||
reinstated, you do not qualify to receive new licenses for the same
|
||
material under section 10.
|
||
|
||
9. Acceptance Not Required for Having Copies.
|
||
|
||
You are not required to accept this License in order to receive or
|
||
run a copy of the Program. Ancillary propagation of a covered work
|
||
occurring solely as a consequence of using peer-to-peer transmission
|
||
to receive a copy likewise does not require acceptance. However,
|
||
nothing other than this License grants you permission to propagate or
|
||
modify any covered work. These actions infringe copyright if you do
|
||
not accept this License. Therefore, by modifying or propagating a
|
||
covered work, you indicate your acceptance of this License to do so.
|
||
|
||
10. Automatic Licensing of Downstream Recipients.
|
||
|
||
Each time you convey a covered work, the recipient automatically
|
||
receives a license from the original licensors, to run, modify and
|
||
propagate that work, subject to this License. You are not responsible
|
||
for enforcing compliance by third parties with this License.
|
||
|
||
An "entity transaction" is a transaction transferring control of an
|
||
organization, or substantially all assets of one, or subdividing an
|
||
organization, or merging organizations. If propagation of a covered
|
||
work results from an entity transaction, each party to that
|
||
transaction who receives a copy of the work also receives whatever
|
||
licenses to the work the party's predecessor in interest had or could
|
||
give under the previous paragraph, plus a right to possession of the
|
||
Corresponding Source of the work from the predecessor in interest, if
|
||
the predecessor has it or can get it with reasonable efforts.
|
||
|
||
You may not impose any further restrictions on the exercise of the
|
||
rights granted or affirmed under this License. For example, you may
|
||
not impose a license fee, royalty, or other charge for exercise of
|
||
rights granted under this License, and you may not initiate litigation
|
||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||
any patent claim is infringed by making, using, selling, offering for
|
||
sale, or importing the Program or any portion of it.
|
||
|
||
11. Patents.
|
||
|
||
A "contributor" is a copyright holder who authorizes use under this
|
||
License of the Program or a work on which the Program is based. The
|
||
work thus licensed is called the contributor's "contributor version".
|
||
|
||
A contributor's "essential patent claims" are all patent claims
|
||
owned or controlled by the contributor, whether already acquired or
|
||
hereafter acquired, that would be infringed by some manner, permitted
|
||
by this License, of making, using, or selling its contributor version,
|
||
but do not include claims that would be infringed only as a
|
||
consequence of further modification of the contributor version. For
|
||
purposes of this definition, "control" includes the right to grant
|
||
patent sublicenses in a manner consistent with the requirements of
|
||
this License.
|
||
|
||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||
patent license under the contributor's essential patent claims, to
|
||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||
propagate the contents of its contributor version.
|
||
|
||
In the following three paragraphs, a "patent license" is any express
|
||
agreement or commitment, however denominated, not to enforce a patent
|
||
(such as an express permission to practice a patent or covenant not to
|
||
sue for patent infringement). To "grant" such a patent license to a
|
||
party means to make such an agreement or commitment not to enforce a
|
||
patent against the party.
|
||
|
||
If you convey a covered work, knowingly relying on a patent license,
|
||
and the Corresponding Source of the work is not available for anyone
|
||
to copy, free of charge and under the terms of this License, through a
|
||
publicly available network server or other readily accessible means,
|
||
then you must either (1) cause the Corresponding Source to be so
|
||
available, or (2) arrange to deprive yourself of the benefit of the
|
||
patent license for this particular work, or (3) arrange, in a manner
|
||
consistent with the requirements of this License, to extend the patent
|
||
license to downstream recipients. "Knowingly relying" means you have
|
||
actual knowledge that, but for the patent license, your conveying the
|
||
covered work in a country, or your recipient's use of the covered work
|
||
in a country, would infringe one or more identifiable patents in that
|
||
country that you have reason to believe are valid.
|
||
|
||
If, pursuant to or in connection with a single transaction or
|
||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||
covered work, and grant a patent license to some of the parties
|
||
receiving the covered work authorizing them to use, propagate, modify
|
||
or convey a specific copy of the covered work, then the patent license
|
||
you grant is automatically extended to all recipients of the covered
|
||
work and works based on it.
|
||
|
||
A patent license is "discriminatory" if it does not include within
|
||
the scope of its coverage, prohibits the exercise of, or is
|
||
conditioned on the non-exercise of one or more of the rights that are
|
||
specifically granted under this License. You may not convey a covered
|
||
work if you are a party to an arrangement with a third party that is
|
||
in the business of distributing software, under which you make payment
|
||
to the third party based on the extent of your activity of conveying
|
||
the work, and under which the third party grants, to any of the
|
||
parties who would receive the covered work from you, a discriminatory
|
||
patent license (a) in connection with copies of the covered work
|
||
conveyed by you (or copies made from those copies), or (b) primarily
|
||
for and in connection with specific products or compilations that
|
||
contain the covered work, unless you entered into that arrangement,
|
||
or that patent license was granted, prior to 28 March 2007.
|
||
|
||
Nothing in this License shall be construed as excluding or limiting
|
||
any implied license or other defenses to infringement that may
|
||
otherwise be available to you under applicable patent law.
|
||
|
||
12. No Surrender of Others' Freedom.
|
||
|
||
If conditions are imposed on you (whether by court order, agreement or
|
||
otherwise) that contradict the conditions of this License, they do not
|
||
excuse you from the conditions of this License. If you cannot convey a
|
||
covered work so as to satisfy simultaneously your obligations under this
|
||
License and any other pertinent obligations, then as a consequence you may
|
||
not convey it at all. For example, if you agree to terms that obligate you
|
||
to collect a royalty for further conveying from those to whom you convey
|
||
the Program, the only way you could satisfy both those terms and this
|
||
License would be to refrain entirely from conveying the Program.
|
||
|
||
13. Use with the GNU Affero General Public License.
|
||
|
||
Notwithstanding any other provision of this License, you have
|
||
permission to link or combine any covered work with a work licensed
|
||
under version 3 of the GNU Affero General Public License into a single
|
||
combined work, and to convey the resulting work. The terms of this
|
||
License will continue to apply to the part which is the covered work,
|
||
but the special requirements of the GNU Affero General Public License,
|
||
section 13, concerning interaction through a network will apply to the
|
||
combination as such.
|
||
|
||
14. Revised Versions of this License.
|
||
|
||
The Free Software Foundation may publish revised and/or new versions of
|
||
the GNU General Public License from time to time. Such new versions will
|
||
be similar in spirit to the present version, but may differ in detail to
|
||
address new problems or concerns.
|
||
|
||
Each version is given a distinguishing version number. If the
|
||
Program specifies that a certain numbered version of the GNU General
|
||
Public License "or any later version" applies to it, you have the
|
||
option of following the terms and conditions either of that numbered
|
||
version or of any later version published by the Free Software
|
||
Foundation. If the Program does not specify a version number of the
|
||
GNU General Public License, you may choose any version ever published
|
||
by the Free Software Foundation.
|
||
|
||
If the Program specifies that a proxy can decide which future
|
||
versions of the GNU General Public License can be used, that proxy's
|
||
public statement of acceptance of a version permanently authorizes you
|
||
to choose that version for the Program.
|
||
|
||
Later license versions may give you additional or different
|
||
permissions. However, no additional obligations are imposed on any
|
||
author or copyright holder as a result of your choosing to follow a
|
||
later version.
|
||
|
||
15. Disclaimer of Warranty.
|
||
|
||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||
|
||
16. Limitation of Liability.
|
||
|
||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||
SUCH DAMAGES.
|
||
|
||
17. Interpretation of Sections 15 and 16.
|
||
|
||
If the disclaimer of warranty and limitation of liability provided
|
||
above cannot be given local legal effect according to their terms,
|
||
reviewing courts shall apply local law that most closely approximates
|
||
an absolute waiver of all civil liability in connection with the
|
||
Program, unless a warranty or assumption of liability accompanies a
|
||
copy of the Program in return for a fee.
|
||
|
||
END OF TERMS AND CONDITIONS
|
||
|
||
How to Apply These Terms to Your New Programs
|
||
|
||
If you develop a new program, and you want it to be of the greatest
|
||
possible use to the public, the best way to achieve this is to make it
|
||
free software which everyone can redistribute and change under these terms.
|
||
|
||
To do so, attach the following notices to the program. It is safest
|
||
to attach them to the start of each source file to most effectively
|
||
state the exclusion of warranty; and each file should have at least
|
||
the "copyright" line and a pointer to where the full notice is found.
|
||
|
||
<one line to give the program's name and a brief idea of what it does.>
|
||
Copyright (C) <year> <name of author>
|
||
|
||
This program is free software: you can redistribute it and/or modify
|
||
it under the terms of the GNU 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 General Public License for more details.
|
||
|
||
You should have received a copy of the GNU General Public License
|
||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
|
||
Also add information on how to contact you by electronic and paper mail.
|
||
|
||
If the program does terminal interaction, make it output a short
|
||
notice like this when it starts in an interactive mode:
|
||
|
||
<program> Copyright (C) <year> <name of author>
|
||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||
This is free software, and you are welcome to redistribute it
|
||
under certain conditions; type `show c' for details.
|
||
|
||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||
parts of the General Public License. Of course, your program's commands
|
||
might be different; for a GUI interface, you would use an "about box".
|
||
|
||
You should also get your employer (if you work as a programmer) or school,
|
||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||
For more information on this, and how to apply and follow the GNU GPL, see
|
||
<http://www.gnu.org/licenses/>.
|
||
|
||
The GNU General Public License does not permit incorporating your program
|
||
into proprietary programs. If your program is a subroutine library, you
|
||
may consider it more useful to permit linking proprietary applications with
|
||
the library. If this is what you want to do, use the GNU Lesser General
|
||
Public License instead of this License. But first, please read
|
||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
DS/DS/LICENSE | ||
---|---|---|
GNU GENERAL PUBLIC LICENSE
|
||
Version 3, 29 June 2007
|
||
|
||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||
Everyone is permitted to copy and distribute verbatim copies
|
||
of this license document, but changing it is not allowed.
|
||
|
||
Preamble
|
||
|
||
The GNU General Public License is a free, copyleft license for
|
||
software and other kinds of works.
|
||
|
||
The licenses for most software and other practical works are designed
|
||
to take away your freedom to share and change the works. By contrast,
|
||
the GNU General Public License is intended to guarantee your freedom to
|
||
share and change all versions of a program--to make sure it remains free
|
||
software for all its users. We, the Free Software Foundation, use the
|
||
GNU General Public License for most of our software; it applies also to
|
||
any other work released this way by its authors. You can apply it to
|
||
your programs, too.
|
||
|
||
When we speak of free software, we are referring to freedom, not
|
||
price. Our General Public Licenses are designed to make sure that you
|
||
have the freedom to distribute copies of free software (and charge for
|
||
them if you wish), that you receive source code or can get it if you
|
||
want it, that you can change the software or use pieces of it in new
|
||
free programs, and that you know you can do these things.
|
||
|
||
To protect your rights, we need to prevent others from denying you
|
||
these rights or asking you to surrender the rights. Therefore, you have
|
||
certain responsibilities if you distribute copies of the software, or if
|
||
you modify it: responsibilities to respect the freedom of others.
|
||
|
||
For example, if you distribute copies of such a program, whether
|
||
gratis or for a fee, you must pass on to the recipients the same
|
||
freedoms that you received. You must make sure that they, too, receive
|
||
or can get the source code. And you must show them these terms so they
|
||
know their rights.
|
||
|
||
Developers that use the GNU GPL protect your rights with two steps:
|
||
(1) assert copyright on the software, and (2) offer you this License
|
||
giving you legal permission to copy, distribute and/or modify it.
|
||
|
||
For the developers' and authors' protection, the GPL clearly explains
|
||
that there is no warranty for this free software. For both users' and
|
||
authors' sake, the GPL requires that modified versions be marked as
|
||
changed, so that their problems will not be attributed erroneously to
|
||
authors of previous versions.
|
||
|
||
Some devices are designed to deny users access to install or run
|
||
modified versions of the software inside them, although the manufacturer
|
||
can do so. This is fundamentally incompatible with the aim of
|
||
protecting users' freedom to change the software. The systematic
|
||
pattern of such abuse occurs in the area of products for individuals to
|
||
use, which is precisely where it is most unacceptable. Therefore, we
|
||
have designed this version of the GPL to prohibit the practice for those
|
||
products. If such problems arise substantially in other domains, we
|
||
stand ready to extend this provision to those domains in future versions
|
||
of the GPL, as needed to protect the freedom of users.
|
||
|
||
Finally, every program is threatened constantly by software patents.
|
||
States should not allow patents to restrict development and use of
|
||
software on general-purpose computers, but in those that do, we wish to
|
||
avoid the special danger that patents applied to a free program could
|
||
make it effectively proprietary. To prevent this, the GPL assures that
|
||
patents cannot be used to render the program non-free.
|
||
|
||
The precise terms and conditions for copying, distribution and
|
||
modification follow.
|
||
|
||
TERMS AND CONDITIONS
|
||
|
||
0. Definitions.
|
||
|
||
"This License" refers to version 3 of the GNU General Public License.
|
||
|
||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||
works, such as semiconductor masks.
|
||
|
||
"The Program" refers to any copyrightable work licensed under this
|
||
License. Each licensee is addressed as "you". "Licensees" and
|
||
"recipients" may be individuals or organizations.
|
||
|
||
To "modify" a work means to copy from or adapt all or part of the work
|
||
in a fashion requiring copyright permission, other than the making of an
|
||
exact copy. The resulting work is called a "modified version" of the
|
||
earlier work or a work "based on" the earlier work.
|
||
|
||
A "covered work" means either the unmodified Program or a work based
|
||
on the Program.
|
||
|
||
To "propagate" a work means to do anything with it that, without
|
||
permission, would make you directly or secondarily liable for
|
||
infringement under applicable copyright law, except executing it on a
|
||
computer or modifying a private copy. Propagation includes copying,
|
||
distribution (with or without modification), making available to the
|
||
public, and in some countries other activities as well.
|
||
|
||
To "convey" a work means any kind of propagation that enables other
|
||
parties to make or receive copies. Mere interaction with a user through
|
||
a computer network, with no transfer of a copy, is not conveying.
|
||
|
||
An interactive user interface displays "Appropriate Legal Notices"
|
||
to the extent that it includes a convenient and prominently visible
|
||
feature that (1) displays an appropriate copyright notice, and (2)
|
||
tells the user that there is no warranty for the work (except to the
|
||
extent that warranties are provided), that licensees may convey the
|
||
work under this License, and how to view a copy of this License. If
|
||
the interface presents a list of user commands or options, such as a
|
||
menu, a prominent item in the list meets this criterion.
|
||
|
||
1. Source Code.
|
||
|
||
The "source code" for a work means the preferred form of the work
|
||
for making modifications to it. "Object code" means any non-source
|
||
form of a work.
|
||
|
||
A "Standard Interface" means an interface that either is an official
|
||
standard defined by a recognized standards body, or, in the case of
|
||
interfaces specified for a particular programming language, one that
|
||
is widely used among developers working in that language.
|
||
|
||
The "System Libraries" of an executable work include anything, other
|
||
than the work as a whole, that (a) is included in the normal form of
|
||
packaging a Major Component, but which is not part of that Major
|
||
Component, and (b) serves only to enable use of the work with that
|
||
Major Component, or to implement a Standard Interface for which an
|
||
implementation is available to the public in source code form. A
|
||
"Major Component", in this context, means a major essential component
|
||
(kernel, window system, and so on) of the specific operating system
|
||
(if any) on which the executable work runs, or a compiler used to
|
||
produce the work, or an object code interpreter used to run it.
|
||
|
||
The "Corresponding Source" for a work in object code form means all
|
||
the source code needed to generate, install, and (for an executable
|
||
work) run the object code and to modify the work, including scripts to
|
||
control those activities. However, it does not include the work's
|
||
System Libraries, or general-purpose tools or generally available free
|
||
programs which are used unmodified in performing those activities but
|
||
which are not part of the work. For example, Corresponding Source
|
||
includes interface definition files associated with source files for
|
||
the work, and the source code for shared libraries and dynamically
|
||
linked subprograms that the work is specifically designed to require,
|
||
such as by intimate data communication or control flow between those
|
||
subprograms and other parts of the work.
|
||
|
||
The Corresponding Source need not include anything that users
|
||
can regenerate automatically from other parts of the Corresponding
|
||
Source.
|
||
|
||
The Corresponding Source for a work in source code form is that
|
||
same work.
|
||
|
||
2. Basic Permissions.
|
||
|
||
All rights granted under this License are granted for the term of
|
||
copyright on the Program, and are irrevocable provided the stated
|
||
conditions are met. This License explicitly affirms your unlimited
|
||
permission to run the unmodified Program. The output from running a
|
||
covered work is covered by this License only if the output, given its
|
||
content, constitutes a covered work. This License acknowledges your
|
||
rights of fair use or other equivalent, as provided by copyright law.
|
||
|
||
You may make, run and propagate covered works that you do not
|
||
convey, without conditions so long as your license otherwise remains
|
||
in force. You may convey covered works to others for the sole purpose
|
||
of having them make modifications exclusively for you, or provide you
|
||
with facilities for running those works, provided that you comply with
|
||
the terms of this License in conveying all material for which you do
|
||
not control copyright. Those thus making or running the covered works
|
||
for you must do so exclusively on your behalf, under your direction
|
||
and control, on terms that prohibit them from making any copies of
|
||
your copyrighted material outside their relationship with you.
|
||
|
||
Conveying under any other circumstances is permitted solely under
|
||
the conditions stated below. Sublicensing is not allowed; section 10
|
||
makes it unnecessary.
|
||
|
||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||
|
||
No covered work shall be deemed part of an effective technological
|
||
measure under any applicable law fulfilling obligations under article
|
||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||
similar laws prohibiting or restricting circumvention of such
|
||
measures.
|
||
|
||
When you convey a covered work, you waive any legal power to forbid
|
||
circumvention of technological measures to the extent such circumvention
|
||
is effected by exercising rights under this License with respect to
|
||
the covered work, and you disclaim any intention to limit operation or
|
||
modification of the work as a means of enforcing, against the work's
|
||
users, your or third parties' legal rights to forbid circumvention of
|
||
technological measures.
|
||
|
||
4. Conveying Verbatim Copies.
|
||
|
||
You may convey verbatim copies of the Program's source code as you
|
||
receive it, in any medium, provided that you conspicuously and
|
||
appropriately publish on each copy an appropriate copyright notice;
|
||
keep intact all notices stating that this License and any
|
||
non-permissive terms added in accord with section 7 apply to the code;
|
||
keep intact all notices of the absence of any warranty; and give all
|
||
recipients a copy of this License along with the Program.
|
||
|
||
You may charge any price or no price for each copy that you convey,
|
||
and you may offer support or warranty protection for a fee.
|
||
|
||
5. Conveying Modified Source Versions.
|
||
|
||
You may convey a work based on the Program, or the modifications to
|
||
produce it from the Program, in the form of source code under the
|
||
terms of section 4, provided that you also meet all of these conditions:
|
||
|
||
a) The work must carry prominent notices stating that you modified
|
||
it, and giving a relevant date.
|
||
|
||
b) The work must carry prominent notices stating that it is
|
||
released under this License and any conditions added under section
|
||
7. This requirement modifies the requirement in section 4 to
|
||
"keep intact all notices".
|
||
|
||
c) You must license the entire work, as a whole, under this
|
||
License to anyone who comes into possession of a copy. This
|
||
License will therefore apply, along with any applicable section 7
|
||
additional terms, to the whole of the work, and all its parts,
|
||
regardless of how they are packaged. This License gives no
|
||
permission to license the work in any other way, but it does not
|
||
invalidate such permission if you have separately received it.
|
||
|
||
d) If the work has interactive user interfaces, each must display
|
||
Appropriate Legal Notices; however, if the Program has interactive
|
||
interfaces that do not display Appropriate Legal Notices, your
|
||
work need not make them do so.
|
||
|
||
A compilation of a covered work with other separate and independent
|
||
works, which are not by their nature extensions of the covered work,
|
||
and which are not combined with it such as to form a larger program,
|
||
in or on a volume of a storage or distribution medium, is called an
|
||
"aggregate" if the compilation and its resulting copyright are not
|
||
used to limit the access or legal rights of the compilation's users
|
||
beyond what the individual works permit. Inclusion of a covered work
|
||
in an aggregate does not cause this License to apply to the other
|
||
parts of the aggregate.
|
||
|
||
6. Conveying Non-Source Forms.
|
||
|
||
You may convey a covered work in object code form under the terms
|
||
of sections 4 and 5, provided that you also convey the
|
||
machine-readable Corresponding Source under the terms of this License,
|
||
in one of these ways:
|
||
|
||
a) Convey the object code in, or embodied in, a physical product
|
||
(including a physical distribution medium), accompanied by the
|
||
Corresponding Source fixed on a durable physical medium
|
||
customarily used for software interchange.
|
||
|
||
b) Convey the object code in, or embodied in, a physical product
|
||
(including a physical distribution medium), accompanied by a
|
||
written offer, valid for at least three years and valid for as
|
||
long as you offer spare parts or customer support for that product
|
||
model, to give anyone who possesses the object code either (1) a
|
||
copy of the Corresponding Source for all the software in the
|
||
product that is covered by this License, on a durable physical
|
||
medium customarily used for software interchange, for a price no
|
||
more than your reasonable cost of physically performing this
|
||
conveying of source, or (2) access to copy the
|
||
Corresponding Source from a network server at no charge.
|
||
|
||
c) Convey individual copies of the object code with a copy of the
|
||
written offer to provide the Corresponding Source. This
|
||
alternative is allowed only occasionally and noncommercially, and
|
||
only if you received the object code with such an offer, in accord
|
||
with subsection 6b.
|
||
|
||
d) Convey the object code by offering access from a designated
|
||
place (gratis or for a charge), and offer equivalent access to the
|
||
Corresponding Source in the same way through the same place at no
|
||
further charge. You need not require recipients to copy the
|
||
Corresponding Source along with the object code. If the place to
|
||
copy the object code is a network server, the Corresponding Source
|
||
may be on a different server (operated by you or a third party)
|
||
that supports equivalent copying facilities, provided you maintain
|
||
clear directions next to the object code saying where to find the
|
||
Corresponding Source. Regardless of what server hosts the
|
||
Corresponding Source, you remain obligated to ensure that it is
|
||
available for as long as needed to satisfy these requirements.
|
||
|
||
e) Convey the object code using peer-to-peer transmission, provided
|
||
you inform other peers where the object code and Corresponding
|
||
Source of the work are being offered to the general public at no
|
||
charge under subsection 6d.
|
||
|
||
A separable portion of the object code, whose source code is excluded
|
||
from the Corresponding Source as a System Library, need not be
|
||
included in conveying the object code work.
|
||
|
||
A "User Product" is either (1) a "consumer product", which means any
|
||
tangible personal property which is normally used for personal, family,
|
||
or household purposes, or (2) anything designed or sold for incorporation
|
||
into a dwelling. In determining whether a product is a consumer product,
|
||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||
product received by a particular user, "normally used" refers to a
|
||
typical or common use of that class of product, regardless of the status
|
||
of the particular user or of the way in which the particular user
|
||
actually uses, or expects or is expected to use, the product. A product
|
||
is a consumer product regardless of whether the product has substantial
|
||
commercial, industrial or non-consumer uses, unless such uses represent
|
||
the only significant mode of use of the product.
|
||
|
||
"Installation Information" for a User Product means any methods,
|
||
procedures, authorization keys, or other information required to install
|
||
and execute modified versions of a covered work in that User Product from
|
||
a modified version of its Corresponding Source. The information must
|
||
suffice to ensure that the continued functioning of the modified object
|
||
code is in no case prevented or interfered with solely because
|
||
modification has been made.
|
||
|
||
If you convey an object code work under this section in, or with, or
|
||
specifically for use in, a User Product, and the conveying occurs as
|
||
part of a transaction in which the right of possession and use of the
|
||
User Product is transferred to the recipient in perpetuity or for a
|
||
fixed term (regardless of how the transaction is characterized), the
|
||
Corresponding Source conveyed under this section must be accompanied
|
||
by the Installation Information. But this requirement does not apply
|
||
if neither you nor any third party retains the ability to install
|
||
modified object code on the User Product (for example, the work has
|
||
been installed in ROM).
|
||
|
||
The requirement to provide Installation Information does not include a
|
||
requirement to continue to provide support service, warranty, or updates
|
||
for a work that has been modified or installed by the recipient, or for
|
||
the User Product in which it has been modified or installed. Access to a
|
||
network may be denied when the modification itself materially and
|
||
adversely affects the operation of the network or violates the rules and
|
||
protocols for communication across the network.
|
||
|
||
Corresponding Source conveyed, and Installation Information provided,
|
||
in accord with this section must be in a format that is publicly
|
||
documented (and with an implementation available to the public in
|
||
source code form), and must require no special password or key for
|
||
unpacking, reading or copying.
|
||
|
||
7. Additional Terms.
|
||
|
||
"Additional permissions" are terms that supplement the terms of this
|
||
License by making exceptions from one or more of its conditions.
|
||
Additional permissions that are applicable to the entire Program shall
|
||
be treated as though they were included in this License, to the extent
|
||
that they are valid under applicable law. If additional permissions
|
||
apply only to part of the Program, that part may be used separately
|
||
under those permissions, but the entire Program remains governed by
|
||
this License without regard to the additional permissions.
|
||
|
||
When you convey a copy of a covered work, you may at your option
|
||
remove any additional permissions from that copy, or from any part of
|
||
it. (Additional permissions may be written to require their own
|
||
removal in certain cases when you modify the work.) You may place
|
||
additional permissions on material, added by you to a covered work,
|
||
for which you have or can give appropriate copyright permission.
|
||
|
||
Notwithstanding any other provision of this License, for material you
|
||
add to a covered work, you may (if authorized by the copyright holders of
|
||
that material) supplement the terms of this License with terms:
|
||
|
||
a) Disclaiming warranty or limiting liability differently from the
|
||
terms of sections 15 and 16 of this License; or
|
||
|
||
b) Requiring preservation of specified reasonable legal notices or
|
||
author attributions in that material or in the Appropriate Legal
|
||
Notices displayed by works containing it; or
|
||
|
||
c) Prohibiting misrepresentation of the origin of that material, or
|
||
requiring that modified versions of such material be marked in
|
||
reasonable ways as different from the original version; or
|
||
|
||
d) Limiting the use for publicity purposes of names of licensors or
|
||
authors of the material; or
|
||
|
||
e) Declining to grant rights under trademark law for use of some
|
||
trade names, trademarks, or service marks; or
|
||
|
||
f) Requiring indemnification of licensors and authors of that
|
||
material by anyone who conveys the material (or modified versions of
|
||
it) with contractual assumptions of liability to the recipient, for
|
||
any liability that these contractual assumptions directly impose on
|
||
those licensors and authors.
|
||
|
||
All other non-permissive additional terms are considered "further
|
||
restrictions" within the meaning of section 10. If the Program as you
|
||
received it, or any part of it, contains a notice stating that it is
|
||
governed by this License along with a term that is a further
|
||
restriction, you may remove that term. If a license document contains
|
||
a further restriction but permits relicensing or conveying under this
|
||
License, you may add to a covered work material governed by the terms
|
||
of that license document, provided that the further restriction does
|
||
not survive such relicensing or conveying.
|
||
|
||
If you add terms to a covered work in accord with this section, you
|
||
must place, in the relevant source files, a statement of the
|
||
additional terms that apply to those files, or a notice indicating
|
||
where to find the applicable terms.
|
||
|
||
Additional terms, permissive or non-permissive, may be stated in the
|
||
form of a separately written license, or stated as exceptions;
|
||
the above requirements apply either way.
|
||
|
||
8. Termination.
|
||
|
||
You may not propagate or modify a covered work except as expressly
|
||
provided under this License. Any attempt otherwise to propagate or
|
||
modify it is void, and will automatically terminate your rights under
|
||
this License (including any patent licenses granted under the third
|
||
paragraph of section 11).
|
||
|
||
However, if you cease all violation of this License, then your
|
||
license from a particular copyright holder is reinstated (a)
|
||
provisionally, unless and until the copyright holder explicitly and
|
||
finally terminates your license, and (b) permanently, if the copyright
|
||
holder fails to notify you of the violation by some reasonable means
|
||
prior to 60 days after the cessation.
|
||
|
||
Moreover, your license from a particular copyright holder is
|
||
reinstated permanently if the copyright holder notifies you of the
|
||
violation by some reasonable means, this is the first time you have
|
||
received notice of violation of this License (for any work) from that
|
||
copyright holder, and you cure the violation prior to 30 days after
|
||
your receipt of the notice.
|
||
|
||
Termination of your rights under this section does not terminate the
|
||
licenses of parties who have received copies or rights from you under
|
||
this License. If your rights have been terminated and not permanently
|
||
reinstated, you do not qualify to receive new licenses for the same
|
||
material under section 10.
|
||
|
||
9. Acceptance Not Required for Having Copies.
|
||
|
||
You are not required to accept this License in order to receive or
|
||
run a copy of the Program. Ancillary propagation of a covered work
|
||
occurring solely as a consequence of using peer-to-peer transmission
|
||
to receive a copy likewise does not require acceptance. However,
|
||
nothing other than this License grants you permission to propagate or
|
||
modify any covered work. These actions infringe copyright if you do
|
||
not accept this License. Therefore, by modifying or propagating a
|
||
covered work, you indicate your acceptance of this License to do so.
|
||
|
||
10. Automatic Licensing of Downstream Recipients.
|
||
|
||
Each time you convey a covered work, the recipient automatically
|
||
receives a license from the original licensors, to run, modify and
|
||
propagate that work, subject to this License. You are not responsible
|
||
for enforcing compliance by third parties with this License.
|
||
|
||
An "entity transaction" is a transaction transferring control of an
|
||
organization, or substantially all assets of one, or subdividing an
|
||
organization, or merging organizations. If propagation of a covered
|
||
work results from an entity transaction, each party to that
|
||
transaction who receives a copy of the work also receives whatever
|
||
licenses to the work the party's predecessor in interest had or could
|
||
give under the previous paragraph, plus a right to possession of the
|
||
Corresponding Source of the work from the predecessor in interest, if
|
||
the predecessor has it or can get it with reasonable efforts.
|
||
|
||
You may not impose any further restrictions on the exercise of the
|
||
rights granted or affirmed under this License. For example, you may
|
||
not impose a license fee, royalty, or other charge for exercise of
|
||
rights granted under this License, and you may not initiate litigation
|
||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||
any patent claim is infringed by making, using, selling, offering for
|
||
sale, or importing the Program or any portion of it.
|
||
|
||
11. Patents.
|
||
|
||
A "contributor" is a copyright holder who authorizes use under this
|
||
License of the Program or a work on which the Program is based. The
|
||
work thus licensed is called the contributor's "contributor version".
|
||
|
||
A contributor's "essential patent claims" are all patent claims
|
||
owned or controlled by the contributor, whether already acquired or
|
||
hereafter acquired, that would be infringed by some manner, permitted
|
||
by this License, of making, using, or selling its contributor version,
|
||
but do not include claims that would be infringed only as a
|
||
consequence of further modification of the contributor version. For
|
||
purposes of this definition, "control" includes the right to grant
|
||
patent sublicenses in a manner consistent with the requirements of
|
||
this License.
|
||
|
||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||
patent license under the contributor's essential patent claims, to
|
||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||
propagate the contents of its contributor version.
|
||
|
||
In the following three paragraphs, a "patent license" is any express
|
||
agreement or commitment, however denominated, not to enforce a patent
|
||
(such as an express permission to practice a patent or covenant not to
|
||
sue for patent infringement). To "grant" such a patent license to a
|
||
party means to make such an agreement or commitment not to enforce a
|
||
patent against the party.
|
||
|
||
If you convey a covered work, knowingly relying on a patent license,
|
||
and the Corresponding Source of the work is not available for anyone
|
||
to copy, free of charge and under the terms of this License, through a
|
||
publicly available network server or other readily accessible means,
|
||
then you must either (1) cause the Corresponding Source to be so
|
||
available, or (2) arrange to deprive yourself of the benefit of the
|
||
patent license for this particular work, or (3) arrange, in a manner
|
||
consistent with the requirements of this License, to extend the patent
|
||
license to downstream recipients. "Knowingly relying" means you have
|
||
actual knowledge that, but for the patent license, your conveying the
|
||
covered work in a country, or your recipient's use of the covered work
|
||
in a country, would infringe one or more identifiable patents in that
|
||
country that you have reason to believe are valid.
|
||
|
||
If, pursuant to or in connection with a single transaction or
|
||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||
covered work, and grant a patent license to some of the parties
|
||
receiving the covered work authorizing them to use, propagate, modify
|
||
or convey a specific copy of the covered work, then the patent license
|
||
you grant is automatically extended to all recipients of the covered
|
||
work and works based on it.
|
||
|
||
A patent license is "discriminatory" if it does not include within
|
||
the scope of its coverage, prohibits the exercise of, or is
|
||
conditioned on the non-exercise of one or more of the rights that are
|
||
specifically granted under this License. You may not convey a covered
|
||
work if you are a party to an arrangement with a third party that is
|
||
in the business of distributing software, under which you make payment
|
||
to the third party based on the extent of your activity of conveying
|
||
the work, and under which the third party grants, to any of the
|
||
parties who would receive the covered work from you, a discriminatory
|
||
patent license (a) in connection with copies of the covered work
|
||
conveyed by you (or copies made from those copies), or (b) primarily
|
||
for and in connection with specific products or compilations that
|
||
contain the covered work, unless you entered into that arrangement,
|
||
or that patent license was granted, prior to 28 March 2007.
|
||
|
||
Nothing in this License shall be construed as excluding or limiting
|
||
any implied license or other defenses to infringement that may
|
||
otherwise be available to you under applicable patent law.
|
||
|
||
12. No Surrender of Others' Freedom.
|
||
|
||
If conditions are imposed on you (whether by court order, agreement or
|
||
otherwise) that contradict the conditions of this License, they do not
|
||
excuse you from the conditions of this License. If you cannot convey a
|
||
covered work so as to satisfy simultaneously your obligations under this
|
||
License and any other pertinent obligations, then as a consequence you may
|
||
not convey it at all. For example, if you agree to terms that obligate you
|
||
to collect a royalty for further conveying from those to whom you convey
|
||
the Program, the only way you could satisfy both those terms and this
|
||
License would be to refrain entirely from conveying the Program.
|
||
|
||
13. Use with the GNU Affero General Public License.
|
||
|
||
Notwithstanding any other provision of this License, you have
|
||
permission to link or combine any covered work with a work licensed
|
||
under version 3 of the GNU Affero General Public License into a single
|
||
combined work, and to convey the resulting work. The terms of this
|
||
License will continue to apply to the part which is the covered work,
|
||
but the special requirements of the GNU Affero General Public License,
|
||
section 13, concerning interaction through a network will apply to the
|
||
combination as such.
|
||
|
||
14. Revised Versions of this License.
|
||
|
||
The Free Software Foundation may publish revised and/or new versions of
|
||
the GNU General Public License from time to time. Such new versions will
|
||
be similar in spirit to the present version, but may differ in detail to
|
||
address new problems or concerns.
|
||
|
||
Each version is given a distinguishing version number. If the
|
||
Program specifies that a certain numbered version of the GNU General
|
||
Public License "or any later version" applies to it, you have the
|
||
option of following the terms and conditions either of that numbered
|
||
version or of any later version published by the Free Software
|
||
Foundation. If the Program does not specify a version number of the
|
||
GNU General Public License, you may choose any version ever published
|
||
by the Free Software Foundation.
|
||
|
||
If the Program specifies that a proxy can decide which future
|
||
versions of the GNU General Public License can be used, that proxy's
|
||
public statement of acceptance of a version permanently authorizes you
|
||
to choose that version for the Program.
|
||
|
||
Later license versions may give you additional or different
|
||
permissions. However, no additional obligations are imposed on any
|
||
author or copyright holder as a result of your choosing to follow a
|
||
later version.
|
||
|
||
15. Disclaimer of Warranty.
|
||
|
||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||
|
||
16. Limitation of Liability.
|
||
|
||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||
SUCH DAMAGES.
|
||
|
||
17. Interpretation of Sections 15 and 16.
|
||
|
||
If the disclaimer of warranty and limitation of liability provided
|
||
above cannot be given local legal effect according to their terms,
|
||
reviewing courts shall apply local law that most closely approximates
|
||
an absolute waiver of all civil liability in connection with the
|
||
Program, unless a warranty or assumption of liability accompanies a
|
||
copy of the Program in return for a fee.
|
||
|
||
END OF TERMS AND CONDITIONS
|
||
|
||
How to Apply These Terms to Your New Programs
|
||
|
||
If you develop a new program, and you want it to be of the greatest
|
||
possible use to the public, the best way to achieve this is to make it
|
||
free software which everyone can redistribute and change under these terms.
|
||
|
||
To do so, attach the following notices to the program. It is safest
|
||
to attach them to the start of each source file to most effectively
|
||
state the exclusion of warranty; and each file should have at least
|
||
the "copyright" line and a pointer to where the full notice is found.
|
||
|
||
<one line to give the program's name and a brief idea of what it does.>
|
||
Copyright (C) <year> <name of author>
|
||
|
||
This program is free software: you can redistribute it and/or modify
|
||
it under the terms of the GNU 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 General Public License for more details.
|
||
|
||
You should have received a copy of the GNU General Public License
|
||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
|
||
Also add information on how to contact you by electronic and paper mail.
|
||
|
||
If the program does terminal interaction, make it output a short
|
||
notice like this when it starts in an interactive mode:
|
||
|
||
<program> Copyright (C) <year> <name of author>
|
||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||
This is free software, and you are welcome to redistribute it
|
||
under certain conditions; type `show c' for details.
|
||
|
||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||
parts of the General Public License. Of course, your program's commands
|
||
might be different; for a GUI interface, you would use an "about box".
|
||
|
||
You should also get your employer (if you work as a programmer) or school,
|
||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||
For more information on this, and how to apply and follow the GNU GPL, see
|
||
<http://www.gnu.org/licenses/>.
|
||
|
||
The GNU General Public License does not permit incorporating your program
|
||
into proprietary programs. If your program is a subroutine library, you
|
||
may consider it more useful to permit linking proprietary applications with
|
||
the library. If this is what you want to do, use the GNU Lesser General
|
||
Public License instead of this License. But first, please read
|
||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
DS/DS/LISEZMOI | ||
---|---|---|
DS - Discovery Service
|
||
|
||
Service de référencement des évènements
|
||
|
||
Dépendances:
|
||
modules IoTa:
|
||
- DS-Client
|
||
- DS-Commons
|
||
bibliothèques:
|
||
- spring
|
||
- servlet-api
|
||
- commons-logging
|
||
- log4j
|
||
|
||
Installation et Configuration:
|
||
IoTa-Installer installe et configure DS.
|
||
(application.properties pour cette application,
|
||
commons-logging.properties et log4j.properties pour les journaux)
|
||
|
||
Dépendances d’utilisation:
|
||
- un serveur MySQL
|
||
- un EPCIS
|
DS/DS/README | ||
---|---|---|
DS - Discovery Service
|
||
|
||
Indexing service for events
|
||
|
||
Dependencies:
|
||
IoTa modules:
|
||
- DS-Client
|
||
- DS-Commons
|
||
libraries:
|
||
- spring
|
||
- servlet-api
|
||
- commons-logging
|
||
- log4j
|
||
|
||
Installation and Configuration:
|
||
IoTa-Installer installs and configures DS.
|
||
(application.properties for this application,
|
||
commons-logging.properties and log4j.properties for the logs)
|
||
|
||
Usage Dependencies:
|
||
- a MySQL server
|
||
- an Epcis
|
DS/DS/catalog.xml | ||
---|---|---|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
|
||
<nextCatalog catalog="../../../../../.netbeans/7.0/var/cache/mavencachedirs/408120793/retriever/catalog.xml"/>
|
||
</catalog>
|
DS/DS/ds_schema.sql | ||
---|---|---|
--
|
||
-- Table structure for table `event`
|
||
--
|
||
|
||
SET character_set_client = utf8;
|
||
CREATE TABLE `events` (
|
||
`id` bigint(20) NOT NULL auto_increment,
|
||
`epc` varchar(128) NOT NULL,
|
||
`eventType` varchar(16) NOT NULL,
|
||
`bizStep` varchar(128) NOT NULL,
|
||
`eventTime` timestamp NOT NULL,
|
||
`serviceType` varchar(32) NOT NULL,
|
||
`serviceAddress` varchar(128) NOT NULL,
|
||
PRIMARY KEY (`id`),
|
||
INDEX (`epc`)
|
||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
DS/DS/pom.xml | ||
---|---|---|
<?xml version="1.0" encoding="utf-8"?>
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||
<modelVersion>4.0.0</modelVersion>
|
||
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>ds</artifactId>
|
||
<packaging>war</packaging>
|
||
<version>2.0</version>
|
||
|
||
<name>DS</name>
|
||
|
||
<properties>
|
||
<lib-spring-version>2.5.6.SEC03</lib-spring-version>
|
||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||
</properties>
|
||
|
||
<dependencies>
|
||
|
||
<dependency>
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>ds-client</artifactId>
|
||
<version>${project.version}</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>ds-commons</artifactId>
|
||
<version>${project.version}</version>
|
||
</dependency>
|
||
|
||
<!-- Spring dependencies -->
|
||
<dependency>
|
||
<groupId>org.springframework</groupId>
|
||
<artifactId>spring-beans</artifactId>
|
||
<version>${lib-spring-version}</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>org.springframework</groupId>
|
||
<artifactId>spring-web</artifactId>
|
||
<version>${lib-spring-version}</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>org.springframework</groupId>
|
||
<artifactId>spring-orm</artifactId>
|
||
<version>${lib-spring-version}</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>org.springframework</groupId>
|
||
<artifactId>spring-jdbc</artifactId>
|
||
<version>${lib-spring-version}</version>
|
||
</dependency>
|
||
|
||
<!-- Other dependencies -->
|
||
<dependency>
|
||
<groupId>javax.servlet</groupId>
|
||
<artifactId>javax.servlet-api</artifactId>
|
||
<version>3.0.1</version>
|
||
<scope>provided</scope>
|
||
</dependency>
|
||
|
||
<!-- Log dependencies -->
|
||
<dependency>
|
||
<groupId>commons-logging</groupId>
|
||
<artifactId>commons-logging</artifactId>
|
||
<version>1.1.1</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>log4j</groupId>
|
||
<artifactId>log4j</artifactId>
|
||
<version>1.2.16</version>
|
||
</dependency>
|
||
|
||
<!-- Log for ActiveMQ -->
|
||
<dependency>
|
||
<groupId>org.slf4j</groupId>
|
||
<artifactId>slf4j-log4j12</artifactId>
|
||
<version>1.6.6</version>
|
||
</dependency>
|
||
|
||
</dependencies>
|
||
|
||
<build>
|
||
|
||
<plugins>
|
||
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-compiler-plugin</artifactId>
|
||
<version>2.5.1</version>
|
||
<configuration>
|
||
<source>1.6</source>
|
||
<target>1.6</target>
|
||
</configuration>
|
||
</plugin>
|
||
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-war-plugin</artifactId>
|
||
<version>2.2</version>
|
||
<configuration>
|
||
<webResources>
|
||
<resource>
|
||
<directory>${project.basedir}</directory>
|
||
<includes>
|
||
<include>LICENSE</include>
|
||
<include>LISEZMOI</include>
|
||
<include>README</include>
|
||
</includes>
|
||
<targetPath>META-INF</targetPath>
|
||
<filtering>false</filtering>
|
||
</resource>
|
||
</webResources>
|
||
</configuration>
|
||
</plugin>
|
||
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-assembly-plugin</artifactId>
|
||
<version>2.3</version>
|
||
<executions>
|
||
<execution>
|
||
<id>sources</id>
|
||
<phase>package</phase>
|
||
<goals>
|
||
<goal>single</goal>
|
||
</goals>
|
||
<configuration>
|
||
<descriptorRefs>
|
||
<descriptorRef>src</descriptorRef>
|
||
</descriptorRefs>
|
||
</configuration>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
|
||
</plugins>
|
||
|
||
</build>
|
||
|
||
</project>
|
DS/DS/src/main/java/fr/unicaen/iota/ds/service/Constants.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2013 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.ds.service;
|
||
|
||
import java.io.IOException;
|
||
import java.io.InputStream;
|
||
import java.util.Properties;
|
||
import org.apache.commons.logging.Log;
|
||
import org.apache.commons.logging.LogFactory;
|
||
|
||
public final class Constants {
|
||
|
||
public static final boolean MULTI_DS_ARCHITECTURE;
|
||
public static final String SERVICE_ID;
|
||
public static final String[] ONS_HOSTS;
|
||
public static final String JMS_URL;
|
||
public static final String JMS_LOGIN;
|
||
public static final String JMS_PASSWORD;
|
||
public static final String JMS_QUEUE_NAME;
|
||
public static final String JMS_MESSAGE_TIME_PROPERTY;
|
||
public static final long PUBLISHER_DELAY;
|
||
public static final long PUBLISHER_PERIOD;
|
||
public static final long PUBLISHER_TIMEOUT;
|
||
private static final Log LOG = LogFactory.getLog(Constants.class);
|
||
|
||
public Constants() {
|
||
}
|
||
|
||
static {
|
||
Properties properties = new Properties();
|
||
InputStream is = Constants.class.getClassLoader().getResourceAsStream("application.properties");
|
||
LOG.debug("Chargement des propriétés de l'application");
|
||
try {
|
||
properties.load(is);
|
||
} catch (IOException ex) {
|
||
LOG.fatal(null, ex);
|
||
}
|
||
MULTI_DS_ARCHITECTURE = Boolean.parseBoolean(properties.getProperty("multi-ds-architecture"));
|
||
if (MULTI_DS_ARCHITECTURE) {
|
||
SERVICE_ID = properties.getProperty("service-id");
|
||
ONS_HOSTS = fr.unicaen.iota.nu.Constants.ONS_HOSTS;
|
||
JMS_URL = properties.getProperty("jms-url");
|
||
JMS_LOGIN = properties.getProperty("jms-login");
|
||
JMS_PASSWORD = properties.getProperty("jms-password");
|
||
JMS_QUEUE_NAME = properties.getProperty("jms-queue-name");
|
||
JMS_MESSAGE_TIME_PROPERTY = properties.getProperty("jms-message-time-property");
|
||
PUBLISHER_DELAY = Long.valueOf(properties.getProperty("publisher-delay"));
|
||
PUBLISHER_PERIOD = Long.valueOf(properties.getProperty("publisher-period"));
|
||
PUBLISHER_TIMEOUT = Long.valueOf(properties.getProperty("publisher-timeout"));
|
||
}
|
||
else {
|
||
SERVICE_ID = "127.0.0.1";
|
||
ONS_HOSTS = null;
|
||
JMS_URL = null;
|
||
JMS_LOGIN = null;
|
||
JMS_PASSWORD = null;
|
||
JMS_QUEUE_NAME = null;
|
||
JMS_MESSAGE_TIME_PROPERTY = null;
|
||
PUBLISHER_DELAY = 0;
|
||
PUBLISHER_PERIOD = 0;
|
||
PUBLISHER_TIMEOUT = 0;
|
||
}
|
||
}
|
||
}
|
DS/DS/src/main/java/fr/unicaen/iota/ds/service/DSService.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2013 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.ds.service;
|
||
|
||
import fr.unicaen.iota.ds.commons.OperationsBackendSQL;
|
||
import fr.unicaen.iota.ds.commons.OperationsSession;
|
||
import fr.unicaen.iota.ds.commons.Publish;
|
||
import fr.unicaen.iota.ds.model.CreateResponseType;
|
||
import fr.unicaen.iota.ds.model.DSEvent;
|
||
import fr.unicaen.iota.ds.model.EventCreateReq;
|
||
import fr.unicaen.iota.ds.model.EventCreateResp;
|
||
import fr.unicaen.iota.ds.model.EventLookupReq;
|
||
import fr.unicaen.iota.ds.model.EventLookupResp;
|
||
import fr.unicaen.iota.ds.model.InternalException;
|
||
import fr.unicaen.iota.ds.model.MultipleEventCreateReq;
|
||
import fr.unicaen.iota.ds.model.MultipleEventCreateResp;
|
||
import fr.unicaen.iota.ds.soap.DSServicePortType;
|
||
import fr.unicaen.iota.ds.soap.ImplementationExceptionResponse;
|
||
import fr.unicaen.iota.ds.soap.InternalExceptionResponse;
|
||
import java.sql.PreparedStatement;
|
||
import java.sql.ResultSet;
|
||
import java.sql.SQLException;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
import javax.jms.JMSException;
|
||
import javax.jms.MessageProducer;
|
||
import javax.jms.Queue;
|
||
import javax.jms.Session;
|
||
import javax.sql.DataSource;
|
||
import javax.xml.bind.JAXBException;
|
||
import javax.xml.datatype.DatatypeConfigurationException;
|
||
import org.apache.commons.logging.Log;
|
||
import org.apache.commons.logging.LogFactory;
|
||
|
||
/**
|
||
* This <code>DSService</code> implements the DS web service. It handles DS events.
|
||
*/
|
||
public class DSService implements DSServicePortType {
|
||
|
||
private OperationsBackendSQL backend;
|
||
private DataSource dataSource;
|
||
private Publish publish;
|
||
private static final Log LOG = LogFactory.getLog(DSService.class);
|
||
|
||
public DataSource getDataSource() {
|
||
return dataSource;
|
||
}
|
||
|
||
public void setDataSource(DataSource dataSource) {
|
||
this.dataSource = dataSource;
|
||
}
|
||
|
||
public OperationsBackendSQL getBackend() {
|
||
return backend;
|
||
}
|
||
|
||
public void setBackend(OperationsBackendSQL backend) {
|
||
this.backend = backend;
|
||
}
|
||
|
||
@Override
|
||
public EventCreateResp eventCreate(EventCreateReq eventCreateReq) throws ImplementationExceptionResponse, InternalExceptionResponse {
|
||
EventCreateResp createResp = new EventCreateResp();
|
||
DSEvent event = eventCreateReq.getDsEvent();
|
||
if (event.getEpc() == null || event.getEpc().isEmpty()
|
||
|| event.getEventType() == null || event.getEventType().isEmpty()
|
||
|| event.getBizStep() == null || event.getBizStep().isEmpty()
|
||
|| event.getEventTime() == null
|
||
|| event.getServiceType() == null || event.getServiceAddress().isEmpty()
|
||
|| event.getServiceAddress() == null || event.getServiceAddress().isEmpty()) {
|
||
createResp.setValue(CreateResponseType.NOT_ADDED);
|
||
createResp.setMessage("At least one field is missing or empty");
|
||
return createResp;
|
||
}
|
||
try {
|
||
OperationsSession session = backend.openSession(dataSource);
|
||
boolean result = backend.eventCreate(session, event, null);
|
||
createResp.setValue(CreateResponseType.CREATED_NOT_PUBLISHED);
|
||
String msg = (result)? "Event correctly added" : "Event not added";
|
||
LOG.info(msg);
|
||
if (result && Constants.MULTI_DS_ARCHITECTURE) {
|
||
if (publish == null) {
|
||
publish = new Publish(Constants.SERVICE_ID, Constants.ONS_HOSTS, Constants.JMS_URL,
|
||
Constants.JMS_LOGIN, Constants.JMS_PASSWORD, Constants.JMS_MESSAGE_TIME_PROPERTY);
|
||
}
|
||
try {
|
||
publish.createsJMSConnection();
|
||
Session producerSession = publish.createsJMSSession(false, Session.CLIENT_ACKNOWLEDGE);
|
||
Queue producerQueue = publish.createsJMSQueue(producerSession, Constants.JMS_QUEUE_NAME);
|
||
MessageProducer producer = publish.createJMSProducer(producerSession, producerQueue);
|
||
publish.startsJMSConnection();
|
||
try {
|
||
publish.sendsEvent(producerSession, producer, event);
|
||
createResp.setValue(CreateResponseType.CREATED_AND_PUBLISHED);
|
||
} finally {
|
||
producerSession.close();
|
||
publish.closesJMSConnection();
|
||
}
|
||
msg = "Event added and going to be published";
|
||
} catch (JAXBException ex) {
|
||
msg = "Event added but not published";
|
||
if (LOG.isDebugEnabled()) {
|
||
LOG.info(msg, ex);
|
||
}
|
||
else {
|
||
LOG.info(msg);
|
||
}
|
||
} catch (JMSException ex) {
|
||
msg = "Event added but not published";
|
||
LOG.error(msg, ex);
|
||
}
|
||
}
|
||
createResp.setMessage(msg);
|
||
return createResp;
|
||
} catch (SQLException ex) {
|
||
InternalException iex = new InternalException();
|
||
String msg = "SQL error during capture execution: " + ex.getMessage();
|
||
LOG.error(msg, ex);
|
||
iex.setReason(msg);
|
||
throw new InternalExceptionResponse(msg, iex, ex);
|
||
}
|
||
}
|
||
|
||
@Override
|
||
public MultipleEventCreateResp multipleEventCreate(MultipleEventCreateReq multipleEventCreateReq) throws ImplementationExceptionResponse, InternalExceptionResponse {
|
||
MultipleEventCreateResp multipleCreateResp = new MultipleEventCreateResp();
|
||
List<EventCreateResp> responseList = multipleCreateResp.getEventCreateResponses();
|
||
List<DSEvent> dsEvents = multipleEventCreateReq.getDsEvent();
|
||
int nbDSEvents = dsEvents.size();
|
||
int nbSuccess = 0;
|
||
try {
|
||
OperationsSession session = backend.openSession(dataSource);
|
||
for (int i = 0; i < nbDSEvents; i ++) {
|
||
EventCreateResp response = new EventCreateResp();
|
||
response.setValue(CreateResponseType.NOT_ADDED);
|
||
DSEvent event = dsEvents.get(i);
|
||
String msg = "";
|
||
if (event.getEpc() == null || event.getEpc().isEmpty()
|
||
|| event.getEventType() == null || event.getEventType().isEmpty()
|
||
|| event.getBizStep() == null || event.getBizStep().isEmpty()
|
||
|| event.getEventTime() == null
|
||
|| event.getServiceType() == null || event.getServiceAddress().isEmpty()
|
||
|| event.getServiceAddress() == null || event.getServiceAddress().isEmpty()) {
|
||
msg = "At least one field is missing or empty";
|
||
}
|
||
else {
|
||
try {
|
||
boolean res = backend.eventCreate(session, event, null);
|
||
if (res == true) {
|
||
nbSuccess++;
|
||
msg = "Event correctly added";
|
||
response.setValue(CreateResponseType.CREATED_NOT_PUBLISHED);
|
||
}
|
||
else {
|
||
msg = "Event not added";
|
||
}
|
||
} catch (SQLException ex) {
|
||
msg = "SQL error during capture execution: " + ex.getMessage();
|
||
if (LOG.isDebugEnabled()) {
|
||
LOG.error(msg, ex);
|
||
}
|
||
else {
|
||
LOG.error(msg);
|
||
}
|
||
}
|
||
}
|
||
LOG.info(msg);
|
||
response.setMessage(msg);
|
||
responseList.add(i, response);
|
||
}
|
||
multipleCreateResp.setResult((nbSuccess == nbDSEvents)?
|
||
CreateResponseType.CREATED_NOT_PUBLISHED : CreateResponseType.NOT_ADDED);
|
||
} catch (SQLException ex) {
|
||
InternalException iex = new InternalException();
|
||
String msg = "SQL error during capture execution: " + ex.getMessage();
|
||
LOG.error(msg, ex);
|
||
iex.setReason(msg);
|
||
throw new InternalExceptionResponse(msg, iex, ex);
|
||
}
|
||
|
||
if (Constants.MULTI_DS_ARCHITECTURE) {
|
||
int nbPublishing = 0;
|
||
if (publish == null) {
|
||
publish = new Publish(Constants.SERVICE_ID, Constants.ONS_HOSTS, Constants.JMS_URL,
|
||
Constants.JMS_LOGIN, Constants.JMS_PASSWORD, Constants.JMS_MESSAGE_TIME_PROPERTY);
|
||
}
|
||
try {
|
||
publish.createsJMSConnection();
|
||
Session producerSession = publish.createsJMSSession(false, Session.CLIENT_ACKNOWLEDGE);
|
||
Queue producerQueue = publish.createsJMSQueue(producerSession, Constants.JMS_QUEUE_NAME);
|
||
MessageProducer producer = publish.createJMSProducer(producerSession, producerQueue);
|
||
publish.startsJMSConnection();
|
||
try {
|
||
for (int i = 0; i < responseList.size(); i++) {
|
||
EventCreateResp resp = responseList.get(i);
|
||
if (resp.getValue().equals(CreateResponseType.NOT_ADDED)) {
|
||
continue;
|
||
}
|
||
try {
|
||
DSEvent eventToPublish = dsEvents.get(i);
|
||
publish.sendsEvent(producerSession, producer, eventToPublish);
|
||
resp.setMessage("Event added and going to be published");
|
||
resp.setValue(CreateResponseType.CREATED_AND_PUBLISHED);
|
||
nbPublishing++;
|
||
} catch (Exception ex) {
|
||
String msg = "Event added but not published";
|
||
resp.setMessage(msg);
|
||
if (LOG.isDebugEnabled()) {
|
||
LOG.info(msg, ex);
|
||
}
|
||
else {
|
||
LOG.info(msg);
|
||
}
|
||
}
|
||
}
|
||
} finally {
|
||
producerSession.close();
|
||
publish.closesJMSConnection();
|
||
}
|
||
} catch (JMSException ex) {
|
||
LOG.error("Error with the JMS provider during the publishing", ex);
|
||
}
|
||
multipleCreateResp.setResult((nbPublishing == nbDSEvents)?
|
||
CreateResponseType.CREATED_AND_PUBLISHED : CreateResponseType.CREATED_NOT_PUBLISHED);
|
||
}
|
||
return multipleCreateResp;
|
||
}
|
||
|
||
@Override
|
||
public EventLookupResp eventLookup(EventLookupReq eventLookupReq) throws ImplementationExceptionResponse, InternalExceptionResponse {
|
||
try {
|
||
EventLookupResp lookupResp = new EventLookupResp();
|
||
OperationsSession session = backend.openSession(dataSource);
|
||
List<String> columnNames = new ArrayList<String>();
|
||
columnNames.add("epc");
|
||
columnNames.add("eventType");
|
||
columnNames.add("bizStep");
|
||
columnNames.add("eventTime");
|
||
columnNames.add("serviceAddress");
|
||
columnNames.add("serviceType");
|
||
PreparedStatement stmt = backend.getPreparedStatementSelect(session, eventLookupReq.getEpc(),
|
||
eventLookupReq.getEventType(), eventLookupReq.getBizStep(), eventLookupReq.getStartingAt(),
|
||
eventLookupReq.getEndingAt(), eventLookupReq.getServiceType(), columnNames);
|
||
ResultSet rs = stmt.executeQuery();
|
||
List<DSEvent> dsEventList = lookupResp.getDsEventList();
|
||
while (rs.next()) {
|
||
DSEvent dSEvent = new DSEvent();
|
||
dSEvent.setEpc(rs.getString("epc"));
|
||
dSEvent.setEventType(rs.getString("eventType"));
|
||
dSEvent.setBizStep(rs.getString("bizStep"));
|
||
dSEvent.setEventTime(backend.timestampToXmlCalendar(rs.getTimestamp("eventTime")));
|
||
dSEvent.setServiceAddress(rs.getString("serviceAddress"));
|
||
dSEvent.setServiceType(rs.getString("serviceType"));
|
||
dsEventList.add(dSEvent);
|
||
}
|
||
return lookupResp;
|
||
} catch (DatatypeConfigurationException ex) {
|
||
InternalException iex = new InternalException();
|
||
String msg = "Error during event time conversion: " + ex.getMessage();
|
||
LOG.error(msg, ex);
|
||
iex.setReason(msg);
|
||
throw new InternalExceptionResponse(msg, iex, ex);
|
||
} catch (SQLException ex) {
|
||
InternalException iex = new InternalException();
|
||
String msg = "SQL error during query execution: " + ex.getMessage();
|
||
LOG.error(msg, ex);
|
||
iex.setReason(msg);
|
||
throw new InternalExceptionResponse(msg, iex, ex);
|
||
}
|
||
}
|
||
|
||
}
|
DS/DS/src/main/java/fr/unicaen/iota/ds/service/Publisher.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2013 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.ds.service;
|
||
|
||
import fr.unicaen.iota.ds.commons.Publish;
|
||
import java.io.IOException;
|
||
import java.util.Timer;
|
||
import java.util.TimerTask;
|
||
import javax.jms.JMSException;
|
||
import javax.jms.MessageConsumer;
|
||
import javax.jms.MessageProducer;
|
||
import javax.jms.Queue;
|
||
import javax.jms.Session;
|
||
import javax.xml.bind.JAXBException;
|
||
import javax.xml.parsers.ParserConfigurationException;
|
||
import org.apache.commons.logging.Log;
|
||
import org.apache.commons.logging.LogFactory;
|
||
import org.xml.sax.SAXException;
|
||
|
||
/**
|
||
*
|
||
*/
|
||
public class Publisher {
|
||
|
||
private final Timer timer;
|
||
private final Publish publish;
|
||
private final long delay;
|
||
private final long period;
|
||
private final long timeout;
|
||
private static final Log LOG = LogFactory.getLog(Publisher.class);
|
||
|
||
public Publisher(long delay, long period, long timeout) {
|
||
this.timer = new Timer();
|
||
this.publish = new Publish(Constants.SERVICE_ID, Constants.ONS_HOSTS, Constants.JMS_URL,
|
||
Constants.JMS_LOGIN, Constants.JMS_PASSWORD, Constants.JMS_MESSAGE_TIME_PROPERTY);
|
||
this.delay = delay;
|
||
this.period = period;
|
||
this.timeout = timeout;
|
||
}
|
||
|
||
public void start() {
|
||
timer.schedule(new PublisherTask(), delay, period);
|
||
}
|
||
|
||
public void stop() {
|
||
timer.cancel();
|
||
}
|
||
|
||
private class PublisherTask extends TimerTask {
|
||
|
||
@Override
|
||
public void run() {
|
||
try {
|
||
publish.createsJMSConnection();
|
||
Session consumerSession = publish.createsJMSSession(false, Session.CLIENT_ACKNOWLEDGE);
|
||
Queue consumerQueue = publish.createsJMSQueue(consumerSession, Constants.JMS_QUEUE_NAME);
|
||
MessageConsumer consumer = publish.createsJMSConsumer(consumerSession, consumerQueue);
|
||
Session producerSession = publish.createsJMSSession(false, Session.CLIENT_ACKNOWLEDGE);
|
||
Queue producerQueue = publish.createsJMSQueue(producerSession, Constants.JMS_QUEUE_NAME);
|
||
MessageProducer producer = publish.createJMSProducer(producerSession, producerQueue);
|
||
publish.startsJMSConnection();
|
||
try {
|
||
long runtime = System.currentTimeMillis();
|
||
while (true) {
|
||
boolean result = publish.publishEvent(consumer, timeout, producerSession, producer, runtime);
|
||
if (!result) {
|
||
break;
|
||
}
|
||
}
|
||
} finally {
|
||
consumerSession.close();
|
||
producerSession.close();
|
||
publish.closesJMSConnection();
|
||
}
|
||
} catch (IOException ex) {
|
||
LOG.error("An I/O error occurred");
|
||
LOG.debug("", ex);
|
||
} catch (JMSException ex) {
|
||
LOG.error("Error during receiving or sending message");
|
||
LOG.debug("", ex);
|
||
} catch (JAXBException ex) {
|
||
LOG.error("Error during the conversion from the string to DSEvent");
|
||
LOG.debug("", ex);
|
||
} catch (ParserConfigurationException ex) {
|
||
LOG.error("Error during the conversion from the JMS message to string.");
|
||
LOG.debug("", ex);
|
||
} catch (SAXException ex) {
|
||
LOG.error("Error during the conversion from the JMS message to string.");
|
||
LOG.debug("", ex);
|
||
} catch (Exception ex) {
|
||
LOG.error("An unexpected error occurred", ex);
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
DS/DS/src/main/java/fr/unicaen/iota/ds/service/PublisherContextListener.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2013 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.ds.service;
|
||
|
||
import javax.servlet.ServletContextEvent;
|
||
import javax.servlet.ServletContextListener;
|
||
|
||
public class PublisherContextListener implements ServletContextListener {
|
||
|
||
private Publisher publisher;
|
||
|
||
public PublisherContextListener() {
|
||
publisher = new Publisher(Constants.PUBLISHER_DELAY, Constants.PUBLISHER_PERIOD, Constants.PUBLISHER_TIMEOUT);
|
||
}
|
||
|
||
@Override
|
||
public void contextInitialized(ServletContextEvent sce) {
|
||
publisher.start();
|
||
}
|
||
|
||
@Override
|
||
public void contextDestroyed(ServletContextEvent sce) {
|
||
publisher.stop();
|
||
}
|
||
|
||
}
|
DS/DS/src/main/resources/application.properties | ||
---|---|---|
## The following properties provide configuration to the DS in a
|
||
## multi DS architecture mode.
|
||
|
||
## Set true if the DS is able to discuss with other DSs in the internet of things.
|
||
|
||
multi-ds-architecture = false
|
||
|
||
## Set the ONS hosts to locate the address of a particular DS for a particular
|
||
## EPC code. (ex : ons = addr1,addr2,..... )
|
||
ons-hosts = localhost
|
||
|
||
# ONS root domain (to construct FQDN from EPCs)
|
||
ons-domain-prefix = ons-peer.com.
|
||
|
||
# ONS specification used.
|
||
# 1.0 : original version (10000.30000.sgtin.id.ons-peer.com)
|
||
# 2.0 : WINGS version (0.0.0.0.1.0.0.0.0.3.sgtin.id.ons-peer.com)
|
||
ons-spec-level = 2.0
|
||
|
||
# nomenclature of the NAPTR fields
|
||
ons-epcis-entry = epc\\+epcis
|
||
ons-ided-epcis-entry = epc\\+ided_epcis
|
||
ons-ds-entry = epc\\+ds
|
||
ons-ided-ds-entry = epc\\+ided_ds
|
||
ons-html-entry = epc\\+html
|
||
ons-entry-regex = \\!\\^\\.\\*\\$\\!|\\!
|
||
|
||
service-id = http://localhost:8080/ds
|
||
|
||
publisher-delay = 10000
|
||
publisher-period = 60000
|
||
publisher-timeout = 200
|
||
|
||
jms-url = tcp://localhost:61616
|
||
jms-login=
|
||
jms-password=
|
||
jms-queue-name= toPublish
|
||
jms-message-time-property = lastPublication
|
DS/DS/src/main/resources/commons-logging.properties | ||
---|---|---|
# use LOG4J as the underlying logging toolkit
|
||
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
|
DS/DS/src/main/resources/log4j.properties | ||
---|---|---|
# LOG4J configuration
|
||
|
||
# default logging
|
||
log4j.rootCategory = INFO, LOGFILE
|
||
|
||
# enable logging of incoming/outgoing SOAP requests/responses
|
||
#log4j.logger.org.apache.cxf.interceptor.LoggingInInterceptor=WARN, LOGFILE
|
||
#log4j.logger.org.apache.cxf.interceptor.LoggingOutInterceptor=WARN, LOGFILE
|
||
log4j.logger.org.apache.cxf = WARN, LOGFILE
|
||
|
||
# spring logging
|
||
log4j.logger.org.springframework = WARN, LOGFILE
|
||
|
||
# logging to file
|
||
log4j.appender.LOGFILE=org.apache.log4j.DailyRollingFileAppender
|
||
log4j.appender.LOGFILE.File=${catalina.base}/logs/ds.log
|
||
log4j.appender.LOGFILE.DatePattern='.'yyyy-MM-dd'.log'
|
||
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
|
||
log4j.appender.LOGFILE.layout.ConversionPattern=%5p (%d{yyyy-MM-dd HH:mm:ss,SSS}) [%C:%L] - %m%n
|
||
log4j.appender.LOGGER.MaxBackupIndex=7
|
DS/DS/src/main/webapp/META-INF/context.xml | ||
---|---|---|
<?xml version="1.0" encoding="UTF-8"?>
|
||
<Context path="/ds" reloadable="true">
|
||
<Resource
|
||
auth="Container"
|
||
defaultAutoCommit="false"
|
||
driverClassName="com.mysql.jdbc.Driver"
|
||
name="jdbc/DSDB"
|
||
username="ds_usr"
|
||
password="ds_pwd"
|
||
type="javax.sql.DataSource"
|
||
url="jdbc:mysql://localhost:3306/ds_db?autoReconnect=true" />
|
||
</Context>
|
DS/DS/src/main/webapp/WEB-INF/applicationContext.xml | ||
---|---|---|
<?xml version="1.0" encoding="UTF-8"?>
|
||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||
xmlns:jaxws="http://cxf.apache.org/jaxws"
|
||
xmlns:cxf="http://cxf.apache.org/core"
|
||
xsi:schemaLocation="
|
||
http://www.springframework.org/schema/beans
|
||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||
http://cxf.apache.org/core
|
||
http://cxf.apache.org/schemas/core.xsd
|
||
http://cxf.apache.org/jaxws
|
||
http://cxf.apache.org/schemas/jaxws.xsd">
|
||
|
||
<import resource="classpath:META-INF/cxf/cxf.xml" />
|
||
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
|
||
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
|
||
|
||
<bean id="dataPropertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||
<property name="locations">
|
||
<list>
|
||
<value>classpath:application.properties</value>
|
||
</list>
|
||
</property>
|
||
</bean>
|
||
|
||
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean" scope="singleton">
|
||
<property name="jndiName" value="java:comp/env/jdbc/DSDB" />
|
||
</bean>
|
||
|
||
<bean id="dsService" class="fr.unicaen.iota.ds.service.DSService">
|
||
<property name="dataSource" ref="dataSource" />
|
||
<property name="backend">
|
||
<bean class="fr.unicaen.iota.ds.commons.OperationsBackendSQL" />
|
||
</property>
|
||
</bean>
|
||
|
||
<jaxws:endpoint id="DSEndpoint"
|
||
serviceName="ds:DSService"
|
||
implementor="#dsService"
|
||
address="/"
|
||
xmlns:ds="urn:unicaen:iota:ds:wsdl" />
|
||
|
||
</beans>
|
DS/DS/src/main/webapp/WEB-INF/web.xml | ||
---|---|---|
<?xml version="1.0" encoding="UTF-8"?>
|
||
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
|
||
<display-name>Discovery Service</display-name>
|
||
<context-param>
|
||
<param-name>contextConfigLocation</param-name>
|
||
<param-value>WEB-INF/applicationContext.xml</param-value>
|
||
</context-param>
|
||
<listener>
|
||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||
</listener>
|
||
|
||
<servlet>
|
||
<servlet-name>DSCaptureAndQueryInterface</servlet-name>
|
||
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
|
||
<load-on-startup>1</load-on-startup>
|
||
</servlet>
|
||
|
||
<servlet-mapping>
|
||
<servlet-name>DSCaptureAndQueryInterface</servlet-name>
|
||
<url-pattern>/*</url-pattern>
|
||
</servlet-mapping>
|
||
|
||
<session-config>
|
||
<session-timeout>5</session-timeout>
|
||
</session-config>
|
||
<mime-mapping>
|
||
<extension>wsdl</extension>
|
||
<mime-type>text/xml</mime-type>
|
||
</mime-mapping>
|
||
<mime-mapping>
|
||
<extension>xsd</extension>
|
||
<mime-type>text/xml</mime-type>
|
||
</mime-mapping>
|
||
</web-app>
|
DSeTa/DSeTa-Client/LICENSE | ||
---|---|---|
GNU GENERAL PUBLIC LICENSE
|
||
GNU LESSER GENERAL PUBLIC LICENSE
|
||
Version 3, 29 June 2007
|
||
|
||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||
Everyone is permitted to copy and distribute verbatim copies
|
||
of this license document, but changing it is not allowed.
|
||
|
||
Preamble
|
||
|
||
The GNU General Public License is a free, copyleft license for
|
||
software and other kinds of works.
|
||
|
||
The licenses for most software and other practical works are designed
|
||
to take away your freedom to share and change the works. By contrast,
|
||
the GNU General Public License is intended to guarantee your freedom to
|
||
share and change all versions of a program--to make sure it remains free
|
||
software for all its users. We, the Free Software Foundation, use the
|
||
GNU General Public License for most of our software; it applies also to
|
||
any other work released this way by its authors. You can apply it to
|
||
your programs, too.
|
||
|
||
When we speak of free software, we are referring to freedom, not
|
||
price. Our General Public Licenses are designed to make sure that you
|
||
have the freedom to distribute copies of free software (and charge for
|
||
them if you wish), that you receive source code or can get it if you
|
||
want it, that you can change the software or use pieces of it in new
|
||
free programs, and that you know you can do these things.
|
||
|
||
To protect your rights, we need to prevent others from denying you
|
||
these rights or asking you to surrender the rights. Therefore, you have
|
||
certain responsibilities if you distribute copies of the software, or if
|
||
you modify it: responsibilities to respect the freedom of others.
|
||
|
||
For example, if you distribute copies of such a program, whether
|
||
gratis or for a fee, you must pass on to the recipients the same
|
||
freedoms that you received. You must make sure that they, too, receive
|
||
or can get the source code. And you must show them these terms so they
|
||
know their rights.
|
||
|
||
Developers that use the GNU GPL protect your rights with two steps:
|
||
(1) assert copyright on the software, and (2) offer you this License
|
||
giving you legal permission to copy, distribute and/or modify it.
|
||
|
||
For the developers' and authors' protection, the GPL clearly explains
|
||
that there is no warranty for this free software. For both users' and
|
||
authors' sake, the GPL requires that modified versions be marked as
|
||
changed, so that their problems will not be attributed erroneously to
|
||
authors of previous versions.
|
||
|
||
Some devices are designed to deny users access to install or run
|
||
modified versions of the software inside them, although the manufacturer
|
||
can do so. This is fundamentally incompatible with the aim of
|
||
protecting users' freedom to change the software. The systematic
|
||
pattern of such abuse occurs in the area of products for individuals to
|
||
use, which is precisely where it is most unacceptable. Therefore, we
|
||
have designed this version of the GPL to prohibit the practice for those
|
||
products. If such problems arise substantially in other domains, we
|
||
stand ready to extend this provision to those domains in future versions
|
||
of the GPL, as needed to protect the freedom of users.
|
||
|
||
Finally, every program is threatened constantly by software patents.
|
||
States should not allow patents to restrict development and use of
|
||
software on general-purpose computers, but in those that do, we wish to
|
||
avoid the special danger that patents applied to a free program could
|
||
make it effectively proprietary. To prevent this, the GPL assures that
|
||
patents cannot be used to render the program non-free.
|
||
|
||
The precise terms and conditions for copying, distribution and
|
||
modification follow.
|
||
|
||
TERMS AND CONDITIONS
|
||
|
||
0. Definitions.
|
||
|
||
"This License" refers to version 3 of the GNU General Public License.
|
||
|
||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||
works, such as semiconductor masks.
|
||
|
||
"The Program" refers to any copyrightable work licensed under this
|
||
License. Each licensee is addressed as "you". "Licensees" and
|
||
"recipients" may be individuals or organizations.
|
||
|
||
To "modify" a work means to copy from or adapt all or part of the work
|
||
in a fashion requiring copyright permission, other than the making of an
|
||
exact copy. The resulting work is called a "modified version" of the
|
||
earlier work or a work "based on" the earlier work.
|
||
|
||
A "covered work" means either the unmodified Program or a work based
|
||
on the Program.
|
||
|
||
To "propagate" a work means to do anything with it that, without
|
||
permission, would make you directly or secondarily liable for
|
||
infringement under applicable copyright law, except executing it on a
|
||
computer or modifying a private copy. Propagation includes copying,
|
||
distribution (with or without modification), making available to the
|
||
public, and in some countries other activities as well.
|
||
|
||
To "convey" a work means any kind of propagation that enables other
|
||
parties to make or receive copies. Mere interaction with a user through
|
||
a computer network, with no transfer of a copy, is not conveying.
|
||
|
||
An interactive user interface displays "Appropriate Legal Notices"
|
||
to the extent that it includes a convenient and prominently visible
|
||
feature that (1) displays an appropriate copyright notice, and (2)
|
||
tells the user that there is no warranty for the work (except to the
|
||
extent that warranties are provided), that licensees may convey the
|
||
work under this License, and how to view a copy of this License. If
|
||
the interface presents a list of user commands or options, such as a
|
||
menu, a prominent item in the list meets this criterion.
|
||
|
||
1. Source Code.
|
||
|
||
The "source code" for a work means the preferred form of the work
|
||
for making modifications to it. "Object code" means any non-source
|
||
form of a work.
|
||
|
||
A "Standard Interface" means an interface that either is an official
|
||
standard defined by a recognized standards body, or, in the case of
|
||
interfaces specified for a particular programming language, one that
|
||
is widely used among developers working in that language.
|
||
|
||
The "System Libraries" of an executable work include anything, other
|
||
than the work as a whole, that (a) is included in the normal form of
|
||
packaging a Major Component, but which is not part of that Major
|
||
Component, and (b) serves only to enable use of the work with that
|
||
Major Component, or to implement a Standard Interface for which an
|
||
implementation is available to the public in source code form. A
|
||
"Major Component", in this context, means a major essential component
|
||
(kernel, window system, and so on) of the specific operating system
|
||
(if any) on which the executable work runs, or a compiler used to
|
||
produce the work, or an object code interpreter used to run it.
|
||
|
||
The "Corresponding Source" for a work in object code form means all
|
||
the source code needed to generate, install, and (for an executable
|
||
work) run the object code and to modify the work, including scripts to
|
||
control those activities. However, it does not include the work's
|
||
System Libraries, or general-purpose tools or generally available free
|
||
programs which are used unmodified in performing those activities but
|
||
which are not part of the work. For example, Corresponding Source
|
||
includes interface definition files associated with source files for
|
||
the work, and the source code for shared libraries and dynamically
|
||
linked subprograms that the work is specifically designed to require,
|
||
such as by intimate data communication or control flow between those
|
||
subprograms and other parts of the work.
|
||
|
||
The Corresponding Source need not include anything that users
|
||
can regenerate automatically from other parts of the Corresponding
|
||
Source.
|
||
|
||
The Corresponding Source for a work in source code form is that
|
||
same work.
|
||
|
||
2. Basic Permissions.
|
||
|
||
All rights granted under this License are granted for the term of
|
||
copyright on the Program, and are irrevocable provided the stated
|
||
conditions are met. This License explicitly affirms your unlimited
|
||
permission to run the unmodified Program. The output from running a
|
||
covered work is covered by this License only if the output, given its
|
||
content, constitutes a covered work. This License acknowledges your
|
||
rights of fair use or other equivalent, as provided by copyright law.
|
||
|
||
You may make, run and propagate covered works that you do not
|
||
convey, without conditions so long as your license otherwise remains
|
||
in force. You may convey covered works to others for the sole purpose
|
||
of having them make modifications exclusively for you, or provide you
|
||
with facilities for running those works, provided that you comply with
|
||
the terms of this License in conveying all material for which you do
|
||
not control copyright. Those thus making or running the covered works
|
||
for you must do so exclusively on your behalf, under your direction
|
||
and control, on terms that prohibit them from making any copies of
|
||
your copyrighted material outside their relationship with you.
|
||
|
||
Conveying under any other circumstances is permitted solely under
|
||
the conditions stated below. Sublicensing is not allowed; section 10
|
||
makes it unnecessary.
|
||
|
||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||
|
||
No covered work shall be deemed part of an effective technological
|
||
measure under any applicable law fulfilling obligations under article
|
||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||
similar laws prohibiting or restricting circumvention of such
|
||
measures.
|
||
|
||
When you convey a covered work, you waive any legal power to forbid
|
||
circumvention of technological measures to the extent such circumvention
|
||
is effected by exercising rights under this License with respect to
|
||
the covered work, and you disclaim any intention to limit operation or
|
||
modification of the work as a means of enforcing, against the work's
|
||
users, your or third parties' legal rights to forbid circumvention of
|
||
technological measures.
|
||
|
||
4. Conveying Verbatim Copies.
|
||
|
||
You may convey verbatim copies of the Program's source code as you
|
||
receive it, in any medium, provided that you conspicuously and
|
||
appropriately publish on each copy an appropriate copyright notice;
|
||
keep intact all notices stating that this License and any
|
||
non-permissive terms added in accord with section 7 apply to the code;
|
||
keep intact all notices of the absence of any warranty; and give all
|
||
recipients a copy of this License along with the Program.
|
||
|
||
You may charge any price or no price for each copy that you convey,
|
||
and you may offer support or warranty protection for a fee.
|
||
|
||
5. Conveying Modified Source Versions.
|
||
|
||
You may convey a work based on the Program, or the modifications to
|
||
produce it from the Program, in the form of source code under the
|
||
terms of section 4, provided that you also meet all of these conditions:
|
||
|
||
a) The work must carry prominent notices stating that you modified
|
||
it, and giving a relevant date.
|
||
|
||
b) The work must carry prominent notices stating that it is
|
||
released under this License and any conditions added under section
|
||
7. This requirement modifies the requirement in section 4 to
|
||
"keep intact all notices".
|
||
|
||
c) You must license the entire work, as a whole, under this
|
||
License to anyone who comes into possession of a copy. This
|
||
License will therefore apply, along with any applicable section 7
|
||
additional terms, to the whole of the work, and all its parts,
|
||
regardless of how they are packaged. This License gives no
|
||
permission to license the work in any other way, but it does not
|
||
invalidate such permission if you have separately received it.
|
||
|
||
d) If the work has interactive user interfaces, each must display
|
||
Appropriate Legal Notices; however, if the Program has interactive
|
||
interfaces that do not display Appropriate Legal Notices, your
|
||
work need not make them do so.
|
||
|
||
A compilation of a covered work with other separate and independent
|
||
works, which are not by their nature extensions of the covered work,
|
||
and which are not combined with it such as to form a larger program,
|
||
in or on a volume of a storage or distribution medium, is called an
|
||
"aggregate" if the compilation and its resulting copyright are not
|
||
used to limit the access or legal rights of the compilation's users
|
||
beyond what the individual works permit. Inclusion of a covered work
|
||
in an aggregate does not cause this License to apply to the other
|
||
parts of the aggregate.
|
||
|
||
6. Conveying Non-Source Forms.
|
||
|
||
You may convey a covered work in object code form under the terms
|
||
of sections 4 and 5, provided that you also convey the
|
||
machine-readable Corresponding Source under the terms of this License,
|
||
in one of these ways:
|
||
|
||
a) Convey the object code in, or embodied in, a physical product
|
||
(including a physical distribution medium), accompanied by the
|
||
Corresponding Source fixed on a durable physical medium
|
||
customarily used for software interchange.
|
||
|
||
b) Convey the object code in, or embodied in, a physical product
|
||
(including a physical distribution medium), accompanied by a
|
||
written offer, valid for at least three years and valid for as
|
||
long as you offer spare parts or customer support for that product
|
||
model, to give anyone who possesses the object code either (1) a
|
||
copy of the Corresponding Source for all the software in the
|
||
product that is covered by this License, on a durable physical
|
||
medium customarily used for software interchange, for a price no
|
||
more than your reasonable cost of physically performing this
|
||
conveying of source, or (2) access to copy the
|
||
Corresponding Source from a network server at no charge.
|
||
|
||
c) Convey individual copies of the object code with a copy of the
|
||
written offer to provide the Corresponding Source. This
|
||
alternative is allowed only occasionally and noncommercially, and
|
||
only if you received the object code with such an offer, in accord
|
||
with subsection 6b.
|
||
|
||
d) Convey the object code by offering access from a designated
|
||
place (gratis or for a charge), and offer equivalent access to the
|
||
Corresponding Source in the same way through the same place at no
|
||
further charge. You need not require recipients to copy the
|
||
Corresponding Source along with the object code. If the place to
|
||
copy the object code is a network server, the Corresponding Source
|
||
may be on a different server (operated by you or a third party)
|
||
that supports equivalent copying facilities, provided you maintain
|
||
clear directions next to the object code saying where to find the
|
||
Corresponding Source. Regardless of what server hosts the
|
||
Corresponding Source, you remain obligated to ensure that it is
|
||
available for as long as needed to satisfy these requirements.
|
||
|
||
e) Convey the object code using peer-to-peer transmission, provided
|
||
you inform other peers where the object code and Corresponding
|
||
Source of the work are being offered to the general public at no
|
||
charge under subsection 6d.
|
||
|
||
A separable portion of the object code, whose source code is excluded
|
||
from the Corresponding Source as a System Library, need not be
|
||
included in conveying the object code work.
|
||
|
||
A "User Product" is either (1) a "consumer product", which means any
|
||
tangible personal property which is normally used for personal, family,
|
||
or household purposes, or (2) anything designed or sold for incorporation
|
||
into a dwelling. In determining whether a product is a consumer product,
|
||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||
product received by a particular user, "normally used" refers to a
|
||
typical or common use of that class of product, regardless of the status
|
||
of the particular user or of the way in which the particular user
|
||
actually uses, or expects or is expected to use, the product. A product
|
||
is a consumer product regardless of whether the product has substantial
|
||
commercial, industrial or non-consumer uses, unless such uses represent
|
||
the only significant mode of use of the product.
|
||
|
||
"Installation Information" for a User Product means any methods,
|
||
procedures, authorization keys, or other information required to install
|
||
and execute modified versions of a covered work in that User Product from
|
||
a modified version of its Corresponding Source. The information must
|
||
suffice to ensure that the continued functioning of the modified object
|
||
code is in no case prevented or interfered with solely because
|
||
modification has been made.
|
||
|
||
If you convey an object code work under this section in, or with, or
|
||
specifically for use in, a User Product, and the conveying occurs as
|
||
part of a transaction in which the right of possession and use of the
|
||
User Product is transferred to the recipient in perpetuity or for a
|
||
fixed term (regardless of how the transaction is characterized), the
|
||
Corresponding Source conveyed under this section must be accompanied
|
||
by the Installation Information. But this requirement does not apply
|
||
if neither you nor any third party retains the ability to install
|
||
modified object code on the User Product (for example, the work has
|
||
been installed in ROM).
|
||
|
||
The requirement to provide Installation Information does not include a
|
||
requirement to continue to provide support service, warranty, or updates
|
||
for a work that has been modified or installed by the recipient, or for
|
||
the User Product in which it has been modified or installed. Access to a
|
||
network may be denied when the modification itself materially and
|
||
adversely affects the operation of the network or violates the rules and
|
||
protocols for communication across the network.
|
||
|
||
Corresponding Source conveyed, and Installation Information provided,
|
||
in accord with this section must be in a format that is publicly
|
||
documented (and with an implementation available to the public in
|
||
source code form), and must require no special password or key for
|
||
unpacking, reading or copying.
|
||
|
||
7. Additional Terms.
|
||
|
||
"Additional permissions" are terms that supplement the terms of this
|
||
License by making exceptions from one or more of its conditions.
|
||
Additional permissions that are applicable to the entire Program shall
|
||
be treated as though they were included in this License, to the extent
|
||
that they are valid under applicable law. If additional permissions
|
||
apply only to part of the Program, that part may be used separately
|
||
under those permissions, but the entire Program remains governed by
|
||
this License without regard to the additional permissions.
|
||
|
||
When you convey a copy of a covered work, you may at your option
|
||
remove any additional permissions from that copy, or from any part of
|
||
it. (Additional permissions may be written to require their own
|
||
removal in certain cases when you modify the work.) You may place
|
||
additional permissions on material, added by you to a covered work,
|
||
for which you have or can give appropriate copyright permission.
|
||
|
||
Notwithstanding any other provision of this License, for material you
|
||
add to a covered work, you may (if authorized by the copyright holders of
|
||
that material) supplement the terms of this License with terms:
|
||
|
||
a) Disclaiming warranty or limiting liability differently from the
|
||
terms of sections 15 and 16 of this License; or
|
||
|
||
b) Requiring preservation of specified reasonable legal notices or
|
||
author attributions in that material or in the Appropriate Legal
|
||
Notices displayed by works containing it; or
|
||
|
||
c) Prohibiting misrepresentation of the origin of that material, or
|
||
requiring that modified versions of such material be marked in
|
||
reasonable ways as different from the original version; or
|
||
|
||
d) Limiting the use for publicity purposes of names of licensors or
|
||
authors of the material; or
|
||
|
||
e) Declining to grant rights under trademark law for use of some
|
||
trade names, trademarks, or service marks; or
|
||
|
||
f) Requiring indemnification of licensors and authors of that
|
||
material by anyone who conveys the material (or modified versions of
|
||
it) with contractual assumptions of liability to the recipient, for
|
||
any liability that these contractual assumptions directly impose on
|
||
those licensors and authors.
|
||
|
||
All other non-permissive additional terms are considered "further
|
||
restrictions" within the meaning of section 10. If the Program as you
|
||
received it, or any part of it, contains a notice stating that it is
|
||
governed by this License along with a term that is a further
|
||
restriction, you may remove that term. If a license document contains
|
||
a further restriction but permits relicensing or conveying under this
|
||
License, you may add to a covered work material governed by the terms
|
||
of that license document, provided that the further restriction does
|
||
not survive such relicensing or conveying.
|
||
|
||
If you add terms to a covered work in accord with this section, you
|
||
must place, in the relevant source files, a statement of the
|
||
additional terms that apply to those files, or a notice indicating
|
||
where to find the applicable terms.
|
||
|
||
Additional terms, permissive or non-permissive, may be stated in the
|
||
form of a separately written license, or stated as exceptions;
|
||
the above requirements apply either way.
|
||
|
||
8. Termination.
|
||
|
||
You may not propagate or modify a covered work except as expressly
|
||
provided under this License. Any attempt otherwise to propagate or
|
||
modify it is void, and will automatically terminate your rights under
|
||
this License (including any patent licenses granted under the third
|
||
paragraph of section 11).
|
||
|
||
However, if you cease all violation of this License, then your
|
||
license from a particular copyright holder is reinstated (a)
|
||
provisionally, unless and until the copyright holder explicitly and
|
||
finally terminates your license, and (b) permanently, if the copyright
|
||
holder fails to notify you of the violation by some reasonable means
|
||
prior to 60 days after the cessation.
|
||
|
||
Moreover, your license from a particular copyright holder is
|
||
reinstated permanently if the copyright holder notifies you of the
|
||
violation by some reasonable means, this is the first time you have
|
||
received notice of violation of this License (for any work) from that
|
||
copyright holder, and you cure the violation prior to 30 days after
|
||
your receipt of the notice.
|
||
|
||
Termination of your rights under this section does not terminate the
|
||
licenses of parties who have received copies or rights from you under
|
||
this License. If your rights have been terminated and not permanently
|
||
reinstated, you do not qualify to receive new licenses for the same
|
||
material under section 10.
|
||
|
||
9. Acceptance Not Required for Having Copies.
|
||
|
||
You are not required to accept this License in order to receive or
|
||
run a copy of the Program. Ancillary propagation of a covered work
|
||
occurring solely as a consequence of using peer-to-peer transmission
|
||
to receive a copy likewise does not require acceptance. However,
|
||
nothing other than this License grants you permission to propagate or
|
||
modify any covered work. These actions infringe copyright if you do
|
||
not accept this License. Therefore, by modifying or propagating a
|
||
covered work, you indicate your acceptance of this License to do so.
|
||
|
||
10. Automatic Licensing of Downstream Recipients.
|
||
|
||
Each time you convey a covered work, the recipient automatically
|
||
receives a license from the original licensors, to run, modify and
|
||
propagate that work, subject to this License. You are not responsible
|
||
for enforcing compliance by third parties with this License.
|
||
|
||
An "entity transaction" is a transaction transferring control of an
|
||
organization, or substantially all assets of one, or subdividing an
|
||
organization, or merging organizations. If propagation of a covered
|
||
work results from an entity transaction, each party to that
|
||
transaction who receives a copy of the work also receives whatever
|
||
licenses to the work the party's predecessor in interest had or could
|
||
give under the previous paragraph, plus a right to possession of the
|
||
Corresponding Source of the work from the predecessor in interest, if
|
||
the predecessor has it or can get it with reasonable efforts.
|
||
|
||
You may not impose any further restrictions on the exercise of the
|
||
rights granted or affirmed under this License. For example, you may
|
||
not impose a license fee, royalty, or other charge for exercise of
|
||
rights granted under this License, and you may not initiate litigation
|
||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||
any patent claim is infringed by making, using, selling, offering for
|
||
sale, or importing the Program or any portion of it.
|
||
|
||
11. Patents.
|
||
|
||
A "contributor" is a copyright holder who authorizes use under this
|
||
License of the Program or a work on which the Program is based. The
|
||
work thus licensed is called the contributor's "contributor version".
|
||
|
||
A contributor's "essential patent claims" are all patent claims
|
||
owned or controlled by the contributor, whether already acquired or
|
||
hereafter acquired, that would be infringed by some manner, permitted
|
||
by this License, of making, using, or selling its contributor version,
|
||
but do not include claims that would be infringed only as a
|
||
consequence of further modification of the contributor version. For
|
||
purposes of this definition, "control" includes the right to grant
|
||
patent sublicenses in a manner consistent with the requirements of
|
||
this License.
|
||
|
||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||
patent license under the contributor's essential patent claims, to
|
||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||
propagate the contents of its contributor version.
|
||
|
||
In the following three paragraphs, a "patent license" is any express
|
||
agreement or commitment, however denominated, not to enforce a patent
|
||
(such as an express permission to practice a patent or covenant not to
|
||
sue for patent infringement). To "grant" such a patent license to a
|
||
party means to make such an agreement or commitment not to enforce a
|
||
patent against the party.
|
||
|
||
If you convey a covered work, knowingly relying on a patent license,
|
||
and the Corresponding Source of the work is not available for anyone
|
||
to copy, free of charge and under the terms of this License, through a
|
||
publicly available network server or other readily accessible means,
|
||
then you must either (1) cause the Corresponding Source to be so
|
||
available, or (2) arrange to deprive yourself of the benefit of the
|
||
patent license for this particular work, or (3) arrange, in a manner
|
||
consistent with the requirements of this License, to extend the patent
|
||
license to downstream recipients. "Knowingly relying" means you have
|
||
actual knowledge that, but for the patent license, your conveying the
|
||
covered work in a country, or your recipient's use of the covered work
|
||
in a country, would infringe one or more identifiable patents in that
|
||
country that you have reason to believe are valid.
|
||
|
||
If, pursuant to or in connection with a single transaction or
|
||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||
covered work, and grant a patent license to some of the parties
|
||
receiving the covered work authorizing them to use, propagate, modify
|
||
or convey a specific copy of the covered work, then the patent license
|
||
you grant is automatically extended to all recipients of the covered
|
||
work and works based on it.
|
||
|
||
A patent license is "discriminatory" if it does not include within
|
||
the scope of its coverage, prohibits the exercise of, or is
|
||
conditioned on the non-exercise of one or more of the rights that are
|
||
specifically granted under this License. You may not convey a covered
|
||
work if you are a party to an arrangement with a third party that is
|
||
in the business of distributing software, under which you make payment
|
||
to the third party based on the extent of your activity of conveying
|
||
the work, and under which the third party grants, to any of the
|
||
parties who would receive the covered work from you, a discriminatory
|
||
patent license (a) in connection with copies of the covered work
|
||
conveyed by you (or copies made from those copies), or (b) primarily
|
||
for and in connection with specific products or compilations that
|
||
contain the covered work, unless you entered into that arrangement,
|
||
or that patent license was granted, prior to 28 March 2007.
|
||
|
||
Nothing in this License shall be construed as excluding or limiting
|
||
any implied license or other defenses to infringement that may
|
||
otherwise be available to you under applicable patent law.
|
||
|
||
12. No Surrender of Others' Freedom.
|
||
|
||
If conditions are imposed on you (whether by court order, agreement or
|
||
otherwise) that contradict the conditions of this License, they do not
|
||
excuse you from the conditions of this License. If you cannot convey a
|
||
covered work so as to satisfy simultaneously your obligations under this
|
||
License and any other pertinent obligations, then as a consequence you may
|
||
not convey it at all. For example, if you agree to terms that obligate you
|
||
to collect a royalty for further conveying from those to whom you convey
|
||
the Program, the only way you could satisfy both those terms and this
|
||
License would be to refrain entirely from conveying the Program.
|
||
|
||
13. Use with the GNU Affero General Public License.
|
||
|
||
Notwithstanding any other provision of this License, you have
|
||
permission to link or combine any covered work with a work licensed
|
||
under version 3 of the GNU Affero General Public License into a single
|
||
combined work, and to convey the resulting work. The terms of this
|
||
License will continue to apply to the part which is the covered work,
|
||
but the special requirements of the GNU Affero General Public License,
|
||
section 13, concerning interaction through a network will apply to the
|
||
combination as such.
|
||
|
||
14. Revised Versions of this License.
|
||
|
||
The Free Software Foundation may publish revised and/or new versions of
|
||
the GNU General Public License from time to time. Such new versions will
|
||
be similar in spirit to the present version, but may differ in detail to
|
||
address new problems or concerns.
|
||
|
||
Each version is given a distinguishing version number. If the
|
||
Program specifies that a certain numbered version of the GNU General
|
||
Public License "or any later version" applies to it, you have the
|
||
option of following the terms and conditions either of that numbered
|
||
version or of any later version published by the Free Software
|
||
Foundation. If the Program does not specify a version number of the
|
||
GNU General Public License, you may choose any version ever published
|
||
by the Free Software Foundation.
|
||
|
||
If the Program specifies that a proxy can decide which future
|
||
versions of the GNU General Public License can be used, that proxy's
|
||
public statement of acceptance of a version permanently authorizes you
|
||
to choose that version for the Program.
|
||
|
||
Later license versions may give you additional or different
|
||
permissions. However, no additional obligations are imposed on any
|
||
author or copyright holder as a result of your choosing to follow a
|
||
later version.
|
||
|
||
15. Disclaimer of Warranty.
|
||
|
||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||
|
||
16. Limitation of Liability.
|
||
|
||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||
SUCH DAMAGES.
|
||
|
||
17. Interpretation of Sections 15 and 16.
|
||
|
||
If the disclaimer of warranty and limitation of liability provided
|
||
above cannot be given local legal effect according to their terms,
|
||
reviewing courts shall apply local law that most closely approximates
|
||
an absolute waiver of all civil liability in connection with the
|
||
Program, unless a warranty or assumption of liability accompanies a
|
||
copy of the Program in return for a fee.
|
||
|
||
END OF TERMS AND CONDITIONS
|
||
|
||
How to Apply These Terms to Your New Programs
|
||
|
||
If you develop a new program, and you want it to be of the greatest
|
||
possible use to the public, the best way to achieve this is to make it
|
||
free software which everyone can redistribute and change under these terms.
|
||
|
||
To do so, attach the following notices to the program. It is safest
|
||
to attach them to the start of each source file to most effectively
|
||
state the exclusion of warranty; and each file should have at least
|
||
the "copyright" line and a pointer to where the full notice is found.
|
||
|
||
<one line to give the program's name and a brief idea of what it does.>
|
||
Copyright (C) <year> <name of author>
|
||
|
||
This program is free software: you can redistribute it and/or modify
|
||
it under the terms of the GNU 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 General Public License for more details.
|
||
|
||
You should have received a copy of the GNU General Public License
|
||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
|
||
Also add information on how to contact you by electronic and paper mail.
|
||
|
||
If the program does terminal interaction, make it output a short
|
||
notice like this when it starts in an interactive mode:
|
||
|
||
<program> Copyright (C) <year> <name of author>
|
||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||
This is free software, and you are welcome to redistribute it
|
||
under certain conditions; type `show c' for details.
|
||
|
||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||
parts of the General Public License. Of course, your program's commands
|
||
might be different; for a GUI interface, you would use an "about box".
|
||
|
||
You should also get your employer (if you work as a programmer) or school,
|
||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||
For more information on this, and how to apply and follow the GNU GPL, see
|
||
<http://www.gnu.org/licenses/>.
|
||
|
||
The GNU General Public License does not permit incorporating your program
|
||
into proprietary programs. If your program is a subroutine library, you
|
||
may consider it more useful to permit linking proprietary applications with
|
||
the library. If this is what you want to do, use the GNU Lesser General
|
||
Public License instead of this License. But first, please read
|
||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||
|
||
This version of the GNU Lesser General Public License incorporates
|
||
the terms and conditions of version 3 of the GNU General Public
|
||
License, supplemented by the additional permissions listed below.
|
||
|
||
0. Additional Definitions.
|
||
|
||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||
General Public License.
|
||
|
||
"The Library" refers to a covered work governed by this License,
|
||
other than an Application or a Combined Work as defined below.
|
||
|
||
An "Application" is any work that makes use of an interface provided
|
||
by the Library, but which is not otherwise based on the Library.
|
||
Defining a subclass of a class defined by the Library is deemed a mode
|
||
of using an interface provided by the Library.
|
||
|
||
A "Combined Work" is a work produced by combining or linking an
|
||
Application with the Library. The particular version of the Library
|
||
with which the Combined Work was made is also called the "Linked
|
||
Version".
|
||
|
||
The "Minimal Corresponding Source" for a Combined Work means the
|
||
Corresponding Source for the Combined Work, excluding any source code
|
||
for portions of the Combined Work that, considered in isolation, are
|
||
based on the Application, and not on the Linked Version.
|
||
|
||
The "Corresponding Application Code" for a Combined Work means the
|
||
object code and/or source code for the Application, including any data
|
||
and utility programs needed for reproducing the Combined Work from the
|
||
Application, but excluding the System Libraries of the Combined Work.
|
||
|
||
1. Exception to Section 3 of the GNU GPL.
|
||
|
||
You may convey a covered work under sections 3 and 4 of this License
|
||
without being bound by section 3 of the GNU GPL.
|
||
|
||
2. Conveying Modified Versions.
|
||
|
||
If you modify a copy of the Library, and, in your modifications, a
|
||
facility refers to a function or data to be supplied by an Application
|
||
that uses the facility (other than as an argument passed when the
|
||
facility is invoked), then you may convey a copy of the modified
|
||
version:
|
||
|
||
a) under this License, provided that you make a good faith effort to
|
||
ensure that, in the event an Application does not supply the
|
||
function or data, the facility still operates, and performs
|
||
whatever part of its purpose remains meaningful, or
|
||
|
||
b) under the GNU GPL, with none of the additional permissions of
|
||
this License applicable to that copy.
|
||
|
||
3. Object Code Incorporating Material from Library Header Files.
|
||
|
||
The object code form of an Application may incorporate material from
|
||
a header file that is part of the Library. You may convey such object
|
||
code under terms of your choice, provided that, if the incorporated
|
||
material is not limited to numerical parameters, data structure
|
||
layouts and accessors, or small macros, inline functions and templates
|
||
(ten or fewer lines in length), you do both of the following:
|
||
|
||
a) Give prominent notice with each copy of the object code that the
|
||
Library is used in it and that the Library and its use are
|
||
covered by this License.
|
||
|
||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||
document.
|
||
|
||
4. Combined Works.
|
||
|
||
You may convey a Combined Work under terms of your choice that,
|
||
taken together, effectively do not restrict modification of the
|
||
portions of the Library contained in the Combined Work and reverse
|
||
engineering for debugging such modifications, if you also do each of
|
||
the following:
|
||
|
||
a) Give prominent notice with each copy of the Combined Work that
|
||
the Library is used in it and that the Library and its use are
|
||
covered by this License.
|
||
|
||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||
document.
|
||
|
||
c) For a Combined Work that displays copyright notices during
|
||
execution, include the copyright notice for the Library among
|
||
these notices, as well as a reference directing the user to the
|
||
copies of the GNU GPL and this license document.
|
||
|
||
d) Do one of the following:
|
||
|
||
0) Convey the Minimal Corresponding Source under the terms of this
|
||
License, and the Corresponding Application Code in a form
|
||
suitable for, and under terms that permit, the user to
|
||
recombine or relink the Application with a modified version of
|
||
the Linked Version to produce a modified Combined Work, in the
|
||
manner specified by section 6 of the GNU GPL for conveying
|
||
Corresponding Source.
|
||
|
||
1) Use a suitable shared library mechanism for linking with the
|
||
Library. A suitable mechanism is one that (a) uses at run time
|
||
a copy of the Library already present on the user's computer
|
||
system, and (b) will operate properly with a modified version
|
||
of the Library that is interface-compatible with the Linked
|
||
Version.
|
||
|
||
e) Provide Installation Information, but only if you would otherwise
|
||
be required to provide such information under section 6 of the
|
||
GNU GPL, and only to the extent that such information is
|
||
necessary to install and execute a modified version of the
|
||
Combined Work produced by recombining or relinking the
|
||
Application with a modified version of the Linked Version. (If
|
||
you use option 4d0, the Installation Information must accompany
|
||
the Minimal Corresponding Source and Corresponding Application
|
||
Code. If you use option 4d1, you must provide the Installation
|
||
Information in the manner specified by section 6 of the GNU GPL
|
||
for conveying Corresponding Source.)
|
||
|
||
5. Combined Libraries.
|
||
|
||
You may place library facilities that are a work based on the
|
||
Library side by side in a single library together with other library
|
||
facilities that are not Applications and are not covered by this
|
||
License, and convey such a combined library under terms of your
|
||
choice, if you do both of the following:
|
||
|
||
a) Accompany the combined library with a copy of the same work based
|
||
on the Library, uncombined with any other library facilities,
|
||
conveyed under the terms of this License.
|
||
|
||
b) Give prominent notice with the combined library that part of it
|
||
is a work based on the Library, and explaining where to find the
|
||
accompanying uncombined form of the same work.
|
||
|
||
6. Revised Versions of the GNU Lesser General Public License.
|
||
|
||
The Free Software Foundation may publish revised and/or new versions
|
||
of the GNU Lesser General Public License from time to time. Such new
|
||
versions will be similar in spirit to the present version, but may
|
||
differ in detail to address new problems or concerns.
|
||
|
||
Each version is given a distinguishing version number. If the
|
||
Library as you received it specifies that a certain numbered version
|
||
of the GNU Lesser General Public License "or any later version"
|
||
applies to it, you have the option of following the terms and
|
||
conditions either of that published version or of any later version
|
||
published by the Free Software Foundation. If the Library as you
|
||
received it does not specify a version number of the GNU Lesser
|
||
General Public License, you may choose any version of the GNU Lesser
|
||
General Public License ever published by the Free Software Foundation.
|
||
|
||
If the Library as you received it specifies that a proxy can decide
|
||
whether future versions of the GNU Lesser General Public License shall
|
||
apply, that proxy's public statement of acceptance of any version is
|
||
permanent authorization for you to choose that version for the
|
||
Library.
|
DSeTa/DSeTa-Client/LISEZMOI | ||
---|---|---|
|
||
Dépendances:
|
||
modules IoTa:
|
||
- DS-Client
|
||
- TAu
|
||
- IoTa-DiscoveryWS-Client
|
||
bibliothèques:
|
||
- cxf
|
||
- commons-logging
|
DSeTa/DSeTa-Client/README | ||
---|---|---|
IoTa-DiscoveryWS-Client
|
||
DSeTa-Client
|
||
|
||
Client library for the DSeTa web service.
|
||
|
||
Dependencies:
|
||
IoTa modules:
|
||
- DS-Client
|
||
- TAu
|
||
- IoTa-DiscoveryWS-Client
|
||
libraries:
|
||
- cxf
|
||
- commons-logging
|
DSeTa/DSeTa-Client/pom.xml | ||
---|---|---|
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>dseta-client</artifactId>
|
||
<version>1.99</version>
|
||
<version>2.0</version>
|
||
<packaging>jar</packaging>
|
||
|
||
<name>DSeTa-Client</name>
|
||
|
||
<properties>
|
||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||
<lib-cxf-version>2.2.12</lib-cxf-version>
|
||
<lib-cxf-version>2.7.5</lib-cxf-version>
|
||
</properties>
|
||
|
||
<dependencies>
|
||
|
||
<!-- IoTa dependencies -->
|
||
<!-- IoTa depdencies -->
|
||
<dependency>
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>tau</artifactId>
|
||
<artifactId>ds-client</artifactId>
|
||
<version>${project.version}</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>discovery-client</artifactId>
|
||
<artifactId>tau</artifactId>
|
||
<version>${project.version}</version>
|
||
</dependency>
|
||
|
||
... | ... | |
<plugin>
|
||
<groupId>org.apache.cxf</groupId>
|
||
<artifactId>cxf-codegen-plugin</artifactId>
|
||
<version>2.6.1</version>
|
||
<version>${lib-cxf-version}</version>
|
||
<executions>
|
||
<execution>
|
||
<id>generate-sources</id>
|
||
... | ... | |
<sourceRoot>${project.build.directory}/generated-sources/cxf</sourceRoot>
|
||
<defaultOptions>
|
||
<packagenames>
|
||
<packagename>urn:unicaen:iota:tau:xsd=fr.unicaen.iota.tau.model</packagename>
|
||
<packagename>urn:unicaen:iota:ds:xsd=fr.unicaen.iota.ds.model</packagename>
|
||
<packagename>urn:unicaen:iota:ds:wsdl=fr.unicaen.iota.ds.soap</packagename>
|
||
<packagename>urn:unicaen:iota:dseta:xsd=fr.unicaen.iota.dseta.model</packagename>
|
||
<packagename>urn:unicaen:iota:dseta:wsdl=fr.unicaen.iota.dseta.soap</packagename>
|
||
</packagenames>
|
||
</defaultOptions>
|
||
<wsdlOptions>
|
||
<wsdlOption>
|
||
<wsdl>${basedir}/src/main/resources/wsdl/tau-ds.wsdl</wsdl>
|
||
<wsdlLocation>classpath:wsdl/tau-ds.wsdl</wsdlLocation>
|
||
</wsdlOption>
|
||
<wsdlOption>
|
||
<wsdl>${basedir}/src/main/resources/wsdl/ds.wsdl</wsdl>
|
||
<wsdlLocation>classpath:wsdl/ds.wsdl</wsdlLocation>
|
||
<wsdl>${basedir}/src/main/resources/wsdl/dseta.wsdl</wsdl>
|
||
<extraargs>
|
||
<extraarg>-nexclude</extraarg>
|
||
<extraarg>urn:unicaen:iota:tau:xsd=fr.unicaen.iota.tau.model</extraarg>
|
||
<extraarg>-nexclude</extraarg>
|
||
<extraarg>urn:unicaen:iota:ds:wsdl=fr.unicaen.iota.ds.soap</extraarg>
|
||
<extraarg>-nexclude</extraarg>
|
||
<extraarg>urn:unicaen:iota:ds:xsd=fr.unicaen.iota.ds.model</extraarg>
|
||
</extraargs>
|
||
</wsdlOption>
|
||
</wsdlOptions>
|
||
</configuration>
|
DSeTa/DSeTa-Client/src/main/java/fr/unicaen/iota/dseta/client/DSeTaClient.java | ||
---|---|---|
* Copyright © 2012-2013 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU General Public License as published by
|
||
* it under the terms of the GNU Lesser 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 General Public License for more details.
|
||
* GNU Lesser General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.dseta.client;
|
||
|
||
import fr.unicaen.iota.discovery.client.model.EventInfo;
|
||
import fr.unicaen.iota.discovery.client.model.Service;
|
||
import fr.unicaen.iota.discovery.client.util.EnhancedProtocolException;
|
||
import fr.unicaen.iota.discovery.client.util.StatusCodeHelper;
|
||
import fr.unicaen.iota.ds.model.*;
|
||
import fr.unicaen.iota.dseta.soap.IDedDSService;
|
||
import fr.unicaen.iota.dseta.soap.IDedDSServicePortType;
|
||
import fr.unicaen.iota.ds.model.DSEvent;
|
||
import fr.unicaen.iota.ds.model.EventCreateResp;
|
||
import fr.unicaen.iota.ds.model.EventLookupReq;
|
||
import fr.unicaen.iota.ds.model.EventLookupResp;
|
||
import fr.unicaen.iota.ds.model.MultipleEventCreateResp;
|
||
import fr.unicaen.iota.ds.soap.ImplementationExceptionResponse;
|
||
import fr.unicaen.iota.ds.soap.InternalExceptionResponse;
|
||
import fr.unicaen.iota.dseta.model.EventCreateReq;
|
||
import fr.unicaen.iota.dseta.model.MultipleEventCreateReq;
|
||
import fr.unicaen.iota.dseta.soap.DSeTaService;
|
||
import fr.unicaen.iota.dseta.soap.DSeTaServicePortType;
|
||
import fr.unicaen.iota.dseta.soap.SecurityExceptionResponse;
|
||
import fr.unicaen.iota.tau.model.Identity;
|
||
import java.io.File;
|
||
import java.io.FileInputStream;
|
||
import java.math.BigInteger;
|
||
import java.net.URL;
|
||
import java.security.KeyStore;
|
||
import java.security.SecureRandom;
|
||
import java.util.*;
|
||
import java.util.LinkedHashMap;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import javax.net.ssl.KeyManagerFactory;
|
||
import javax.net.ssl.TrustManagerFactory;
|
||
import javax.xml.datatype.DatatypeConfigurationException;
|
||
import javax.xml.datatype.DatatypeFactory;
|
||
import javax.xml.datatype.XMLGregorianCalendar;
|
||
import org.apache.axis2.databinding.types.URI.MalformedURIException;
|
||
import org.apache.commons.logging.Log;
|
||
import org.apache.commons.logging.LogFactory;
|
||
import org.apache.cxf.configuration.jsse.TLSClientParameters;
|
||
... | ... | |
import org.apache.cxf.transport.http.HTTPConduit;
|
||
import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
|
||
|
||
//import org.fosstrak.epcis.utils.AuthenticationType;
|
||
/**
|
||
*
|
||
*/
|
||
public class DSeTaClient {
|
||
|
||
private Identity identity;
|
||
private IDedDSServicePortType port;
|
||
private DSeTaServicePortType port;
|
||
private static final Log log = LogFactory.getLog(DSeTaClient.class);
|
||
|
||
public DSeTaClient(Identity id, String dsAddress) {
|
||
... | ... | |
System.setProperty("javax.net.ssl.trustStorePassword", trustPksPassword);
|
||
}
|
||
URL wsdlUrl = new URL(address + "?wsdl");
|
||
IDedDSService service = new IDedDSService(wsdlUrl);
|
||
port = service.getPort(IDedDSServicePortType.class);
|
||
DSeTaService service = new DSeTaService(wsdlUrl);
|
||
port = service.getPort(DSeTaServicePortType.class);
|
||
|
||
// turn off chunked transfer encoding
|
||
Client client = ClientProxy.getClient(port);
|
||
... | ... | |
this.identity = id;
|
||
}
|
||
|
||
public List<TEventItem> eventLookup(String objectId, GregorianCalendar start, GregorianCalendar end, String BizStep)
|
||
throws EnhancedProtocolException, MalformedURIException {
|
||
EventLookupIn in = new EventLookupIn();
|
||
in.setSid("not_used"); // session ID, not used in DSeTa
|
||
in.setObjectID(objectId);
|
||
in.setLifeCycleStepID(BizStep);
|
||
try {
|
||
DatatypeFactory DF = DatatypeFactory.newInstance();
|
||
if (start != null) {
|
||
XMLGregorianCalendar xmlCal = DF.newXMLGregorianCalendar(start);
|
||
in.setStartingAt(xmlCal);
|
||
}
|
||
if (end != null) {
|
||
XMLGregorianCalendar xmlCal = DF.newXMLGregorianCalendar(end);
|
||
in.setEndingAt(xmlCal);
|
||
}
|
||
} catch (DatatypeConfigurationException ex) {
|
||
log.error("Impossible date conversion", ex);
|
||
}
|
||
EventLookupOut out = port.iDedEventLookup(in, identity);
|
||
int statusCode = out.getResult().getCode();
|
||
if (StatusCodeHelper.isErrorCode(statusCode)) {
|
||
throw new EnhancedProtocolException(statusCode, out.getResult().getDesc());
|
||
}
|
||
TEventItemList tEventList = out.getEventList();
|
||
return tEventList.getEvent();
|
||
/**
|
||
* Sends the given DS event to the DS.
|
||
* @param epc The EPC of the event.
|
||
* @param eventType The type of the event.
|
||
* @param bizStep The business step of the event.
|
||
* @param eventTime The creation time of the event.
|
||
* @param serviceAddress The service address of the event.
|
||
* @param serviceType The type of the service.
|
||
* @param owner The owner of the event.
|
||
* @return The response.
|
||
* @throws ImplementationExceptionResponse If this event could not be captured.
|
||
* @throws InternalExceptionResponse If a DSeTa error occurred.
|
||
* @throws SecurityExceptionResponse If the operation is denied.
|
||
*/
|
||
public EventCreateResp eventCreate(String epc, String eventType, String bizStep, String serviceAddress, XMLGregorianCalendar eventTime,
|
||
String serviceType, String owner) throws ImplementationExceptionResponse, InternalExceptionResponse, SecurityExceptionResponse {
|
||
EventCreateReq createReq = new EventCreateReq();
|
||
DSEvent event = new DSEvent();
|
||
event.setEpc(epc);
|
||
event.setEventType(eventType);
|
||
event.setBizStep(bizStep);
|
||
event.setEventTime(eventTime);
|
||
event.setServiceAddress(serviceAddress);
|
||
event.setServiceType(serviceType);
|
||
createReq.setDsEvent(event);
|
||
Identity ownerId = new Identity();
|
||
ownerId.setAsString(owner);
|
||
createReq.setOwner(ownerId);
|
||
return port.iDedEventCreate(createReq, identity);
|
||
}
|
||
|
||
public int eventCreate(String partnerId, String objectId, String bizStep, String eventClass,
|
||
GregorianCalendar sourceTimeStamp, int ttl, Collection<String> serviceIds, int priority, Map<String, String> extensions)
|
||
throws MalformedURIException, EnhancedProtocolException {
|
||
EventCreateIn in = new EventCreateIn();
|
||
in.setSid("not_used"); // session ID, not used in DSeTa
|
||
in.setEvent(createTObjectEventTypeChoice(objectId, bizStep, eventClass,
|
||
sourceTimeStamp, ttl, serviceIds, priority, extensions));
|
||
in.setSupplyChainID("not_used");
|
||
in.setProxyPartnerID(partnerId);
|
||
EventCreateOut out = port.iDedEventCreate(in, identity);
|
||
int statusCode = out.getResult().getCode();
|
||
if (StatusCodeHelper.isErrorCode(statusCode)) {
|
||
throw new EnhancedProtocolException(statusCode, out.getResult().getDesc());
|
||
}
|
||
return out.getEventID().intValue();
|
||
/**
|
||
* Sends the given DS event to DSeTa.
|
||
* @param dsEvent The DS event to send.
|
||
* @param owner The owner of the event.
|
||
* @return The response.
|
||
* @throws ImplementationExceptionResponse If this event could not be captured.
|
||
* @throws InternalExceptionResponse If a DSeTa error occurred.
|
||
* @throws SecurityExceptionResponse If the operation is denied.
|
||
*/
|
||
public EventCreateResp eventCreate(DSEvent event, String owner)
|
||
throws ImplementationExceptionResponse, InternalExceptionResponse, SecurityExceptionResponse {
|
||
EventCreateReq createReq = new EventCreateReq();
|
||
createReq.setDsEvent(event);
|
||
Identity ownerId = new Identity();
|
||
ownerId.setAsString(owner);
|
||
createReq.setOwner(ownerId);
|
||
return port.iDedEventCreate(createReq, identity);
|
||
}
|
||
|
||
public List<Integer> multipleEventCreate(String partnerId, Collection<EventInfo> eventList)
|
||
throws MalformedURIException, EnhancedProtocolException {
|
||
MultipleEventCreateIn in = new MultipleEventCreateIn();
|
||
in.setSid("not_used"); // session ID, not used in DSeTa
|
||
in.setProxyPartnerID(partnerId);
|
||
in.setSupplyChainID("not_used");
|
||
TObjectEventList objectEventList = new TObjectEventList();
|
||
for (EventInfo event : eventList) {
|
||
TObjectEvent tObjectEvent = createTObjectEventTypeChoice(event.getEvent().getObjectId(),
|
||
event.getEvent().getBizStep(),
|
||
event.getEvent().getEventClass(),
|
||
event.getEvent().getSourceTimeStamp(),
|
||
event.getTtl(),
|
||
createServiceIds(event.getEvent().getServiceList()),
|
||
event.getPriority(),
|
||
event.getEvent().getExtensions()).getObjectEvent();
|
||
objectEventList.getObjectEvent().add(tObjectEvent);
|
||
}
|
||
in.setEvents(objectEventList);
|
||
MultipleEventCreateOut out = port.iDedMultipleEventCreate(in, identity);
|
||
int statusCode = out.getResult().getCode();
|
||
if (StatusCodeHelper.isErrorCode(statusCode)) {
|
||
throw new EnhancedProtocolException(statusCode, out.getResult().getDesc());
|
||
}
|
||
|
||
List<Integer> result = new ArrayList<Integer>();
|
||
if (out.getEventIDList().getEventID() == null) {
|
||
return result;
|
||
/**
|
||
* Sends the given list of DS events to DSeTa.
|
||
* @param dsEventMap The Map of events with owner to add. The Map is linked to keep order in the response.
|
||
* @return The responses or null if the Map is <code>null</code>.
|
||
* @throws ImplementationExceptionResponse If these events could not be captured.
|
||
* @throws InternalExceptionResponse If a DSeTa error occurred.
|
||
* @throws SecurityExceptionResponse If the operation is denied.
|
||
*/
|
||
public MultipleEventCreateResp multipleEventCreate(LinkedHashMap<DSEvent, String> dsetaEventMap)
|
||
throws ImplementationExceptionResponse, InternalExceptionResponse, SecurityExceptionResponse {
|
||
if (dsetaEventMap == null) {
|
||
return null;
|
||
}
|
||
for (BigInteger tEventID : out.getEventIDList().getEventID()) {
|
||
result.add(tEventID.intValue());
|
||
MultipleEventCreateReq multipleCreateReq = new MultipleEventCreateReq();
|
||
for (Map.Entry<DSEvent, String> dsetaEvent : dsetaEventMap.entrySet()) {
|
||
EventCreateReq eventCreate = new EventCreateReq();
|
||
eventCreate.setDsEvent(dsetaEvent.getKey());
|
||
Identity ownerId = new Identity();
|
||
ownerId.setAsString(dsetaEvent.getValue());
|
||
eventCreate.setOwner(ownerId);
|
||
multipleCreateReq.getEventCreate().add(eventCreate);
|
||
}
|
||
return result;
|
||
return port.iDedMultipleEventCreate(multipleCreateReq, identity);
|
||
}
|
||
|
||
private TEventTypeChoice createTObjectEventTypeChoice(String objectId, String bizStep, String eventClass,
|
||
Calendar sourceTimeStamp, int ttl, Collection<String> serviceIds, int priority, Map<String, String> extensions)
|
||
throws MalformedURIException {
|
||
TEventTypeChoice tEventTypeChoice = new TEventTypeChoice();
|
||
TObjectEvent tObjectEvent = new TObjectEvent();
|
||
|
||
TServiceIDList tServiceIDList = new TServiceIDList();
|
||
tServiceIDList.getId().addAll(serviceIds);
|
||
tObjectEvent.setServiceList(tServiceIDList);
|
||
|
||
tObjectEvent.setTtl(BigInteger.valueOf(ttl));
|
||
|
||
try {
|
||
DatatypeFactory DF = DatatypeFactory.newInstance();
|
||
GregorianCalendar gCal = new GregorianCalendar();
|
||
gCal.setTime(sourceTimeStamp.getTime());
|
||
XMLGregorianCalendar xmlCal = DF.newXMLGregorianCalendar(gCal);
|
||
tObjectEvent.setSourceTS(xmlCal);
|
||
} catch (DatatypeConfigurationException ex) {
|
||
log.error("Impossible date conversion", ex);
|
||
}
|
||
|
||
tObjectEvent.setPriority(priority);
|
||
tObjectEvent.setObjectID(objectId);
|
||
tObjectEvent.setLifeCycleStepID(bizStep);
|
||
tObjectEvent.setEventClass(eventClass);
|
||
|
||
// extensions:
|
||
if (extensions != null) {
|
||
TExtension exts = new TExtension();
|
||
for (Map.Entry<String, String> idval : extensions.entrySet()) {
|
||
/*
|
||
* ESDS_ServiceStub.TExtension tExtension = new
|
||
* ESDS_ServiceStub.TExtension(); OMFactory factory =
|
||
* OMAbstractFactory.getOMFactory(); OMElement elemExtension =
|
||
* factory.createOMElement(new QName("fr:unicaen:extension"));
|
||
* OMElement key = factory.createOMElement(new
|
||
* QName("fr:unicaen:key")); key.setText(idval.getKey());
|
||
* OMElement value = factory.createOMElement(new
|
||
* QName("fr:unicaen:value")); value.setText(idval.getValue());
|
||
* elemExtension.addChild(key); elemExtension.addChild(value);
|
||
* tExtension.addExtraElement(elemExtension);
|
||
*/
|
||
}
|
||
tObjectEvent.setExtension(exts);
|
||
}
|
||
tEventTypeChoice.setObjectEvent(tObjectEvent);
|
||
return tEventTypeChoice;
|
||
}
|
||
|
||
private List<String> createServiceIds(Collection<Service> serviceList) {
|
||
List<String> serviceIds = new ArrayList<String>();
|
||
for (Service s : serviceList) {
|
||
serviceIds.add(s.getId());
|
||
}
|
||
return serviceIds;
|
||
/**
|
||
* Performs a query to get DS events.
|
||
* @param epc The EPC to look up.
|
||
* @param eventType The event type to look up.
|
||
* @param bizStep The business step to look up.
|
||
* @param startingAt The lower time limit.
|
||
* @param endingAt The higher time limit.
|
||
* @param serviceType The type of the service.
|
||
* @return The list of DS events associated to the query.
|
||
* @throws ImplementationExceptionResponse If the query could not be performed.
|
||
* @throws InternalExceptionResponse If a DS error occurred.
|
||
* @throws SecurityExceptionResponse If the operation is denied.
|
||
*/
|
||
public List<DSEvent> eventLookup(String epc, String eventType, String bizStep, XMLGregorianCalendar startingAt,
|
||
XMLGregorianCalendar endingAt, String serviceType) throws ImplementationExceptionResponse, InternalExceptionResponse,
|
||
SecurityExceptionResponse {
|
||
EventLookupReq lookupReq = new EventLookupReq();
|
||
lookupReq.setEpc(epc);
|
||
lookupReq.setEventType(eventType);
|
||
lookupReq.setBizStep(bizStep);
|
||
lookupReq.setStartingAt(startingAt);
|
||
lookupReq.setEndingAt(endingAt);
|
||
lookupReq.setServiceType(serviceType);
|
||
EventLookupResp lookupResp = port.iDedEventLookup(lookupReq, identity);
|
||
return lookupResp.getDsEventList();
|
||
}
|
||
|
||
}
|
DSeTa/DSeTa-Client/src/main/resources/META-INF/LICENSE | ||
---|---|---|
GNU GENERAL PUBLIC LICENSE
|
||
GNU LESSER GENERAL PUBLIC LICENSE
|
||
Version 3, 29 June 2007
|
||
|
||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||
Everyone is permitted to copy and distribute verbatim copies
|
||
of this license document, but changing it is not allowed.
|
||
|
||
Preamble
|
||
|
||
The GNU General Public License is a free, copyleft license for
|
||
software and other kinds of works.
|
||
|
||
The licenses for most software and other practical works are designed
|
||
to take away your freedom to share and change the works. By contrast,
|
||
the GNU General Public License is intended to guarantee your freedom to
|
||
share and change all versions of a program--to make sure it remains free
|
||
software for all its users. We, the Free Software Foundation, use the
|
||
GNU General Public License for most of our software; it applies also to
|
||
any other work released this way by its authors. You can apply it to
|
||
your programs, too.
|
||
|
||
When we speak of free software, we are referring to freedom, not
|
||
price. Our General Public Licenses are designed to make sure that you
|
||
have the freedom to distribute copies of free software (and charge for
|
||
them if you wish), that you receive source code or can get it if you
|
||
want it, that you can change the software or use pieces of it in new
|
||
free programs, and that you know you can do these things.
|
||
|
||
To protect your rights, we need to prevent others from denying you
|
||
these rights or asking you to surrender the rights. Therefore, you have
|
||
certain responsibilities if you distribute copies of the software, or if
|
||
you modify it: responsibilities to respect the freedom of others.
|
||
|
||
For example, if you distribute copies of such a program, whether
|
||
gratis or for a fee, you must pass on to the recipients the same
|
||
freedoms that you received. You must make sure that they, too, receive
|
||
or can get the source code. And you must show them these terms so they
|
||
know their rights.
|
||
|
||
Developers that use the GNU GPL protect your rights with two steps:
|
||
(1) assert copyright on the software, and (2) offer you this License
|
||
giving you legal permission to copy, distribute and/or modify it.
|
||
|
||
For the developers' and authors' protection, the GPL clearly explains
|
||
that there is no warranty for this free software. For both users' and
|
||
authors' sake, the GPL requires that modified versions be marked as
|
||
changed, so that their problems will not be attributed erroneously to
|
||
authors of previous versions.
|
||
|
||
Some devices are designed to deny users access to install or run
|
||
modified versions of the software inside them, although the manufacturer
|
||
can do so. This is fundamentally incompatible with the aim of
|
||
protecting users' freedom to change the software. The systematic
|
||
pattern of such abuse occurs in the area of products for individuals to
|
||
use, which is precisely where it is most unacceptable. Therefore, we
|
||
have designed this version of the GPL to prohibit the practice for those
|
||
products. If such problems arise substantially in other domains, we
|
||
stand ready to extend this provision to those domains in future versions
|
||
of the GPL, as needed to protect the freedom of users.
|
||
|
||
Finally, every program is threatened constantly by software patents.
|
||
States should not allow patents to restrict development and use of
|
||
software on general-purpose computers, but in those that do, we wish to
|
||
avoid the special danger that patents applied to a free program could
|
||
make it effectively proprietary. To prevent this, the GPL assures that
|
||
patents cannot be used to render the program non-free.
|
||
|
||
The precise terms and conditions for copying, distribution and
|
||
modification follow.
|
||
|
||
TERMS AND CONDITIONS
|
||
|
||
0. Definitions.
|
||
|
||
"This License" refers to version 3 of the GNU General Public License.
|
||
|
||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||
works, such as semiconductor masks.
|
||
|
||
"The Program" refers to any copyrightable work licensed under this
|
||
License. Each licensee is addressed as "you". "Licensees" and
|
||
"recipients" may be individuals or organizations.
|
||
|
||
To "modify" a work means to copy from or adapt all or part of the work
|
||
in a fashion requiring copyright permission, other than the making of an
|
||
exact copy. The resulting work is called a "modified version" of the
|
||
earlier work or a work "based on" the earlier work.
|
||
|
||
A "covered work" means either the unmodified Program or a work based
|
||
on the Program.
|
||
|
||
To "propagate" a work means to do anything with it that, without
|
||
permission, would make you directly or secondarily liable for
|
||
infringement under applicable copyright law, except executing it on a
|
||
computer or modifying a private copy. Propagation includes copying,
|
||
distribution (with or without modification), making available to the
|
||
public, and in some countries other activities as well.
|
||
|
||
To "convey" a work means any kind of propagation that enables other
|
||
parties to make or receive copies. Mere interaction with a user through
|
||
a computer network, with no transfer of a copy, is not conveying.
|
||
|
||
An interactive user interface displays "Appropriate Legal Notices"
|
||
to the extent that it includes a convenient and prominently visible
|
||
feature that (1) displays an appropriate copyright notice, and (2)
|
||
tells the user that there is no warranty for the work (except to the
|
||
extent that warranties are provided), that licensees may convey the
|
||
work under this License, and how to view a copy of this License. If
|
||
the interface presents a list of user commands or options, such as a
|
||
menu, a prominent item in the list meets this criterion.
|
||
|
||
1. Source Code.
|
||
|
||
The "source code" for a work means the preferred form of the work
|
||
for making modifications to it. "Object code" means any non-source
|
||
form of a work.
|
||
|
||
A "Standard Interface" means an interface that either is an official
|
||
standard defined by a recognized standards body, or, in the case of
|
||
interfaces specified for a particular programming language, one that
|
||
is widely used among developers working in that language.
|
||
|
||
The "System Libraries" of an executable work include anything, other
|
||
than the work as a whole, that (a) is included in the normal form of
|
||
packaging a Major Component, but which is not part of that Major
|
||
Component, and (b) serves only to enable use of the work with that
|
||
Major Component, or to implement a Standard Interface for which an
|
||
implementation is available to the public in source code form. A
|
||
"Major Component", in this context, means a major essential component
|
||
(kernel, window system, and so on) of the specific operating system
|
||
(if any) on which the executable work runs, or a compiler used to
|
||
produce the work, or an object code interpreter used to run it.
|
||
|
||
The "Corresponding Source" for a work in object code form means all
|
||
the source code needed to generate, install, and (for an executable
|
||
work) run the object code and to modify the work, including scripts to
|
||
control those activities. However, it does not include the work's
|
||
System Libraries, or general-purpose tools or generally available free
|
||
programs which are used unmodified in performing those activities but
|
||
which are not part of the work. For example, Corresponding Source
|
||
includes interface definition files associated with source files for
|
||
the work, and the source code for shared libraries and dynamically
|
||
linked subprograms that the work is specifically designed to require,
|
||
such as by intimate data communication or control flow between those
|
||
subprograms and other parts of the work.
|
||
|
||
The Corresponding Source need not include anything that users
|
||
can regenerate automatically from other parts of the Corresponding
|
||
Source.
|
||
|
||
The Corresponding Source for a work in source code form is that
|
||
same work.
|
||
|
||
2. Basic Permissions.
|
||
|
||
All rights granted under this License are granted for the term of
|
||
copyright on the Program, and are irrevocable provided the stated
|
||
conditions are met. This License explicitly affirms your unlimited
|
||
permission to run the unmodified Program. The output from running a
|
||
covered work is covered by this License only if the output, given its
|
||
content, constitutes a covered work. This License acknowledges your
|
||
rights of fair use or other equivalent, as provided by copyright law.
|
||
|
||
You may make, run and propagate covered works that you do not
|
||
convey, without conditions so long as your license otherwise remains
|
||
in force. You may convey covered works to others for the sole purpose
|
||
of having them make modifications exclusively for you, or provide you
|
||
with facilities for running those works, provided that you comply with
|
||
the terms of this License in conveying all material for which you do
|
||
not control copyright. Those thus making or running the covered works
|
||
for you must do so exclusively on your behalf, under your direction
|
||
and control, on terms that prohibit them from making any copies of
|
||
your copyrighted material outside their relationship with you.
|
||
|
||
Conveying under any other circumstances is permitted solely under
|
||
the conditions stated below. Sublicensing is not allowed; section 10
|
||
makes it unnecessary.
|
||
|
||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||
|
||
No covered work shall be deemed part of an effective technological
|
||
measure under any applicable law fulfilling obligations under article
|
||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||
similar laws prohibiting or restricting circumvention of such
|
||
measures.
|
||
|
||
When you convey a covered work, you waive any legal power to forbid
|
||
circumvention of technological measures to the extent such circumvention
|
||
is effected by exercising rights under this License with respect to
|
||
the covered work, and you disclaim any intention to limit operation or
|
||
modification of the work as a means of enforcing, against the work's
|
||
users, your or third parties' legal rights to forbid circumvention of
|
||
technological measures.
|
||
|
||
4. Conveying Verbatim Copies.
|
||
|
||
You may convey verbatim copies of the Program's source code as you
|
||
receive it, in any medium, provided that you conspicuously and
|
||
appropriately publish on each copy an appropriate copyright notice;
|
||
keep intact all notices stating that this License and any
|
||
non-permissive terms added in accord with section 7 apply to the code;
|
||
keep intact all notices of the absence of any warranty; and give all
|
||
recipients a copy of this License along with the Program.
|
||
|
||
You may charge any price or no price for each copy that you convey,
|
||
and you may offer support or warranty protection for a fee.
|
||
|
||
5. Conveying Modified Source Versions.
|
||
|
||
You may convey a work based on the Program, or the modifications to
|
||
produce it from the Program, in the form of source code under the
|
||
terms of section 4, provided that you also meet all of these conditions:
|
||
|
||
a) The work must carry prominent notices stating that you modified
|
||
it, and giving a relevant date.
|
||
|
||
b) The work must carry prominent notices stating that it is
|
||
released under this License and any conditions added under section
|
||
7. This requirement modifies the requirement in section 4 to
|
||
"keep intact all notices".
|
||
|
||
c) You must license the entire work, as a whole, under this
|
||
License to anyone who comes into possession of a copy. This
|
||
License will therefore apply, along with any applicable section 7
|
||
additional terms, to the whole of the work, and all its parts,
|
||
regardless of how they are packaged. This License gives no
|
||
permission to license the work in any other way, but it does not
|
||
invalidate such permission if you have separately received it.
|
||
|
||
d) If the work has interactive user interfaces, each must display
|
||
Appropriate Legal Notices; however, if the Program has interactive
|
||
interfaces that do not display Appropriate Legal Notices, your
|
||
work need not make them do so.
|
||
|
||
A compilation of a covered work with other separate and independent
|
||
works, which are not by their nature extensions of the covered work,
|
||
and which are not combined with it such as to form a larger program,
|
||
in or on a volume of a storage or distribution medium, is called an
|
||
"aggregate" if the compilation and its resulting copyright are not
|
||
used to limit the access or legal rights of the compilation's users
|
||
beyond what the individual works permit. Inclusion of a covered work
|
||
in an aggregate does not cause this License to apply to the other
|
||
parts of the aggregate.
|
||
|
||
6. Conveying Non-Source Forms.
|
||
|
||
You may convey a covered work in object code form under the terms
|
||
of sections 4 and 5, provided that you also convey the
|
||
machine-readable Corresponding Source under the terms of this License,
|
||
in one of these ways:
|
||
|
||
a) Convey the object code in, or embodied in, a physical product
|
||
(including a physical distribution medium), accompanied by the
|
||
Corresponding Source fixed on a durable physical medium
|
||
customarily used for software interchange.
|
||
|
||
b) Convey the object code in, or embodied in, a physical product
|
||
(including a physical distribution medium), accompanied by a
|
||
written offer, valid for at least three years and valid for as
|
||
long as you offer spare parts or customer support for that product
|
||
model, to give anyone who possesses the object code either (1) a
|
||
copy of the Corresponding Source for all the software in the
|
||
product that is covered by this License, on a durable physical
|
||
medium customarily used for software interchange, for a price no
|
||
more than your reasonable cost of physically performing this
|
||
conveying of source, or (2) access to copy the
|
||
Corresponding Source from a network server at no charge.
|
||
|
||
c) Convey individual copies of the object code with a copy of the
|
||
written offer to provide the Corresponding Source. This
|
||
alternative is allowed only occasionally and noncommercially, and
|
||
only if you received the object code with such an offer, in accord
|
||
with subsection 6b.
|
||
|
||
d) Convey the object code by offering access from a designated
|
||
place (gratis or for a charge), and offer equivalent access to the
|
||
Corresponding Source in the same way through the same place at no
|
||
further charge. You need not require recipients to copy the
|
||
Corresponding Source along with the object code. If the place to
|
||
copy the object code is a network server, the Corresponding Source
|
||
may be on a different server (operated by you or a third party)
|
||
that supports equivalent copying facilities, provided you maintain
|
||
clear directions next to the object code saying where to find the
|
||
Corresponding Source. Regardless of what server hosts the
|
||
Corresponding Source, you remain obligated to ensure that it is
|
||
available for as long as needed to satisfy these requirements.
|
||
|
||
e) Convey the object code using peer-to-peer transmission, provided
|
||
you inform other peers where the object code and Corresponding
|
||
Source of the work are being offered to the general public at no
|
||
charge under subsection 6d.
|
||
|
||
A separable portion of the object code, whose source code is excluded
|
||
from the Corresponding Source as a System Library, need not be
|
||
included in conveying the object code work.
|
||
|
||
A "User Product" is either (1) a "consumer product", which means any
|
||
tangible personal property which is normally used for personal, family,
|
||
or household purposes, or (2) anything designed or sold for incorporation
|
||
into a dwelling. In determining whether a product is a consumer product,
|
||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||
product received by a particular user, "normally used" refers to a
|
||
typical or common use of that class of product, regardless of the status
|
||
of the particular user or of the way in which the particular user
|
||
actually uses, or expects or is expected to use, the product. A product
|
||
is a consumer product regardless of whether the product has substantial
|
||
commercial, industrial or non-consumer uses, unless such uses represent
|
||
the only significant mode of use of the product.
|
||
|
||
"Installation Information" for a User Product means any methods,
|
||
procedures, authorization keys, or other information required to install
|
||
and execute modified versions of a covered work in that User Product from
|
||
a modified version of its Corresponding Source. The information must
|
||
suffice to ensure that the continued functioning of the modified object
|
||
code is in no case prevented or interfered with solely because
|
||
modification has been made.
|
||
|
||
If you convey an object code work under this section in, or with, or
|
||
specifically for use in, a User Product, and the conveying occurs as
|
||
part of a transaction in which the right of possession and use of the
|
||
User Product is transferred to the recipient in perpetuity or for a
|
||
fixed term (regardless of how the transaction is characterized), the
|
||
Corresponding Source conveyed under this section must be accompanied
|
||
by the Installation Information. But this requirement does not apply
|
||
if neither you nor any third party retains the ability to install
|
||
modified object code on the User Product (for example, the work has
|
||
been installed in ROM).
|
||
|
||
The requirement to provide Installation Information does not include a
|
||
requirement to continue to provide support service, warranty, or updates
|
||
for a work that has been modified or installed by the recipient, or for
|
||
the User Product in which it has been modified or installed. Access to a
|
||
network may be denied when the modification itself materially and
|
||
adversely affects the operation of the network or violates the rules and
|
||
protocols for communication across the network.
|
||
|
||
Corresponding Source conveyed, and Installation Information provided,
|
||
in accord with this section must be in a format that is publicly
|
||
documented (and with an implementation available to the public in
|
||
source code form), and must require no special password or key for
|
||
unpacking, reading or copying.
|
||
|
||
7. Additional Terms.
|
||
|
||
"Additional permissions" are terms that supplement the terms of this
|
||
License by making exceptions from one or more of its conditions.
|
||
Additional permissions that are applicable to the entire Program shall
|
||
be treated as though they were included in this License, to the extent
|
||
that they are valid under applicable law. If additional permissions
|
||
apply only to part of the Program, that part may be used separately
|
||
under those permissions, but the entire Program remains governed by
|
||
this License without regard to the additional permissions.
|
||
|
||
When you convey a copy of a covered work, you may at your option
|
||
remove any additional permissions from that copy, or from any part of
|
||
it. (Additional permissions may be written to require their own
|
||
removal in certain cases when you modify the work.) You may place
|
||
additional permissions on material, added by you to a covered work,
|
||
for which you have or can give appropriate copyright permission.
|
||
|
||
Notwithstanding any other provision of this License, for material you
|
||
add to a covered work, you may (if authorized by the copyright holders of
|
||
that material) supplement the terms of this License with terms:
|
||
|
||
a) Disclaiming warranty or limiting liability differently from the
|
||
terms of sections 15 and 16 of this License; or
|
||
|
||
b) Requiring preservation of specified reasonable legal notices or
|
||
author attributions in that material or in the Appropriate Legal
|
||
Notices displayed by works containing it; or
|
||
|
||
c) Prohibiting misrepresentation of the origin of that material, or
|
||
requiring that modified versions of such material be marked in
|
||
reasonable ways as different from the original version; or
|
||
|
||
d) Limiting the use for publicity purposes of names of licensors or
|
||
authors of the material; or
|
||
|
||
e) Declining to grant rights under trademark law for use of some
|
||
trade names, trademarks, or service marks; or
|
||
|
||
f) Requiring indemnification of licensors and authors of that
|
||
material by anyone who conveys the material (or modified versions of
|
||
it) with contractual assumptions of liability to the recipient, for
|
||
any liability that these contractual assumptions directly impose on
|
||
those licensors and authors.
|
||
|
||
All other non-permissive additional terms are considered "further
|
||
restrictions" within the meaning of section 10. If the Program as you
|
||
received it, or any part of it, contains a notice stating that it is
|
||
governed by this License along with a term that is a further
|
||
restriction, you may remove that term. If a license document contains
|
||
a further restriction but permits relicensing or conveying under this
|
||
License, you may add to a covered work material governed by the terms
|
||
of that license document, provided that the further restriction does
|
||
not survive such relicensing or conveying.
|
||
|
||
If you add terms to a covered work in accord with this section, you
|
||
must place, in the relevant source files, a statement of the
|
||
additional terms that apply to those files, or a notice indicating
|
||
where to find the applicable terms.
|
||
|
||
Additional terms, permissive or non-permissive, may be stated in the
|
||
form of a separately written license, or stated as exceptions;
|
||
the above requirements apply either way.
|
||
|
||
8. Termination.
|
||
|
||
You may not propagate or modify a covered work except as expressly
|
||
provided under this License. Any attempt otherwise to propagate or
|
||
modify it is void, and will automatically terminate your rights under
|
||
this License (including any patent licenses granted under the third
|
||
paragraph of section 11).
|
||
|
||
However, if you cease all violation of this License, then your
|
||
license from a particular copyright holder is reinstated (a)
|
||
provisionally, unless and until the copyright holder explicitly and
|
||
finally terminates your license, and (b) permanently, if the copyright
|
||
holder fails to notify you of the violation by some reasonable means
|
||
prior to 60 days after the cessation.
|
||
|
||
Moreover, your license from a particular copyright holder is
|
||
reinstated permanently if the copyright holder notifies you of the
|
||
violation by some reasonable means, this is the first time you have
|
||
received notice of violation of this License (for any work) from that
|
||
copyright holder, and you cure the violation prior to 30 days after
|
||
your receipt of the notice.
|
||
|
||
Termination of your rights under this section does not terminate the
|
||
licenses of parties who have received copies or rights from you under
|
||
this License. If your rights have been terminated and not permanently
|
||
reinstated, you do not qualify to receive new licenses for the same
|
||
material under section 10.
|
||
|
||
9. Acceptance Not Required for Having Copies.
|
||
|
||
You are not required to accept this License in order to receive or
|
||
run a copy of the Program. Ancillary propagation of a covered work
|
||
occurring solely as a consequence of using peer-to-peer transmission
|
||
to receive a copy likewise does not require acceptance. However,
|
||
nothing other than this License grants you permission to propagate or
|
||
modify any covered work. These actions infringe copyright if you do
|
||
not accept this License. Therefore, by modifying or propagating a
|
||
covered work, you indicate your acceptance of this License to do so.
|
||
|
||
10. Automatic Licensing of Downstream Recipients.
|
||
|
||
Each time you convey a covered work, the recipient automatically
|
||
receives a license from the original licensors, to run, modify and
|
||
propagate that work, subject to this License. You are not responsible
|
||
for enforcing compliance by third parties with this License.
|
||
|
||
An "entity transaction" is a transaction transferring control of an
|
||
organization, or substantially all assets of one, or subdividing an
|
||
organization, or merging organizations. If propagation of a covered
|
||
work results from an entity transaction, each party to that
|
||
transaction who receives a copy of the work also receives whatever
|
||
licenses to the work the party's predecessor in interest had or could
|
||
give under the previous paragraph, plus a right to possession of the
|
||
Corresponding Source of the work from the predecessor in interest, if
|
||
the predecessor has it or can get it with reasonable efforts.
|
||
|
||
You may not impose any further restrictions on the exercise of the
|
||
rights granted or affirmed under this License. For example, you may
|
||
not impose a license fee, royalty, or other charge for exercise of
|
||
rights granted under this License, and you may not initiate litigation
|
||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||
any patent claim is infringed by making, using, selling, offering for
|
||
sale, or importing the Program or any portion of it.
|
||
|
||
11. Patents.
|
||
|
||
A "contributor" is a copyright holder who authorizes use under this
|
||
License of the Program or a work on which the Program is based. The
|
||
work thus licensed is called the contributor's "contributor version".
|
||
|
||
A contributor's "essential patent claims" are all patent claims
|
||
owned or controlled by the contributor, whether already acquired or
|
||
hereafter acquired, that would be infringed by some manner, permitted
|
||
by this License, of making, using, or selling its contributor version,
|
||
but do not include claims that would be infringed only as a
|
||
consequence of further modification of the contributor version. For
|
||
purposes of this definition, "control" includes the right to grant
|
||
patent sublicenses in a manner consistent with the requirements of
|
||
this License.
|
||
|
||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||
patent license under the contributor's essential patent claims, to
|
||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||
propagate the contents of its contributor version.
|
||
|
||
In the following three paragraphs, a "patent license" is any express
|
||
agreement or commitment, however denominated, not to enforce a patent
|
||
(such as an express permission to practice a patent or covenant not to
|
||
sue for patent infringement). To "grant" such a patent license to a
|
||
party means to make such an agreement or commitment not to enforce a
|
||
patent against the party.
|
||
|
||
If you convey a covered work, knowingly relying on a patent license,
|
||
and the Corresponding Source of the work is not available for anyone
|
||
to copy, free of charge and under the terms of this License, through a
|
||
publicly available network server or other readily accessible means,
|
||
then you must either (1) cause the Corresponding Source to be so
|
||
available, or (2) arrange to deprive yourself of the benefit of the
|
||
patent license for this particular work, or (3) arrange, in a manner
|
||
consistent with the requirements of this License, to extend the patent
|
||
license to downstream recipients. "Knowingly relying" means you have
|
||
actual knowledge that, but for the patent license, your conveying the
|
||
covered work in a country, or your recipient's use of the covered work
|
||
in a country, would infringe one or more identifiable patents in that
|
||
country that you have reason to believe are valid.
|
||
|
||
If, pursuant to or in connection with a single transaction or
|
||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||
covered work, and grant a patent license to some of the parties
|
||
receiving the covered work authorizing them to use, propagate, modify
|
||
or convey a specific copy of the covered work, then the patent license
|
||
you grant is automatically extended to all recipients of the covered
|
||
work and works based on it.
|
||
|
||
A patent license is "discriminatory" if it does not include within
|
||
the scope of its coverage, prohibits the exercise of, or is
|
||
conditioned on the non-exercise of one or more of the rights that are
|
||
specifically granted under this License. You may not convey a covered
|
||
work if you are a party to an arrangement with a third party that is
|
||
in the business of distributing software, under which you make payment
|
||
to the third party based on the extent of your activity of conveying
|
||
the work, and under which the third party grants, to any of the
|
||
parties who would receive the covered work from you, a discriminatory
|
||
patent license (a) in connection with copies of the covered work
|
||
conveyed by you (or copies made from those copies), or (b) primarily
|
||
for and in connection with specific products or compilations that
|
||
contain the covered work, unless you entered into that arrangement,
|
||
or that patent license was granted, prior to 28 March 2007.
|
||
|
||
Nothing in this License shall be construed as excluding or limiting
|
||
any implied license or other defenses to infringement that may
|
||
otherwise be available to you under applicable patent law.
|
||
|
||
12. No Surrender of Others' Freedom.
|
||
|
||
If conditions are imposed on you (whether by court order, agreement or
|
||
otherwise) that contradict the conditions of this License, they do not
|
||
excuse you from the conditions of this License. If you cannot convey a
|
||
covered work so as to satisfy simultaneously your obligations under this
|
||
License and any other pertinent obligations, then as a consequence you may
|
||
not convey it at all. For example, if you agree to terms that obligate you
|
||
to collect a royalty for further conveying from those to whom you convey
|
||
the Program, the only way you could satisfy both those terms and this
|
||
License would be to refrain entirely from conveying the Program.
|
||
|
||
13. Use with the GNU Affero General Public License.
|
||
|
||
Notwithstanding any other provision of this License, you have
|
||
permission to link or combine any covered work with a work licensed
|
||
under version 3 of the GNU Affero General Public License into a single
|
||
combined work, and to convey the resulting work. The terms of this
|
||
License will continue to apply to the part which is the covered work,
|
||
but the special requirements of the GNU Affero General Public License,
|
||
section 13, concerning interaction through a network will apply to the
|
||
combination as such.
|
||
|
||
14. Revised Versions of this License.
|
||
|
||
The Free Software Foundation may publish revised and/or new versions of
|
||
the GNU General Public License from time to time. Such new versions will
|
||
be similar in spirit to the present version, but may differ in detail to
|
||
address new problems or concerns.
|
||
|
||
Each version is given a distinguishing version number. If the
|
||
Program specifies that a certain numbered version of the GNU General
|
||
Public License "or any later version" applies to it, you have the
|
||
option of following the terms and conditions either of that numbered
|
||
version or of any later version published by the Free Software
|
||
Foundation. If the Program does not specify a version number of the
|
||
GNU General Public License, you may choose any version ever published
|
||
by the Free Software Foundation.
|
||
|
||
If the Program specifies that a proxy can decide which future
|
||
versions of the GNU General Public License can be used, that proxy's
|
||
public statement of acceptance of a version permanently authorizes you
|
||
to choose that version for the Program.
|
||
|
||
Later license versions may give you additional or different
|
||
permissions. However, no additional obligations are imposed on any
|
||
author or copyright holder as a result of your choosing to follow a
|
||
later version.
|
||
|
||
15. Disclaimer of Warranty.
|
||
|
||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||
|
||
16. Limitation of Liability.
|
||
|
||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||
SUCH DAMAGES.
|
||
|
||
17. Interpretation of Sections 15 and 16.
|
||
|
||
If the disclaimer of warranty and limitation of liability provided
|
||
above cannot be given local legal effect according to their terms,
|
||
reviewing courts shall apply local law that most closely approximates
|
||
an absolute waiver of all civil liability in connection with the
|
||
Program, unless a warranty or assumption of liability accompanies a
|
||
copy of the Program in return for a fee.
|
||
|
||
END OF TERMS AND CONDITIONS
|
||
|
||
How to Apply These Terms to Your New Programs
|
||
|
||
If you develop a new program, and you want it to be of the greatest
|
||
possible use to the public, the best way to achieve this is to make it
|
||
free software which everyone can redistribute and change under these terms.
|
||
|
||
To do so, attach the following notices to the program. It is safest
|
||
to attach them to the start of each source file to most effectively
|
||
state the exclusion of warranty; and each file should have at least
|
||
the "copyright" line and a pointer to where the full notice is found.
|
||
|
||
<one line to give the program's name and a brief idea of what it does.>
|
||
Copyright (C) <year> <name of author>
|
||
|
||
This program is free software: you can redistribute it and/or modify
|
||
it under the terms of the GNU 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 General Public License for more details.
|
||
|
||
You should have received a copy of the GNU General Public License
|
||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
|
||
Also add information on how to contact you by electronic and paper mail.
|
||
|
||
If the program does terminal interaction, make it output a short
|
||
notice like this when it starts in an interactive mode:
|
||
|
||
<program> Copyright (C) <year> <name of author>
|
||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||
This is free software, and you are welcome to redistribute it
|
||
under certain conditions; type `show c' for details.
|
||
|
||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||
parts of the General Public License. Of course, your program's commands
|
||
might be different; for a GUI interface, you would use an "about box".
|
||
|
||
You should also get your employer (if you work as a programmer) or school,
|
||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||
For more information on this, and how to apply and follow the GNU GPL, see
|
||
<http://www.gnu.org/licenses/>.
|
||
|
||
The GNU General Public License does not permit incorporating your program
|
||
into proprietary programs. If your program is a subroutine library, you
|
||
may consider it more useful to permit linking proprietary applications with
|
||
the library. If this is what you want to do, use the GNU Lesser General
|
||
Public License instead of this License. But first, please read
|
||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||
|
||
This version of the GNU Lesser General Public License incorporates
|
||
the terms and conditions of version 3 of the GNU General Public
|
||
License, supplemented by the additional permissions listed below.
|
||
|
||
0. Additional Definitions.
|
||
|
||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||
General Public License.
|
||
|
||
"The Library" refers to a covered work governed by this License,
|
||
other than an Application or a Combined Work as defined below.
|
||
|
||
An "Application" is any work that makes use of an interface provided
|
||
by the Library, but which is not otherwise based on the Library.
|
||
Defining a subclass of a class defined by the Library is deemed a mode
|
||
of using an interface provided by the Library.
|
||
|
||
A "Combined Work" is a work produced by combining or linking an
|
||
Application with the Library. The particular version of the Library
|
||
with which the Combined Work was made is also called the "Linked
|
||
Version".
|
||
|
||
The "Minimal Corresponding Source" for a Combined Work means the
|
||
Corresponding Source for the Combined Work, excluding any source code
|
||
for portions of the Combined Work that, considered in isolation, are
|
||
based on the Application, and not on the Linked Version.
|
||
|
||
The "Corresponding Application Code" for a Combined Work means the
|
||
object code and/or source code for the Application, including any data
|
||
and utility programs needed for reproducing the Combined Work from the
|
||
Application, but excluding the System Libraries of the Combined Work.
|
||
|
||
1. Exception to Section 3 of the GNU GPL.
|
||
|
||
You may convey a covered work under sections 3 and 4 of this License
|
||
without being bound by section 3 of the GNU GPL.
|
||
|
||
2. Conveying Modified Versions.
|
||
|
||
If you modify a copy of the Library, and, in your modifications, a
|
||
facility refers to a function or data to be supplied by an Application
|
||
that uses the facility (other than as an argument passed when the
|
||
facility is invoked), then you may convey a copy of the modified
|
||
version:
|
||
|
||
a) under this License, provided that you make a good faith effort to
|
||
ensure that, in the event an Application does not supply the
|
||
function or data, the facility still operates, and performs
|
||
whatever part of its purpose remains meaningful, or
|
||
|
||
b) under the GNU GPL, with none of the additional permissions of
|
||
this License applicable to that copy.
|
||
|
||
3. Object Code Incorporating Material from Library Header Files.
|
||
|
||
The object code form of an Application may incorporate material from
|
||
a header file that is part of the Library. You may convey such object
|
||
code under terms of your choice, provided that, if the incorporated
|
||
material is not limited to numerical parameters, data structure
|
||
layouts and accessors, or small macros, inline functions and templates
|
||
(ten or fewer lines in length), you do both of the following:
|
||
|
||
a) Give prominent notice with each copy of the object code that the
|
||
Library is used in it and that the Library and its use are
|
||
covered by this License.
|
||
|
||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||
document.
|
||
|
||
4. Combined Works.
|
||
|
||
You may convey a Combined Work under terms of your choice that,
|
||
taken together, effectively do not restrict modification of the
|
||
portions of the Library contained in the Combined Work and reverse
|
||
engineering for debugging such modifications, if you also do each of
|
||
the following:
|
||
|
||
a) Give prominent notice with each copy of the Combined Work that
|
||
the Library is used in it and that the Library and its use are
|
||
covered by this License.
|
||
|
||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||
document.
|
||
|
||
c) For a Combined Work that displays copyright notices during
|
||
execution, include the copyright notice for the Library among
|
||
these notices, as well as a reference directing the user to the
|
||
copies of the GNU GPL and this license document.
|
||
|
||
d) Do one of the following:
|
||
|
||
0) Convey the Minimal Corresponding Source under the terms of this
|
||
License, and the Corresponding Application Code in a form
|
||
suitable for, and under terms that permit, the user to
|
||
recombine or relink the Application with a modified version of
|
||
the Linked Version to produce a modified Combined Work, in the
|
||
manner specified by section 6 of the GNU GPL for conveying
|
||
Corresponding Source.
|
||
|
||
1) Use a suitable shared library mechanism for linking with the
|
||
Library. A suitable mechanism is one that (a) uses at run time
|
||
a copy of the Library already present on the user's computer
|
||
system, and (b) will operate properly with a modified version
|
||
of the Library that is interface-compatible with the Linked
|
||
Version.
|
||
|
||
e) Provide Installation Information, but only if you would otherwise
|
||
be required to provide such information under section 6 of the
|
||
GNU GPL, and only to the extent that such information is
|
||
necessary to install and execute a modified version of the
|
||
Combined Work produced by recombining or relinking the
|
||
Application with a modified version of the Linked Version. (If
|
||
you use option 4d0, the Installation Information must accompany
|
||
the Minimal Corresponding Source and Corresponding Application
|
||
Code. If you use option 4d1, you must provide the Installation
|
||
Information in the manner specified by section 6 of the GNU GPL
|
||
for conveying Corresponding Source.)
|
||
|
||
5. Combined Libraries.
|
||
|
||
You may place library facilities that are a work based on the
|
||
Library side by side in a single library together with other library
|
||
facilities that are not Applications and are not covered by this
|
||
License, and convey such a combined library under terms of your
|
||
choice, if you do both of the following:
|
||
|
||
a) Accompany the combined library with a copy of the same work based
|
||
on the Library, uncombined with any other library facilities,
|
||
conveyed under the terms of this License.
|
||
|
||
b) Give prominent notice with the combined library that part of it
|
||
is a work based on the Library, and explaining where to find the
|
||
accompanying uncombined form of the same work.
|
||
|
||
6. Revised Versions of the GNU Lesser General Public License.
|
||
|
||
The Free Software Foundation may publish revised and/or new versions
|
||
of the GNU Lesser General Public License from time to time. Such new
|
||
versions will be similar in spirit to the present version, but may
|
||
differ in detail to address new problems or concerns.
|
||
|
||
Each version is given a distinguishing version number. If the
|
||
Library as you received it specifies that a certain numbered version
|
||
of the GNU Lesser General Public License "or any later version"
|
||
applies to it, you have the option of following the terms and
|
||
conditions either of that published version or of any later version
|
||
published by the Free Software Foundation. If the Library as you
|
||
received it does not specify a version number of the GNU Lesser
|
||
General Public License, you may choose any version of the GNU Lesser
|
||
General Public License ever published by the Free Software Foundation.
|
||
|
||
If the Library as you received it specifies that a proxy can decide
|
||
whether future versions of the GNU Lesser General Public License shall
|
||
apply, that proxy's public statement of acceptance of any version is
|
||
permanent authorization for you to choose that version for the
|
||
Library.
|
DSeTa/DSeTa-Client/src/main/resources/wsdl/ds.wsdl | ||
---|---|---|
<?xml version="1.0" encoding="UTF-8"?>
|
||
<wsdl:definitions name="DS"
|
||
|
||
<wsdl:definitions name="DSService"
|
||
targetNamespace="urn:unicaen:iota:ds:wsdl"
|
||
xmlns:wsoap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||
xmlns:wds="urn:unicaen:iota:ds:wsdl"
|
||
xmlns:xds="urn:unicaen:iota:ds:xsd">
|
||
xmlns:dsw="urn:unicaen:iota:ds:wsdl"
|
||
xmlns:ds="urn:unicaen:iota:ds:xsd">
|
||
|
||
<wsdl:types>
|
||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||
<xs:import namespace="urn:unicaen:iota:ds:xsd" schemaLocation="ds.xsd"/>
|
||
</xs:schema>
|
||
</wsdl:types>
|
||
|
||
<wsdl:message name="multipleEventCreateReq">
|
||
<wsdl:part name="parms" element="xds:MultipleEventCreate">
|
||
</wsdl:part>
|
||
<wsdl:message name="eventCreateRequest">
|
||
<wsdl:part name="eventCreateReq" element="ds:eventCreateReq"/>
|
||
</wsdl:message>
|
||
|
||
<wsdl:message name="multipleEventCreateRsp">
|
||
<wsdl:part name="result" element="xds:MultipleEventCreateResult">
|
||
</wsdl:part>
|
||
|
||
<wsdl:message name="eventCreateResponse">
|
||
<wsdl:part name="eventCreateResp" element="ds:eventCreateResp"/>
|
||
</wsdl:message>
|
||
|
||
<wsdl:message name="eventLookupReq">
|
||
<wsdl:part name="parms" element="xds:EventLookup">
|
||
</wsdl:part>
|
||
<wsdl:message name="multipleEventCreateRequest">
|
||
<wsdl:part name="multipleEventCreateReq" element="ds:multipleEventCreateReq"/>
|
||
</wsdl:message>
|
||
|
||
<wsdl:message name="eventLookupRsp">
|
||
<wsdl:part name="result" element="xds:EventLookupResult">
|
||
</wsdl:part>
|
||
<wsdl:message name="multipleEventCreateResponse">
|
||
<wsdl:part name="multipleEventCreateResp" element="ds:multipleEventCreateResp"/>
|
||
</wsdl:message>
|
||
|
||
<wsdl:message name="eventCreateReq">
|
||
<wsdl:part name="parms" element="xds:EventCreate">
|
||
</wsdl:part>
|
||
<wsdl:message name="eventLookupRequest">
|
||
<wsdl:part name="eventLookupReq" element="ds:eventLookupReq"/>
|
||
</wsdl:message>
|
||
|
||
<wsdl:message name="eventCreateRsp">
|
||
<wsdl:part name="result" element="xds:EventCreateResult">
|
||
</wsdl:part>
|
||
<wsdl:message name="eventLookupResponse">
|
||
<wsdl:part name="eventLookResp" element="ds:eventLookupResp"/>
|
||
</wsdl:message>
|
||
|
||
<wsdl:portType name="DSServicePortType">
|
||
<wsdl:message name="ImplementationExceptionResponse">
|
||
<wsdl:part name="fault" element="ds:ImplementationException"/>
|
||
</wsdl:message>
|
||
|
||
<wsdl:operation name="eventLookup">
|
||
<wsdl:input name="eventLookupReq" message="wds:eventLookupReq">
|
||
</wsdl:input>
|
||
<wsdl:output name="eventLookupRsp" message="wds:eventLookupRsp">
|
||
</wsdl:output>
|
||
<wsdl:message name="InternalExceptionResponse">
|
||
<wsdl:part name="fault" element="ds:InternalException"/>
|
||
</wsdl:message>
|
||
|
||
<wsdl:portType name="DSServicePortType">
|
||
<wsdl:operation name="eventCreate">
|
||
<wsdl:input name="eventCreateRequest" message="dsw:eventCreateRequest"/>
|
||
<wsdl:output name="eventCreateResult" message="dsw:eventCreateResponse"/>
|
||
<wsdl:fault name="ImplementationExceptionFault" message="dsw:ImplementationExceptionResponse"/>
|
||
<wsdl:fault name="InternalExceptionFault" message="dsw:InternalExceptionResponse"/>
|
||
</wsdl:operation>
|
||
|
||
<wsdl:operation name="multipleEventCreate">
|
||
<wsdl:input name="multipleEventCreateReq" message="wds:multipleEventCreateReq">
|
||
</wsdl:input>
|
||
<wsdl:output name="multipleEventCreateRsp" message="wds:multipleEventCreateRsp">
|
||
</wsdl:output>
|
||
<wsdl:input name="multipleEventCreateRequest" message="dsw:multipleEventCreateRequest"/>
|
||
<wsdl:output name="multipleEventCreateResult" message="dsw:multipleEventCreateResponse"/>
|
||
<wsdl:fault name="ImplementationExceptionFault" message="dsw:ImplementationExceptionResponse"/>
|
||
<wsdl:fault name="InternalExceptionFault" message="dsw:InternalExceptionResponse"/>
|
||
</wsdl:operation>
|
||
|
||
<wsdl:operation name="eventCreate">
|
||
<wsdl:input name="eventCreateReq" message="wds:eventCreateReq">
|
||
</wsdl:input>
|
||
<wsdl:output name="eventCreateRsp" message="wds:eventCreateRsp">
|
||
</wsdl:output>
|
||
<wsdl:operation name="eventLookup">
|
||
<wsdl:input name="eventLookupRequest" message="dsw:eventLookupRequest"/>
|
||
<wsdl:output name="eventLookupResult" message="dsw:eventLookupResponse"/>
|
||
<wsdl:fault name="ImplementationExceptionFault" message="dsw:ImplementationExceptionResponse"/>
|
||
<wsdl:fault name="InternalExceptionFault" message="dsw:InternalExceptionResponse"/>
|
||
</wsdl:operation>
|
||
|
||
</wsdl:portType>
|
||
|
||
<wsdl:binding name="DS" type="wds:DSServicePortType">
|
||
<wsdl:binding name="DSBinding" type="dsw:DSServicePortType">
|
||
<wsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||
<wsdl:operation name="eventLookup">
|
||
<wsoap:operation soapAction=""/>
|
||
<wsdl:input name="eventLookupReq">
|
||
<wsdl:operation name="eventCreate">
|
||
<wsoap:operation/>
|
||
<wsdl:input>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:input>
|
||
<wsdl:output name="eventLookupRsp">
|
||
<wsdl:output>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:output>
|
||
<wsdl:fault name="ImplementationExceptionFault">
|
||
<wsoap:fault name="ImplementationExceptionFault" use="literal"/>
|
||
</wsdl:fault>
|
||
<wsdl:fault name="InternalExceptionFault">
|
||
<wsoap:fault name="InternalExceptionFault" use="literal"/>
|
||
</wsdl:fault>
|
||
</wsdl:operation>
|
||
|
||
<wsdl:operation name="eventCreate">
|
||
<wsoap:operation soapAction=""/>
|
||
<wsdl:input name="eventCreateReq">
|
||
<wsdl:operation name="multipleEventCreate">
|
||
<wsoap:operation/>
|
||
<wsdl:input>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:input>
|
||
<wsdl:output name="eventCreateRsp">
|
||
<wsdl:output>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:output>
|
||
<wsdl:fault name="ImplementationExceptionFault">
|
||
<wsoap:fault name="ImplementationExceptionFault" use="literal"/>
|
||
</wsdl:fault>
|
||
<wsdl:fault name="InternalExceptionFault">
|
||
<wsoap:fault name="InternalExceptionFault" use="literal"/>
|
||
</wsdl:fault>
|
||
</wsdl:operation>
|
||
|
||
<wsdl:operation name="multipleEventCreate">
|
||
<wsoap:operation soapAction=""/>
|
||
<wsdl:input name="multipleEventCreateReq">
|
||
<wsdl:operation name="eventLookup">
|
||
<wsoap:operation/>
|
||
<wsdl:input>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:input>
|
||
<wsdl:output name="multipleEventCreateRsp">
|
||
<wsdl:output>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:output>
|
||
<wsdl:fault name="ImplementationExceptionFault">
|
||
<wsoap:fault name="ImplementationExceptionFault" use="literal"/>
|
||
</wsdl:fault>
|
||
<wsdl:fault name="InternalExceptionFault">
|
||
<wsoap:fault name="InternalExceptionFault" use="literal"/>
|
||
</wsdl:fault>
|
||
</wsdl:operation>
|
||
|
||
</wsdl:binding>
|
||
|
||
<wsdl:service name="DS_Service">
|
||
<wsdl:port name="DS_Service" binding="wds:DS">
|
||
<wsdl:service name="DSService">
|
||
<wsdl:port name="DSServiceServicePort" binding="dsw:DSBinding">
|
||
</wsdl:port>
|
||
</wsdl:service>
|
||
|
DSeTa/DSeTa-Client/src/main/resources/wsdl/ds.xsd | ||
---|---|---|
<?xml version="1.0" encoding="UTF-8"?>
|
||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||
xmlns:xds="urn:unicaen:iota:ds:xsd"
|
||
attributeFormDefault="unqualified"
|
||
elementFormDefault="unqualified"
|
||
targetNamespace="urn:unicaen:iota:ds:xsd">
|
||
xmlns:ds="urn:unicaen:iota:ds:xsd"
|
||
targetNamespace="urn:unicaen:iota:ds:xsd"
|
||
elementFormDefault="unqualified" attributeFormDefault="unqualified">
|
||
|
||
<xs:simpleType name="tPassword">
|
||
<xs:simpleType name="createResponseType">
|
||
<xs:restriction base="xs:token">
|
||
<xs:minLength value="6"/>
|
||
<xs:maxLength value="16"/>
|
||
<xs:enumeration value="createdNotPublished"/>
|
||
<xs:enumeration value="createdAndPublished"/>
|
||
<xs:enumeration value="notAdded"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tServiceURI">
|
||
<xs:restriction base="xs:anyURI"/>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tX509String">
|
||
<xs:restriction base="xs:string">
|
||
<xs:minLength value="2"/>
|
||
<xs:maxLength value="128"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tMessageDigestHexString">
|
||
<xs:restriction base="xs:string">
|
||
<xs:minLength value="2"/>
|
||
<xs:maxLength value="512"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tLeaseSeconds">
|
||
<xs:restriction base="xs:int">
|
||
<xs:minInclusive value="0"/>
|
||
<xs:maxExclusive value="3600"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tEventPriority">
|
||
<xs:restriction base="xs:int">
|
||
<xs:minInclusive value="0"/>
|
||
<xs:maxExclusive value="9"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tEventTTL">
|
||
<xs:restriction base="xs:positiveInteger"/>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tServiceType">
|
||
<xs:restriction base="xs:token">
|
||
<xs:enumeration value="ws"/>
|
||
<xs:enumeration value="epcis"/>
|
||
<xs:enumeration value="html"/>
|
||
<xs:enumeration value="xmlrpc"/>
|
||
<xs:enumeration value="ds"/>
|
||
<xs:enumeration value="ided_ds"/>
|
||
<xs:enumeration value="ided_epcis"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tEventType">
|
||
<xs:restriction base="xs:token">
|
||
<xs:enumeration value="void"/>
|
||
<xs:enumeration value="object"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tObject">
|
||
<xs:restriction base="xs:token">
|
||
<xs:enumeration value="global"/>
|
||
<xs:enumeration value="role"/>
|
||
<xs:enumeration value="user"/>
|
||
<xs:enumeration value="partner"/>
|
||
<xs:enumeration value="supplychain"/>
|
||
<xs:enumeration value="event"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tMethod">
|
||
<xs:restriction base="xs:token">
|
||
<xs:enumeration value="hello"/>
|
||
<xs:enumeration value="login"/>
|
||
<xs:enumeration value="logout"/>
|
||
<xs:enumeration value="create"/>
|
||
<xs:enumeration value="update"/>
|
||
<xs:enumeration value="delete"/>
|
||
<xs:enumeration value="info"/>
|
||
<xs:enumeration value="lookup"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tPermission">
|
||
<xs:restriction base="xs:token">
|
||
<xs:enumeration value="execute"/>
|
||
<xs:enumeration value="proxy"/>
|
||
<xs:enumeration value="void"/>
|
||
<xs:enumeration value="admin"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tListAction">
|
||
<xs:restriction base="xs:token">
|
||
<xs:enumeration value="add"/>
|
||
<xs:enumeration value="remove"/>
|
||
<xs:enumeration value="replace"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tLoginMode">
|
||
<xs:restriction base="xs:token">
|
||
<xs:enumeration value="key-and-password"/>
|
||
<xs:enumeration value="key-only"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tMessageDigestAlgorithm">
|
||
<xs:restriction base="xs:token">
|
||
<xs:enumeration value="md5"/>
|
||
<xs:enumeration value="md4"/>
|
||
<xs:enumeration value="md2"/>
|
||
<xs:enumeration value="sha1"/>
|
||
<xs:enumeration value="sha"/>
|
||
<xs:enumeration value="mdc2"/>
|
||
<xs:enumeration value="ripemd160"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tAccessMode">
|
||
<xs:restriction base="xs:token">
|
||
<xs:enumeration value="read"/>
|
||
<xs:enumeration value="write"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tStatus">
|
||
<xs:restriction base="xs:token">
|
||
<xs:enumeration value="active"/>
|
||
<xs:enumeration value="inactive"/>
|
||
<xs:enumeration value="pending"/>
|
||
<xs:enumeration value="processed"/>
|
||
<xs:enumeration value="failed"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tResultCode">
|
||
<xs:restriction base="xs:int">
|
||
<xs:enumeration value="1000"/>
|
||
<xs:enumeration value="1001"/>
|
||
<xs:enumeration value="1500"/>
|
||
<xs:enumeration value="2000"/>
|
||
<xs:enumeration value="2001"/>
|
||
<xs:enumeration value="2002"/>
|
||
<xs:enumeration value="2003"/>
|
||
<xs:enumeration value="2004"/>
|
||
<xs:enumeration value="2005"/>
|
||
<xs:enumeration value="2100"/>
|
||
<xs:enumeration value="2101"/>
|
||
<xs:enumeration value="2102"/>
|
||
<xs:enumeration value="2103"/>
|
||
<xs:enumeration value="2104"/>
|
||
<xs:enumeration value="2200"/>
|
||
<xs:enumeration value="2201"/>
|
||
<xs:enumeration value="2202"/>
|
||
<xs:enumeration value="2302"/>
|
||
<xs:enumeration value="2303"/>
|
||
<xs:enumeration value="2304"/>
|
||
<xs:enumeration value="2305"/>
|
||
<xs:enumeration value="2306"/>
|
||
<xs:enumeration value="2306"/>
|
||
<xs:enumeration value="2307"/>
|
||
<xs:enumeration value="2400"/>
|
||
<xs:enumeration value="2500"/>
|
||
<xs:enumeration value="2501"/>
|
||
<xs:enumeration value="2502"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tSessionID">
|
||
<xs:restriction base="xs:token">
|
||
<xs:minLength value="32"/>
|
||
<xs:maxLength value="32"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tRoleID">
|
||
<xs:restriction base="xs:token">
|
||
<xs:minLength value="2"/>
|
||
<xs:maxLength value="64"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tUserID">
|
||
<xs:restriction base="xs:token">
|
||
<xs:minLength value="2"/>
|
||
<xs:maxLength value="16"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tPartnerID">
|
||
<xs:restriction base="xs:token">
|
||
<xs:minLength value="2"/>
|
||
<xs:maxLength value="64"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tSupplyChainID">
|
||
<xs:restriction base="xs:token">
|
||
<xs:minLength value="2"/>
|
||
<xs:maxLength value="64"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tEventID">
|
||
<xs:restriction base="xs:positiveInteger"/>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tEventClass">
|
||
<xs:restriction base="xs:token">
|
||
<xs:minLength value="2"/>
|
||
<xs:maxLength value="64"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tServiceID">
|
||
<xs:restriction base="xs:token">
|
||
<xs:minLength value="2"/>
|
||
<xs:maxLength value="64"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tEventTopicID">
|
||
<xs:restriction base="xs:token">
|
||
<xs:minLength value="2"/>
|
||
<xs:maxLength value="64"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tTableID">
|
||
<xs:restriction base="xs:token">
|
||
<xs:minLength value="2"/>
|
||
<xs:maxLength value="128"/>
|
||
</xs:restriction>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tSmallUID">
|
||
<xs:restriction base="xs:int"/>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tLargeUID">
|
||
<xs:restriction base="xs:positiveInteger"/>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tObjectID">
|
||
<xs:restriction base="xs:anyURI"/>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tObjectIDPattern">
|
||
<xs:restriction base="xs:anyURI"/>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tLifeCycleStepID">
|
||
<xs:restriction base="xs:anyURI"/>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tExtensionID">
|
||
<xs:restriction base="xs:anyURI"/>
|
||
</xs:simpleType>
|
||
|
||
<xs:simpleType name="tReasonID">
|
||
<xs:restriction base="xs:anyURI"/>
|
||
</xs:simpleType>
|
||
|
||
<xs:complexType name="tRoleItem">
|
||
<xs:attribute name="id" type="xds:tRoleID" use="required"/>
|
||
<xs:attribute name="uid" type="xds:tSmallUID"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tRoleItemList">
|
||
<xs:sequence>
|
||
<xs:element maxOccurs="unbounded" minOccurs="0" name="role" type="xds:tRoleItem"/>
|
||
</xs:sequence>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tGrantItem">
|
||
<xs:attribute name="o" type="xds:tObject" use="required"/>
|
||
<xs:attribute name="m" type="xds:tMethod" use="required"/>
|
||
<xs:attribute name="p" type="xds:tPermission" use="required"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tGrantItemList">
|
||
<xs:sequence>
|
||
<xs:element maxOccurs="unbounded" minOccurs="0" name="grant" type="xds:tGrantItem"/>
|
||
</xs:sequence>
|
||
<xs:attribute name="action" type="xds:tListAction"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tUserItem">
|
||
<xs:attribute name="id" type="xds:tUserID" use="required"/>
|
||
<xs:attribute name="uid" type="xds:tSmallUID"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tUserItemList">
|
||
<xs:sequence>
|
||
<xs:element maxOccurs="unbounded" minOccurs="0" name="user" type="xds:tUserItem"/>
|
||
</xs:sequence>
|
||
<xs:attribute name="action" type="xds:tListAction"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tPartnerItem">
|
||
<xs:attribute name="id" type="xds:tPartnerID" use="required"/>
|
||
<xs:attribute name="uid" type="xds:tSmallUID"/>
|
||
<xs:attribute name="authority" type="xs:boolean"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tPartnerItemList">
|
||
<xs:sequence>
|
||
<xs:element maxOccurs="unbounded" minOccurs="0" name="partner" type="xds:tPartnerItem"/>
|
||
</xs:sequence>
|
||
<xs:attribute name="action" type="xds:tListAction"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tSupplyChainItem">
|
||
<xs:attribute name="id" type="xds:tSupplyChainID" use="required"/>
|
||
<xs:attribute name="uid" type="xds:tSmallUID"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tSupplyChainItemList">
|
||
<xs:sequence>
|
||
<xs:element maxOccurs="unbounded" minOccurs="0" name="supplyChain" type="xds:tSupplyChainItem"/>
|
||
</xs:sequence>
|
||
<xs:attribute name="action" type="xds:tListAction"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tEventItem">
|
||
<xs:sequence>
|
||
<xs:element name="serviceList" type="xds:tServiceItemList"/>
|
||
</xs:sequence>
|
||
<xs:attribute name="e" type="xds:tEventID" use="required"/>
|
||
<xs:attribute name="o" type="xds:tObjectID" use="required"/>
|
||
<xs:attribute name="t" type="xds:tEventType" use="required"/>
|
||
<xs:attribute name="c" type="xds:tEventClass" use="required"/>
|
||
<xs:attribute name="lcs" type="xds:tLifeCycleStepID" use="required"/>
|
||
<xs:attribute name="ets" type="xs:dateTime" use="required"/>
|
||
<xs:attribute name="sts" type="xs:dateTime" use="required"/>
|
||
<xs:attribute name="u" type="xds:tUserID" use="required"/>
|
||
<xs:attribute name="p" type="xds:tPartnerID" use="required"/>
|
||
<xs:attribute name="sc" type="xds:tSupplyChainID" use="required"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tEventItemList">
|
||
<xs:sequence>
|
||
<xs:element maxOccurs="unbounded" minOccurs="0" name="event" type="xds:tEventItem"/>
|
||
</xs:sequence>
|
||
<xs:attribute name="action" type="xds:tListAction"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tObjectItem">
|
||
<xs:attribute name="id" type="xds:tObjectID" use="required"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tObjectItemList">
|
||
<xs:sequence>
|
||
<xs:element maxOccurs="unbounded" minOccurs="0" name="object" type="xds:tObjectItem"/>
|
||
</xs:sequence>
|
||
<xs:attribute name="action" type="xds:tListAction"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tX509CertItem">
|
||
<xs:attribute name="cn" type="xds:tX509String" use="required"/>
|
||
<xs:attribute name="o" type="xds:tX509String" use="required"/>
|
||
<xs:attribute name="fingerprint" type="xds:tX509String" use="required"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tX509CertItemList">
|
||
<xs:sequence>
|
||
<xs:element maxOccurs="unbounded" minOccurs="0" name="cert" type="xds:tX509CertItem"/>
|
||
</xs:sequence>
|
||
<xs:attribute name="action" type="xds:tListAction"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tServiceItem">
|
||
<xs:attribute name="id" type="xds:tServiceID" use="required"/>
|
||
<xs:attribute name="type" type="xds:tServiceType" use="required"/>
|
||
<xs:attribute name="uri" type="xds:tServiceURI" use="required"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tServiceItemList">
|
||
<xs:sequence>
|
||
<xs:element maxOccurs="unbounded" minOccurs="0" name="service" type="xds:tServiceItem"/>
|
||
</xs:sequence>
|
||
<xs:attribute name="action" type="xds:tListAction"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tServiceIDList">
|
||
<xs:sequence>
|
||
<xs:element maxOccurs="unbounded" minOccurs="0" name="id" type="xds:tServiceID"/>
|
||
</xs:sequence>
|
||
<xs:attribute name="action" type="xds:tListAction"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tLifeCycleStepItem">
|
||
<xs:attribute name="id" type="xds:tLifeCycleStepID" use="required"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tLifeCycleStepItemList">
|
||
<xs:sequence>
|
||
<xs:element maxOccurs="unbounded" minOccurs="0" name="lifeCycleStep" type="xds:tLifeCycleStepItem"/>
|
||
</xs:sequence>
|
||
<xs:attribute name="action" type="xds:tListAction"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tEventClassItem">
|
||
<xs:attribute name="id" type="xds:tEventClass" use="required"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tEventClassItemList">
|
||
<xs:sequence>
|
||
<xs:element maxOccurs="unbounded" minOccurs="0" name="eventClass" type="xds:tEventClassItem"/>
|
||
</xs:sequence>
|
||
<xs:attribute name="action" type="xds:tListAction"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tExtensionItem">
|
||
<xs:attribute name="id" type="xds:tExtensionID" use="required"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tExtensionItemList">
|
||
<xs:sequence>
|
||
<xs:element maxOccurs="unbounded" minOccurs="0" name="extension" type="xds:tExtensionItem"/>
|
||
</xs:sequence>
|
||
<xs:attribute name="action" type="xds:tListAction"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tEventTopicItem">
|
||
<xs:sequence>
|
||
<xs:element minOccurs="0" name="lifeCycleStepList" type="xds:tLifeCycleStepItemList"/>
|
||
<xs:element minOccurs="0" name="eventClassList" type="xds:tEventClassItemList"/>
|
||
</xs:sequence>
|
||
<xs:attribute name="id" type="xds:tEventTopicID" use="required"/>
|
||
<xs:attribute name="objectIDPattern" type="xds:tObjectIDPattern" use="required"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tEventTopicItemList">
|
||
<xs:sequence>
|
||
<xs:element maxOccurs="unbounded" minOccurs="0" name="eventTopic" type="xds:tEventTopicItem"/>
|
||
</xs:sequence>
|
||
<xs:attribute name="action" type="xds:tListAction"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tTableRowItem">
|
||
<xs:attribute name="uid" type="xds:tSmallUID" use="required"/>
|
||
<xs:attribute name="id" type="xs:string" use="required"/>
|
||
<xs:attribute name="desc" type="xs:string" use="required"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tTableRowItemList">
|
||
<xs:sequence>
|
||
<xs:element maxOccurs="unbounded" minOccurs="0" name="row" type="xds:tTableRowItem"/>
|
||
</xs:sequence>
|
||
<xs:attribute name="action" type="xds:tListAction"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tEventLifeCycleStepAllowItem">
|
||
<xs:attribute name="partnerID" type="xds:tPartnerID" use="required"/>
|
||
<xs:attribute name="lifeCycleStepID" type="xds:tLifeCycleStepID" use="required"/>
|
||
<xs:attribute name="accessMode" type="xds:tAccessMode" use="required"/>
|
||
<xs:attribute name="userID" type="xds:tUserID"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tEventLifeCycleStepAllowItemList">
|
||
<xs:sequence>
|
||
<xs:element maxOccurs="unbounded" minOccurs="0" name="allow" type="xds:tEventLifeCycleStepAllowItem"/>
|
||
</xs:sequence>
|
||
<xs:attribute name="action" type="xds:tListAction"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tEventDenyItem">
|
||
<xs:attribute name="status" type="xds:tStatus" use="required"/>
|
||
<xs:attribute name="supplyChainID" type="xds:tSupplyChainID" use="required"/>
|
||
<xs:attribute name="partnerID" type="xds:tPartnerID" use="required"/>
|
||
<xs:attribute name="userID" type="xds:tUserID"/>
|
||
<xs:attribute name="objectIDPattern" type="xds:tObjectIDPattern"/>
|
||
<xs:attribute name="startingAt" type="xs:dateTime"/>
|
||
<xs:attribute name="endingAt" type="xs:dateTime"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tEventDenyItemList">
|
||
<xs:sequence>
|
||
<xs:element maxOccurs="unbounded" minOccurs="0" name="deny" type="xds:tEventDenyItem"/>
|
||
</xs:sequence>
|
||
<xs:attribute name="action" type="xds:tListAction"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tExtension">
|
||
<xs:sequence>
|
||
<xs:any maxOccurs="unbounded" namespace="##other"/>
|
||
</xs:sequence>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tResult">
|
||
<xs:complexType name="DSEvent">
|
||
<xs:sequence>
|
||
<xs:element minOccurs="0" name="value" type="xs:string"/>
|
||
<xs:element name="eventType" type="xs:token"/>
|
||
<xs:element name="epc" type="xs:token"/>
|
||
<xs:element name="bizStep" type="xs:token"/>
|
||
<xs:element name="eventTime" type="xs:dateTime"/>
|
||
<xs:element name="serviceAddress" type="xs:anyURI"/>
|
||
<xs:element name="serviceType" type="xs:token"/>
|
||
</xs:sequence>
|
||
<xs:attribute name="code" type="xds:tResultCode" use="required"/>
|
||
<xs:attribute name="desc" type="xs:string" use="required"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tMessageDigest">
|
||
<xs:element name="eventCreateReq" type="ds:EventCreateReq"/>
|
||
<xs:complexType name="EventCreateReq">
|
||
<xs:sequence>
|
||
<xs:element name="digest" type="xds:tMessageDigestHexString"/>
|
||
<xs:element name="dsEvent" type="ds:DSEvent"/>
|
||
</xs:sequence>
|
||
<xs:attribute name="alg" type="xds:tMessageDigestAlgorithm" use="required"/>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType abstract="true" name="tAbstractEvent">
|
||
<xs:element name="eventCreateResp" type="ds:EventCreateResp"/>
|
||
<xs:complexType name="EventCreateResp">
|
||
<xs:sequence>
|
||
<xs:element minOccurs="0" name="extension" type="xds:tExtension"/>
|
||
<xs:element minOccurs="0" name="priority" type="xds:tEventPriority"/>
|
||
<xs:element minOccurs="0" name="ttl" type="xds:tEventTTL"/>
|
||
<xs:element name="value" type="ds:createResponseType"/>
|
||
<xs:element name="message" type="xs:string" />
|
||
</xs:sequence>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tVoidEvent">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractEvent">
|
||
<xs:sequence>
|
||
<xs:element name="eventID" type="xds:tEventID"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tObjectEvent">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractEvent">
|
||
<xs:sequence>
|
||
<xs:element name="objectID" type="xds:tObjectID"/>
|
||
<xs:element name="lifeCycleStepID" type="xds:tLifeCycleStepID"/>
|
||
<xs:element name="eventClass" type="xds:tEventClass"/>
|
||
<xs:element name="sourceTS" type="xs:dateTime"/>
|
||
<xs:element minOccurs="0" name="serviceList" type="xds:tServiceIDList"/>
|
||
<xs:element minOccurs="0" name="messageDigest" type="xds:tMessageDigest"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tEventTypeChoice">
|
||
<xs:choice>
|
||
<xs:element name="voidEvent" type="xds:tVoidEvent"/>
|
||
<xs:element name="objectEvent" type="xds:tObjectEvent"/>
|
||
</xs:choice>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tObjectEventList">
|
||
<xs:element name="multipleEventCreateReq" type="ds:MultipleEventCreateReq"/>
|
||
<xs:complexType name="MultipleEventCreateReq">
|
||
<xs:sequence>
|
||
<xs:element maxOccurs="unbounded" minOccurs="0" name="objectEvent" type="xds:tObjectEvent"/>
|
||
<xs:element name="dsEvent" type="ds:DSEvent" minOccurs="0" maxOccurs="unbounded" />
|
||
</xs:sequence>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tEventIDList">
|
||
<xs:element name="multipleEventCreateResp" type="ds:MultipleEventCreateResp"/>
|
||
<xs:complexType name="MultipleEventCreateResp">
|
||
<xs:sequence>
|
||
<xs:element maxOccurs="unbounded" minOccurs="0" name="eventID" type="xds:tEventID"/>
|
||
<xs:element name="result" type="ds:createResponseType"/>
|
||
<xs:element name="eventCreateResponses" type="ds:EventCreateResp" minOccurs="0" maxOccurs="unbounded" />
|
||
</xs:sequence>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tInfoEvent">
|
||
<xs:element name="eventLookupReq" type="ds:EventLookupReq"/>
|
||
<xs:complexType name="EventLookupReq">
|
||
<xs:sequence>
|
||
<xs:element name="eventID" type="xds:tEventID"/>
|
||
<xs:element name="objectID" type="xds:tObjectID"/>
|
||
<xs:element name="eventType" type="xds:tEventType"/>
|
||
<xs:element name="eventClass" type="xds:tEventClass"/>
|
||
<xs:element name="lifeCycleStepID" type="xds:tLifeCycleStepID"/>
|
||
<xs:element name="eventTS" type="xs:dateTime"/>
|
||
<xs:element name="sourceTS" type="xs:dateTime"/>
|
||
<xs:element name="partnerID" type="xds:tPartnerID"/>
|
||
<xs:element name="supplyChainID" type="xds:tSupplyChainID"/>
|
||
<xs:element name="userID" type="xds:tUserID"/>
|
||
<xs:element minOccurs="0" name="serviceList" type="xds:tServiceItemList"/>
|
||
<xs:element minOccurs="0" name="messageDigest" type="xds:tMessageDigest"/>
|
||
<xs:element minOccurs="0" name="priority" type="xds:tEventPriority"/>
|
||
<xs:element minOccurs="0" name="ttl" type="xds:tEventTTL"/>
|
||
<xs:element name="epc" type="xs:token"/>
|
||
<xs:element name="eventType" type="xs:token" minOccurs="0" />
|
||
<xs:element name="bizStep" type="xs:token" minOccurs="0" />
|
||
<xs:element name="startingAt" type="xs:dateTime" minOccurs="0" />
|
||
<xs:element name="endingAt" type="xs:dateTime" minOccurs="0" />
|
||
<xs:element name="serviceType" type="xs:token" minOccurs="0" />
|
||
</xs:sequence>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType abstract="true" name="tAbstractIn">
|
||
<xs:element name="eventLookupResp" type="ds:EventLookupResp"/>
|
||
<xs:complexType name="EventLookupResp">
|
||
<xs:sequence>
|
||
<xs:element name="sid" type="xds:tSessionID"/>
|
||
<xs:element minOccurs="0" name="extension" type="xds:tExtension"/>
|
||
<xs:element name="dsEventList" type="ds:DSEvent" minOccurs="0" maxOccurs="unbounded" />
|
||
</xs:sequence>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType abstract="true" name="tAbstractOut">
|
||
<xs:complexType name="DSException">
|
||
<xs:sequence>
|
||
<xs:element name="result" type="xds:tResult"/>
|
||
<xs:element minOccurs="0" name="extension" type="xds:tExtension"/>
|
||
<xs:element name="reason" type="xs:string"/>
|
||
</xs:sequence>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="HelloIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence/>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="HelloOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence>
|
||
<xs:element name="serverIdentity" type="xs:token"/>
|
||
<xs:element name="serverTS" type="xs:dateTime"/>
|
||
<xs:element minOccurs="0" name="extensionList" type="xds:tExtensionItemList"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="LookupIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="tableID" type="xds:tTableID"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="LookupOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence>
|
||
<xs:element name="rowList" type="xds:tTableRowItemList"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="RoleLookupIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="roleID" type="xds:tRoleID"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="RoleLookupOut">
|
||
<xs:element name="ImplementationException" type="ds:ImplementationException"/>
|
||
<xs:complexType name="ImplementationException">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence>
|
||
<xs:element name="roleList" type="xds:tRoleItemList"/>
|
||
</xs:sequence>
|
||
<xs:extension base="ds:DSException">
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="RoleCreateIn">
|
||
<xs:element name="InternalException" type="ds:InternalException"/>
|
||
<xs:complexType name="InternalException">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="roleID" type="xds:tRoleID"/>
|
||
<xs:element minOccurs="0" name="grantList" type="xds:tGrantItemList"/>
|
||
</xs:sequence>
|
||
<xs:extension base="ds:DSException">
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="RoleCreateOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence>
|
||
<xs:element name="roleUID" type="xds:tSmallUID"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="RoleInfoIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="roleID" type="xds:tRoleID"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="RoleInfoOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence>
|
||
<xs:element name="roleUID" type="xds:tSmallUID"/>
|
||
<xs:element name="roleID" type="xds:tRoleID"/>
|
||
<xs:element minOccurs="0" name="grantList" type="xds:tGrantItemList"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="RoleUpdateIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="roleUID" type="xds:tSmallUID"/>
|
||
<xs:element minOccurs="0" name="roleID" type="xds:tRoleID"/>
|
||
<xs:element minOccurs="0" name="grantList" type="xds:tGrantItemList"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="RoleUpdateOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence/>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="RoleDeleteIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="roleID" type="xds:tRoleID"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="RoleDeleteOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence/>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="UserLookupIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="userID" type="xds:tUserID"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="UserLookupOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence>
|
||
<xs:element name="userList" type="xds:tUserItemList"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="UserCreateIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="userID" type="xds:tUserID"/>
|
||
<xs:element name="password" type="xds:tPassword"/>
|
||
<xs:element name="roleID" type="xds:tRoleID"/>
|
||
<xs:element name="partnerID" type="xds:tPartnerID"/>
|
||
<xs:element name="loginMode" type="xds:tLoginMode"/>
|
||
<xs:element name="sessionLease" type="xds:tLeaseSeconds"/>
|
||
<xs:element minOccurs="0" name="authorizedCertList" type="xds:tX509CertItemList"/>
|
||
<xs:element minOccurs="0" name="eventNotifyTopicList" type="xds:tEventTopicItemList"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="UserCreateOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence>
|
||
<xs:element name="userUID" type="xds:tSmallUID"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="UserInfoIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="userID" type="xds:tUserID"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="UserInfoOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence>
|
||
<xs:element name="userUID" type="xds:tSmallUID"/>
|
||
<xs:element name="userID" type="xds:tUserID"/>
|
||
<xs:element name="roleID" type="xds:tRoleID"/>
|
||
<xs:element name="partnerID" type="xds:tPartnerID"/>
|
||
<xs:element name="loginMode" type="xds:tLoginMode"/>
|
||
<xs:element name="sessionLease" type="xds:tLeaseSeconds"/>
|
||
<xs:element minOccurs="0" name="authorizedCertList" type="xds:tX509CertItemList"/>
|
||
<xs:element minOccurs="0" name="eventNotifyTopicList" type="xds:tEventTopicItemList"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="UserUpdateIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="userUID" type="xds:tSmallUID"/>
|
||
<xs:element minOccurs="0" name="userID" type="xds:tUserID"/>
|
||
<xs:element minOccurs="0" name="password" type="xds:tPassword"/>
|
||
<xs:element minOccurs="0" name="roleID" type="xds:tRoleID"/>
|
||
<xs:element minOccurs="0" name="partnerID" type="xds:tPartnerID"/>
|
||
<xs:element minOccurs="0" name="loginMode" type="xds:tLoginMode"/>
|
||
<xs:element minOccurs="0" name="sessionLease" type="xds:tLeaseSeconds"/>
|
||
<xs:element minOccurs="0" name="authorizedCertList" type="xds:tX509CertItemList"/>
|
||
<xs:element minOccurs="0" name="eventNotifyTopicList" type="xds:tEventTopicItemList"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="UserUpdateOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence/>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="UserDeleteIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="userID" type="xds:tUserID"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="UserDeleteOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence/>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="UserLoginIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="userID" type="xds:tUserID"/>
|
||
<xs:element name="password" type="xds:tPassword"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="UserLoginOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence>
|
||
<xs:element name="sid" type="xds:tSessionID"/>
|
||
<xs:element name="sessionLease" type="xds:tLeaseSeconds"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="UserLogoutIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence/>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="UserLogoutOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence/>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="PartnerLookupIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="partnerID" type="xds:tPartnerID"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="PartnerLookupOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence>
|
||
<xs:element name="partnerList" type="xds:tPartnerItemList"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="PartnerCreateIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="partnerID" type="xds:tPartnerID"/>
|
||
<xs:element minOccurs="0" name="serviceList" type="xds:tServiceItemList"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="PartnerCreateOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence>
|
||
<xs:element name="partnerUID" type="xds:tSmallUID"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="PartnerInfoIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="partnerID" type="xds:tPartnerID"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="PartnerInfoOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence>
|
||
<xs:element name="partnerUID" type="xds:tSmallUID"/>
|
||
<xs:element name="partnerID" type="xds:tPartnerID"/>
|
||
<xs:element name="supplyChainList" type="xds:tSupplyChainItemList"/>
|
||
<xs:element name="serviceList" type="xds:tServiceItemList"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="PartnerUpdateIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="partnerUID" type="xds:tSmallUID"/>
|
||
<xs:element minOccurs="0" name="partnerID" type="xds:tPartnerID"/>
|
||
<xs:element minOccurs="0" name="serviceList" type="xds:tServiceItemList"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="PartnerUpdateOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence/>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="PartnerDeleteIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="partnerID" type="xds:tPartnerID"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="PartnerDeleteOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence/>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="SupplyChainLookupIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="supplyChainID" type="xds:tSupplyChainID"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="SupplyChainLookupOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence>
|
||
<xs:element name="supplyChainList" type="xds:tSupplyChainItemList"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="SupplyChainCreateIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="supplyChainID" type="xds:tSupplyChainID"/>
|
||
<xs:element minOccurs="0" name="partnerList" type="xds:tPartnerItemList"/>
|
||
<xs:element minOccurs="0" name="eventDenyList" type="xds:tEventDenyItemList"/>
|
||
<xs:element minOccurs="0" name="lifeCycleAllowList" type="xds:tEventLifeCycleStepAllowItemList"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="SupplyChainCreateOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence>
|
||
<xs:element name="supplyChainUID" type="xds:tSmallUID"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="SupplyChainInfoIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="supplyChainID" type="xds:tSupplyChainID"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="SupplyChainInfoOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence>
|
||
<xs:element name="supplyChainUID" type="xds:tSmallUID"/>
|
||
<xs:element name="supplyChainID" type="xds:tSupplyChainID"/>
|
||
<xs:element minOccurs="0" name="partnerList" type="xds:tPartnerItemList"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="SupplyChainUpdateIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="supplyChainUID" type="xds:tSmallUID"/>
|
||
<xs:element minOccurs="0" name="supplyChainID" type="xds:tSupplyChainID"/>
|
||
<xs:element minOccurs="0" name="partnerList" type="xds:tPartnerItemList"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="SupplyChainUpdateOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence/>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="SupplyChainDeleteIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="supplyChainID" type="xds:tSupplyChainID"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="SupplyChainDeleteOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence/>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="EventLookupIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="objectID" type="xds:tObjectID"/>
|
||
<xs:element minOccurs="0" name="lifeCycleStepID" type="xds:tLifeCycleStepID"/>
|
||
<xs:element minOccurs="0" name="startingAt" type="xs:dateTime"/>
|
||
<xs:element minOccurs="0" name="endingAt" type="xs:dateTime"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="EventLookupOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence>
|
||
<xs:element name="eventList" type="xds:tEventItemList"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="EventCreateIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="event" type="xds:tEventTypeChoice"/>
|
||
<xs:element name="supplyChainID" type="xds:tSupplyChainID"/>
|
||
<xs:element minOccurs="0" name="proxyPartnerID" type="xds:tPartnerID"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="EventCreateOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence>
|
||
<xs:element name="eventID" type="xds:tEventID"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="MultipleEventCreateIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="events" type="xds:tObjectEventList"/>
|
||
<xs:element name="supplyChainID" type="xds:tSupplyChainID"/>
|
||
<xs:element minOccurs="0" name="proxyPartnerID" type="xds:tPartnerID"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="MultipleEventCreateOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence>
|
||
<xs:element name="eventIDList" type="xds:tEventIDList"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="EventInfoIn">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractIn">
|
||
<xs:sequence>
|
||
<xs:element name="eventID" type="xds:tEventID"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="EventInfoOut">
|
||
<xs:complexContent>
|
||
<xs:extension base="xds:tAbstractOut">
|
||
<xs:sequence>
|
||
<xs:element name="event" type="xds:tInfoEvent"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:element name="Hello" type="xds:HelloIn"/>
|
||
|
||
<xs:element name="HelloResult" type="xds:HelloOut"/>
|
||
|
||
<xs:element name="Lookup" type="xds:LookupIn"/>
|
||
|
||
<xs:element name="LookupResult" type="xds:LookupOut"/>
|
||
|
||
<xs:element name="RoleLookup" type="xds:RoleLookupIn"/>
|
||
|
||
<xs:element name="RoleLookupResult" type="xds:RoleLookupOut"/>
|
||
|
||
<xs:element name="RoleCreate" type="xds:RoleCreateIn"/>
|
||
|
||
<xs:element name="RoleCreateResult" type="xds:RoleCreateOut"/>
|
||
|
||
<xs:element name="RoleInfo" type="xds:RoleInfoIn"/>
|
||
|
||
<xs:element name="RoleInfoResult" type="xds:RoleInfoOut"/>
|
||
|
||
<xs:element name="RoleUpdate" type="xds:RoleUpdateIn"/>
|
||
|
||
<xs:element name="RoleUpdateResult" type="xds:RoleUpdateOut"/>
|
||
|
||
<xs:element name="RoleDelete" type="xds:RoleDeleteIn"/>
|
||
|
||
<xs:element name="RoleDeleteResult" type="xds:RoleDeleteOut"/>
|
||
|
||
<xs:element name="UserLookup" type="xds:UserLookupIn"/>
|
||
|
||
<xs:element name="UserLookupResult" type="xds:UserLookupOut"/>
|
||
|
||
<xs:element name="UserCreate" type="xds:UserCreateIn"/>
|
||
|
||
<xs:element name="UserCreateResult" type="xds:UserCreateOut"/>
|
||
|
||
<xs:element name="UserInfo" type="xds:UserInfoIn"/>
|
||
|
||
<xs:element name="UserInfoResult" type="xds:UserInfoOut"/>
|
||
|
||
<xs:element name="UserUpdate" type="xds:UserUpdateIn"/>
|
||
|
||
<xs:element name="UserUpdateResult" type="xds:UserUpdateOut"/>
|
||
|
||
<xs:element name="UserDelete" type="xds:UserDeleteIn"/>
|
||
|
||
<xs:element name="UserDeleteResult" type="xds:UserDeleteOut"/>
|
||
|
||
<xs:element name="UserLogin" type="xds:UserLoginIn"/>
|
||
|
||
<xs:element name="UserLoginResult" type="xds:UserLoginOut"/>
|
||
|
||
<xs:element name="UserLogout" type="xds:UserLogoutIn"/>
|
||
|
||
<xs:element name="UserLogoutResult" type="xds:UserLogoutOut"/>
|
||
|
||
<xs:element name="PartnerLookup" type="xds:PartnerLookupIn"/>
|
||
|
||
<xs:element name="PartnerLookupResult" type="xds:PartnerLookupOut"/>
|
||
|
||
<xs:element name="PartnerCreate" type="xds:PartnerCreateIn"/>
|
||
|
||
<xs:element name="PartnerCreateResult" type="xds:PartnerCreateOut"/>
|
||
|
||
<xs:element name="PartnerInfo" type="xds:PartnerInfoIn"/>
|
||
|
||
<xs:element name="PartnerInfoResult" type="xds:PartnerInfoOut"/>
|
||
|
||
<xs:element name="PartnerUpdate" type="xds:PartnerUpdateIn"/>
|
||
|
||
<xs:element name="PartnerUpdateResult" type="xds:PartnerUpdateOut"/>
|
||
|
||
<xs:element name="PartnerDelete" type="xds:PartnerDeleteIn"/>
|
||
|
||
<xs:element name="PartnerDeleteResult" type="xds:PartnerDeleteOut"/>
|
||
|
||
<xs:element name="SupplyChainLookup" type="xds:SupplyChainLookupIn"/>
|
||
|
||
<xs:element name="SupplyChainLookupResult" type="xds:SupplyChainLookupOut"/>
|
||
|
||
<xs:element name="SupplyChainCreate" type="xds:SupplyChainCreateIn"/>
|
||
|
||
<xs:element name="SupplyChainCreateResult" type="xds:SupplyChainCreateOut"/>
|
||
|
||
<xs:element name="SupplyChainInfo" type="xds:SupplyChainInfoIn"/>
|
||
|
||
<xs:element name="SupplyChainInfoResult" type="xds:SupplyChainInfoOut"/>
|
||
|
||
<xs:element name="SupplyChainUpdate" type="xds:SupplyChainUpdateIn"/>
|
||
|
||
<xs:element name="SupplyChainUpdateResult" type="xds:SupplyChainUpdateOut"/>
|
||
|
||
<xs:element name="SupplyChainDelete" type="xds:SupplyChainDeleteIn"/>
|
||
|
||
<xs:element name="SupplyChainDeleteResult" type="xds:SupplyChainDeleteOut"/>
|
||
|
||
<xs:element name="EventLookup" type="xds:EventLookupIn"/>
|
||
|
||
<xs:element name="EventLookupResult" type="xds:EventLookupOut"/>
|
||
|
||
<xs:element name="EventCreate" type="xds:EventCreateIn"/>
|
||
|
||
<xs:element name="EventCreateResult" type="xds:EventCreateOut"/>
|
||
|
||
<xs:element name="MultipleEventCreate" type="xds:MultipleEventCreateIn"/>
|
||
|
||
<xs:element name="MultipleEventCreateResult" type="xds:MultipleEventCreateOut"/>
|
||
|
||
<xs:element name="EventInfo" type="xds:EventInfoIn"/>
|
||
|
||
<xs:element name="EventInfoResult" type="xds:EventInfoOut"/>
|
||
|
||
<xs:element name="ESDSDocument" type="xds:tESDSDocument"/>
|
||
|
||
<xs:complexType name="tESDSDocument">
|
||
<xs:sequence>
|
||
<xs:element name="ESDSBody" type="xds:tESDSBody"/>
|
||
</xs:sequence>
|
||
</xs:complexType>
|
||
|
||
<xs:complexType name="tESDSBody">
|
||
<xs:choice>
|
||
<xs:element ref="xds:Hello"/>
|
||
<xs:element ref="xds:HelloResult"/>
|
||
<xs:element ref="xds:Lookup"/>
|
||
<xs:element ref="xds:LookupResult"/>
|
||
<xs:element ref="xds:RoleLookup"/>
|
||
<xs:element ref="xds:RoleLookupResult"/>
|
||
<xs:element ref="xds:RoleCreate"/>
|
||
<xs:element ref="xds:RoleCreateResult"/>
|
||
<xs:element ref="xds:RoleInfo"/>
|
||
<xs:element ref="xds:RoleInfoResult"/>
|
||
<xs:element ref="xds:RoleUpdate"/>
|
||
<xs:element ref="xds:RoleUpdateResult"/>
|
||
<xs:element ref="xds:RoleDelete"/>
|
||
<xs:element ref="xds:RoleDeleteResult"/>
|
||
<xs:element ref="xds:UserLookup"/>
|
||
<xs:element ref="xds:UserLookupResult"/>
|
||
<xs:element ref="xds:UserCreate"/>
|
||
<xs:element ref="xds:UserCreateResult"/>
|
||
<xs:element ref="xds:UserInfo"/>
|
||
<xs:element ref="xds:UserInfoResult"/>
|
||
<xs:element ref="xds:UserUpdate"/>
|
||
<xs:element ref="xds:UserUpdateResult"/>
|
||
<xs:element ref="xds:UserDelete"/>
|
||
<xs:element ref="xds:UserDeleteResult"/>
|
||
<xs:element ref="xds:UserLogin"/>
|
||
<xs:element ref="xds:UserLoginResult"/>
|
||
<xs:element ref="xds:UserLogout"/>
|
||
<xs:element ref="xds:UserLogoutResult"/>
|
||
<xs:element ref="xds:PartnerLookup"/>
|
||
<xs:element ref="xds:PartnerLookupResult"/>
|
||
<xs:element ref="xds:PartnerCreate"/>
|
||
<xs:element ref="xds:PartnerCreateResult"/>
|
||
<xs:element ref="xds:PartnerInfo"/>
|
||
<xs:element ref="xds:PartnerInfoResult"/>
|
||
<xs:element ref="xds:PartnerUpdate"/>
|
||
<xs:element ref="xds:PartnerUpdateResult"/>
|
||
<xs:element ref="xds:PartnerDelete"/>
|
||
<xs:element ref="xds:PartnerDeleteResult"/>
|
||
<xs:element ref="xds:SupplyChainLookup"/>
|
||
<xs:element ref="xds:SupplyChainLookupResult"/>
|
||
<xs:element ref="xds:SupplyChainCreate"/>
|
||
<xs:element ref="xds:SupplyChainCreateResult"/>
|
||
<xs:element ref="xds:SupplyChainInfo"/>
|
||
<xs:element ref="xds:SupplyChainInfoResult"/>
|
||
<xs:element ref="xds:SupplyChainUpdate"/>
|
||
<xs:element ref="xds:SupplyChainUpdateResult"/>
|
||
<xs:element ref="xds:SupplyChainDelete"/>
|
||
<xs:element ref="xds:SupplyChainDeleteResult"/>
|
||
<xs:element ref="xds:EventLookup"/>
|
||
<xs:element ref="xds:EventLookupResult"/>
|
||
|
||
<xs:element ref="xds:EventCreate"/>
|
||
<xs:element ref="xds:EventCreateResult"/>
|
||
<xs:element ref="xds:MultipleEventCreate"/>
|
||
<xs:element ref="xds:MultipleEventCreateResult"/>
|
||
|
||
<xs:element ref="xds:EventInfo"/>
|
||
<xs:element ref="xds:EventInfoResult"/>
|
||
</xs:choice>
|
||
</xs:complexType>
|
||
|
||
</xs:schema>
|
DSeTa/DSeTa-Client/src/main/resources/wsdl/dseta.wsdl | ||
---|---|---|
<?xml version="1.0" encoding="UTF-8"?>
|
||
<wsdl:definitions targetNamespace="urn:unicaen:iota:dseta:wsdl"
|
||
xmlns:wsoap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||
xmlns:ds="urn:unicaen:iota:ds:xsd"
|
||
xmlns:dsw="urn:unicaen:iota:ds:wsdl"
|
||
xmlns:dseta="urn:unicaen:iota:dseta:xsd"
|
||
xmlns:dsetaw="urn:unicaen:iota:dseta:wsdl"
|
||
xmlns:tau="urn:unicaen:iota:tau:xsd">
|
||
|
||
<wsdl:import namespace="urn:unicaen:iota:ds:wsdl" location="ds.wsdl" />
|
||
|
||
<wsdl:types>
|
||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
|
||
<xs:import namespace="urn:unicaen:iota:tau:xsd" schemaLocation="tau.xsd"/>
|
||
</xs:schema>
|
||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
|
||
<xs:import namespace="urn:unicaen:iota:dseta:xsd" schemaLocation="dseta.xsd"/>
|
||
</xs:schema>
|
||
</wsdl:types>
|
||
|
||
<wsdl:message name="IDed_eventCreateRequest">
|
||
<wsdl:part name="eventCreateReq" element="dseta:eventCreateReq"/>
|
||
<wsdl:part name="identity" element="tau:identity"/>
|
||
</wsdl:message>
|
||
|
||
<wsdl:message name="IDed_multipleEventCreateRequest">
|
||
<wsdl:part name="multipleEventCreateReq" element="dseta:multipleEventCreateReq"/>
|
||
<wsdl:part name="identity" element="tau:identity"/>
|
||
</wsdl:message>
|
||
|
||
<wsdl:message name="IDed_eventLookupRequest">
|
||
<wsdl:part name="eventLookupReq" element="ds:eventLookupReq"/>
|
||
<wsdl:part name="identity" element="tau:identity"/>
|
||
</wsdl:message>
|
||
|
||
<wsdl:message name="SecurityExceptionResponse">
|
||
<wsdl:part name="fault" element="dseta:SecurityException"/>
|
||
</wsdl:message>
|
||
|
||
<wsdl:portType name="DSeTaServicePortType">
|
||
<wsdl:operation name="IDed_eventCreate">
|
||
<wsdl:input name="IDed_eventCreateRequest" message="dsetaw:IDed_eventCreateRequest"/>
|
||
<wsdl:output name="eventCreateResponse" message="dsw:eventCreateResponse"/>
|
||
<wsdl:fault name="ImplementationExceptionFault" message="dsw:ImplementationExceptionResponse"/>
|
||
<wsdl:fault name="InternalExceptionFault" message="dsw:InternalExceptionResponse"/>
|
||
<wsdl:fault name="SecurityExceptionFault" message="dsetaw:SecurityExceptionResponse"/>
|
||
</wsdl:operation>
|
||
<wsdl:operation name="IDed_multipleEventCreate">
|
||
<wsdl:input name="IDed_multipleEventCreateRequest" message="dsetaw:IDed_multipleEventCreateRequest"/>
|
||
<wsdl:output name="multipleEventCreateResponse" message="dsw:multipleEventCreateResponse"/>
|
||
<wsdl:fault name="ImplementationExceptionFault" message="dsw:ImplementationExceptionResponse"/>
|
||
<wsdl:fault name="InternalExceptionFault" message="dsw:InternalExceptionResponse"/>
|
||
<wsdl:fault name="SecurityExceptionFault" message="dsetaw:SecurityExceptionResponse"/>
|
||
</wsdl:operation>
|
||
<wsdl:operation name="IDed_eventLookup">
|
||
<wsdl:input name="IDed_eventLookupRequest" message="dsetaw:IDed_eventLookupRequest"/>
|
||
<wsdl:output name="eventLookupResponse" message="dsw:eventLookupResponse"/>
|
||
<wsdl:fault name="ImplementationExceptionFault" message="dsw:ImplementationExceptionResponse"/>
|
||
<wsdl:fault name="InternalExceptionFault" message="dsw:InternalExceptionResponse"/>
|
||
<wsdl:fault name="SecurityExceptionFault" message="dsetaw:SecurityExceptionResponse"/>
|
||
</wsdl:operation>
|
||
</wsdl:portType>
|
||
|
||
<wsdl:binding name="DSeTaBinding" type="dsetaw:DSeTaServicePortType">
|
||
<wsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||
|
||
<wsdl:operation name="IDed_eventCreate">
|
||
<wsoap:operation/>
|
||
<wsdl:input>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:input>
|
||
<wsdl:output>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:output>
|
||
<wsdl:fault name="ImplementationExceptionFault">
|
||
<wsoap:fault name="ImplementationExceptionFault" use="literal"/>
|
||
</wsdl:fault>
|
||
<wsdl:fault name="InternalExceptionFault">
|
||
<wsoap:fault name="InternalExceptionFault" use="literal"/>
|
||
</wsdl:fault>
|
||
<wsdl:fault name="SecurityExceptionFault">
|
||
<wsoap:fault name="SecurityExceptionFault" use="literal"/>
|
||
</wsdl:fault>
|
||
</wsdl:operation>
|
||
|
||
<wsdl:operation name="IDed_multipleEventCreate">
|
||
<wsoap:operation/>
|
||
<wsdl:input>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:input>
|
||
<wsdl:output>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:output>
|
||
<wsdl:fault name="ImplementationExceptionFault">
|
||
<wsoap:fault name="ImplementationExceptionFault" use="literal"/>
|
||
</wsdl:fault>
|
||
<wsdl:fault name="InternalExceptionFault">
|
||
<wsoap:fault name="InternalExceptionFault" use="literal"/>
|
||
</wsdl:fault>
|
||
<wsdl:fault name="SecurityExceptionFault">
|
||
<wsoap:fault name="SecurityExceptionFault" use="literal"/>
|
||
</wsdl:fault>
|
||
</wsdl:operation>
|
||
|
||
<wsdl:operation name="IDed_eventLookup">
|
||
<wsoap:operation/>
|
||
<wsdl:input>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:input>
|
||
<wsdl:output>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:output>
|
||
<wsdl:fault name="ImplementationExceptionFault">
|
||
<wsoap:fault name="ImplementationExceptionFault" use="literal"/>
|
||
</wsdl:fault>
|
||
<wsdl:fault name="InternalExceptionFault">
|
||
<wsoap:fault name="InternalExceptionFault" use="literal"/>
|
||
</wsdl:fault>
|
||
<wsdl:fault name="SecurityExceptionFault">
|
||
<wsoap:fault name="SecurityExceptionFault" use="literal"/>
|
||
</wsdl:fault>
|
||
</wsdl:operation>
|
||
|
||
</wsdl:binding>
|
||
|
||
<wsdl:service name="DSeTaService">
|
||
<wsdl:port name="DSeTaServicePort" binding="dsetaw:DSeTaBinding">
|
||
</wsdl:port>
|
||
</wsdl:service>
|
||
|
||
</wsdl:definitions>
|
DSeTa/DSeTa-Client/src/main/resources/wsdl/dseta.xsd | ||
---|---|---|
<?xml version="1.0" encoding="UTF-8"?>
|
||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||
targetNamespace="urn:unicaen:iota:dseta:xsd"
|
||
xmlns:dseta="urn:unicaen:iota:dseta:xsd"
|
||
xmlns:ds="urn:unicaen:iota:ds:xsd"
|
||
xmlns:tau="urn:unicaen:iota:tau:xsd"
|
||
elementFormDefault="unqualified" attributeFormDefault="unqualified">
|
||
|
||
<xs:import namespace="urn:unicaen:iota:ds:xsd" schemaLocation="ds.xsd"/>
|
||
|
||
<xs:import namespace="urn:unicaen:iota:tau:xsd" schemaLocation="tau.xsd"/>
|
||
|
||
<xs:element name="SecurityException" type="dseta:SecurityException"/>
|
||
<xs:complexType name="SecurityException">
|
||
<xs:complexContent>
|
||
<xs:extension base="ds:DSException">
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:element name="eventCreateReq" type="dseta:EventCreateReq"/>
|
||
<xs:complexType name="EventCreateReq">
|
||
<xs:complexContent>
|
||
<xs:extension base="ds:EventCreateReq">
|
||
<xs:sequence>
|
||
<xs:element name="owner" type="tau:Identity"/>
|
||
</xs:sequence>
|
||
</xs:extension>
|
||
</xs:complexContent>
|
||
</xs:complexType>
|
||
|
||
<xs:element name="multipleEventCreateReq" type="dseta:MultipleEventCreateReq"/>
|
||
<xs:complexType name="MultipleEventCreateReq">
|
||
<xs:sequence>
|
||
<xs:element name="eventCreate" type="dseta:EventCreateReq" minOccurs="0" maxOccurs="unbounded" />
|
||
</xs:sequence>
|
||
</xs:complexType>
|
||
|
||
</xs:schema>
|
DSeTa/DSeTa-Client/src/main/resources/wsdl/tau-ds.wsdl | ||
---|---|---|
<?xml version="1.0" encoding="UTF-8"?>
|
||
<wsdl:definitions targetNamespace="urn:unicaen:iota:dseta:wsdl"
|
||
xmlns:wsoap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||
xmlns:impl="urn:unicaen:iota:ds:wsdl"
|
||
xmlns:xds="urn:unicaen:iota:ds:xsd"
|
||
xmlns:wds="urn:unicaen:iota:dseta:wsdl"
|
||
xmlns:tau="urn:unicaen:iota:tau:xsd">
|
||
|
||
<wsdl:import namespace="urn:unicaen:iota:ds:wsdl" location="ds.wsdl" />
|
||
|
||
<wsdl:types>
|
||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
|
||
<xs:import namespace="urn:unicaen:iota:tau:xsd" schemaLocation="tau.xsd"/>
|
||
</xs:schema>
|
||
</wsdl:types>
|
||
|
||
<wsdl:message name="IDed_multipleEventCreateReq">
|
||
<wsdl:part name="parms" element="xds:MultipleEventCreate"/>
|
||
<wsdl:part name="id" element="tau:identity"/>
|
||
</wsdl:message>
|
||
|
||
<wsdl:message name="IDed_eventLookupReq">
|
||
<wsdl:part name="parms" element="xds:EventLookup"/>
|
||
<wsdl:part name="id" element="tau:identity"/>
|
||
</wsdl:message>
|
||
|
||
<wsdl:message name="IDed_eventCreateReq">
|
||
<wsdl:part name="parms" element="xds:EventCreate"/>
|
||
<wsdl:part name="id" element="tau:identity"/>
|
||
</wsdl:message>
|
||
|
||
<wsdl:portType name="IDed_DSServicePortType">
|
||
|
||
<wsdl:operation name="IDed_eventLookup">
|
||
<wsdl:input name="IDed_eventLookupReq" message="wds:IDed_eventLookupReq"/>
|
||
<wsdl:output name="eventLookupRsp" message="impl:eventLookupRsp"/>
|
||
</wsdl:operation>
|
||
|
||
<wsdl:operation name="IDed_multipleEventCreate">
|
||
<wsdl:input name="IDed_multipleEventCreateReq" message="wds:IDed_multipleEventCreateReq"/>
|
||
<wsdl:output name="multipleEventCreateRsp" message="impl:multipleEventCreateRsp"/>
|
||
</wsdl:operation>
|
||
|
||
<wsdl:operation name="IDed_eventCreate">
|
||
<wsdl:input name="IDed_eventCreateReq" message="wds:IDed_eventCreateReq"/>
|
||
<wsdl:output name="eventCreateRsp" message="impl:eventCreateRsp"/>
|
||
</wsdl:operation>
|
||
|
||
</wsdl:portType>
|
||
|
||
<wsdl:binding name="IDed_DS" type="wds:IDed_DSServicePortType">
|
||
<wsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||
<wsdl:operation name="IDed_eventLookup">
|
||
<wsoap:operation/>
|
||
<wsdl:input>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:input>
|
||
<wsdl:output>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:output>
|
||
</wsdl:operation>
|
||
|
||
<wsdl:operation name="IDed_eventCreate">
|
||
<wsoap:operation/>
|
||
<wsdl:input>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:input>
|
||
<wsdl:output>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:output>
|
||
</wsdl:operation>
|
||
|
||
<wsdl:operation name="IDed_multipleEventCreate">
|
||
<wsoap:operation/>
|
||
<wsdl:input>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:input>
|
||
<wsdl:output>
|
||
<wsoap:body use="literal"/>
|
||
</wsdl:output>
|
||
</wsdl:operation>
|
||
|
||
</wsdl:binding>
|
||
|
||
<wsdl:service name="IDed_DS_Service">
|
||
<wsdl:port name="IDed_DS_ServicePort" binding="wds:IDed_DS">
|
||
</wsdl:port>
|
||
</wsdl:service>
|
||
|
||
</wsdl:definitions>
|
DSeTa/DSeTa/LISEZMOI | ||
---|---|---|
DSeTa - Discovery SErvices Trusted Agent
|
||
|
||
Version bouchon.
|
||
Service sécurisé de Découverte d'évènements EPCIS.
|
||
|
||
Dépendances:
|
||
modules IoTa:
|
||
- DSeTa-Client
|
||
- IoTa-DiscoveryWS-Client
|
||
- DS-Commons
|
||
- DS-Xi-Client
|
||
- TAu
|
||
- Mu
|
||
bibliothèques:
|
||
- Apache cxf
|
||
- spring
|
||
- servlet-api
|
||
- commons-logging
|
||
- log4j
|
||
|
||
Installation and Configuration:
|
||
Installation et Configuration:
|
||
IoTa-Installer installe et configure DSeTa.
|
||
(application.properties pour cette application,
|
||
commons-logging.properties et log4j.properties pour les journaux)
|
||
Modifier le fichier tomcat-users.xml de Tomcat pour la gestion des
|
||
identités en TLS. Voir le fichier INSTALL.fr
|
||
|
||
Dépendances d’utilisation:
|
||
- un DS
|
||
|
||
Utilisation:
|
||
.
|
||
- un EPCIS
|
||
- un ETa
|
DSeTa/DSeTa/README | ||
---|---|---|
DSeTa - Discovery SErvices Trusted Agent
|
||
|
||
Mock version.
|
||
Secured Discovery Service for EPCIS events.
|
||
|
||
Dependencies:
|
||
IoTa modules:
|
||
- DSeTa-Client
|
||
- IoTa-DiscoveryWS-Client
|
||
- DS-Commons
|
||
- DS-Xi-Client
|
||
- TAu
|
||
- Mu
|
||
libraries:
|
||
- Apache cxf
|
||
- spring
|
||
- servlet-api
|
||
- commons-logging
|
||
- log4j
|
||
|
||
Installation and Configuration:
|
||
IoTa-Installer installs and configures DSeTa.
|
||
(application.properties for this application,
|
||
commons-logging.properties and log4j.properties for the logs)
|
||
Modify the tomcat-users.xml file of Tomcat to manage identity
|
||
with TLS. See the INSTALL file.
|
||
|
||
Usage Dependencies:
|
||
- a DS
|
||
|
||
Usage:
|
||
.
|
||
- an EPCIS
|
||
- an ETa
|
DSeTa/DSeTa/dseta_schema.sql | ||
---|---|---|
--
|
||
-- Table structure for table `event`
|
||
--
|
||
|
||
SET character_set_client = utf8;
|
||
CREATE TABLE `events` (
|
||
`id` bigint(20) NOT NULL auto_increment,
|
||
`epc` varchar(128) NOT NULL,
|
||
`eventType` varchar(16) NOT NULL,
|
||
`bizStep` varchar(128) NOT NULL,
|
||
`eventTime` timestamp NOT NULL,
|
||
`serviceType` varchar(32) NOT NULL,
|
||
`serviceAddress` varchar(128) NOT NULL,
|
||
`owner` varchar(128) NOT NULL,
|
||
PRIMARY KEY (`id`),
|
||
INDEX (`epc`)
|
||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
DSeTa/DSeTa/pom.xml | ||
---|---|---|
<modelVersion>4.0.0</modelVersion>
|
||
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>dseta-server</artifactId>
|
||
<version>1.99</version>
|
||
<artifactId>dseta</artifactId>
|
||
<version>2.0</version>
|
||
<packaging>war</packaging>
|
||
<name>DSeTa Server</name>
|
||
|
||
<name>DSeTa</name>
|
||
|
||
<properties>
|
||
<lib-spring-version>2.5.6.SEC03</lib-spring-version>
|
||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||
<axis2-version>1.5.6</axis2-version>
|
||
</properties>
|
||
|
||
<dependencies>
|
||
... | ... | |
|
||
<dependency>
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>discovery-client</artifactId>
|
||
<artifactId>ds-commons</artifactId>
|
||
<version>${project.version}</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>ds-xi-client</artifactId>
|
||
<version>${project.version}</version>
|
||
</dependency>
|
||
|
||
... | ... | |
<version>${project.version}</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>mu</artifactId>
|
||
<version>${project.version}</version>
|
||
</dependency>
|
||
|
||
<!-- Spring dependencies -->
|
||
<dependency>
|
||
<groupId>org.springframework</groupId>
|
||
<artifactId>spring-beans</artifactId>
|
||
<version>${lib-spring-version}</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>org.springframework</groupId>
|
||
<artifactId>spring-web</artifactId>
|
||
<version>${lib-spring-version}</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>org.springframework</groupId>
|
||
<artifactId>spring-orm</artifactId>
|
||
<version>${lib-spring-version}</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>org.springframework</groupId>
|
||
<artifactId>spring-jdbc</artifactId>
|
||
<version>${lib-spring-version}</version>
|
||
</dependency>
|
||
|
||
<!-- Other dependencies -->
|
||
<dependency>
|
||
<groupId>javax.servlet</groupId>
|
||
<artifactId>javax.servlet-api</artifactId>
|
||
<version>3.0.1</version>
|
||
<scope>provided</scope>
|
||
</dependency>
|
||
|
||
<!-- Log dependencies -->
|
||
<dependency>
|
||
<groupId>commons-logging</groupId>
|
||
... | ... | |
<version>1.2.16</version>
|
||
</dependency>
|
||
|
||
<!-- Log for ActiveMQ -->
|
||
<dependency>
|
||
<groupId>org.slf4j</groupId>
|
||
<artifactId>slf4j-log4j12</artifactId>
|
||
<version>1.6.6</version>
|
||
</dependency>
|
||
|
||
</dependencies>
|
||
|
||
<build>
|
||
|
||
<plugins>
|
||
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-compiler-plugin</artifactId>
|
DSeTa/DSeTa/src/main/java/fr/unicaen/iota/dseta/server/Constants.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2012 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.dseta.server;
|
||
|
||
import java.io.IOException;
|
||
import java.io.InputStream;
|
||
import java.util.Properties;
|
||
import org.apache.commons.logging.Log;
|
||
import org.apache.commons.logging.LogFactory;
|
||
|
||
public final class Constants {
|
||
|
||
private Constants() {
|
||
}
|
||
private static final Log log = LogFactory.getLog(Constants.class);
|
||
public static final String SERVICE_ID;
|
||
public static final String WINGS_URL;
|
||
public static final String WINGS_LOGIN;
|
||
public static final String WINGS_PASSWORD;
|
||
public static final String DEFAULT_SESSION = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
|
||
public static final String XACML_DEFAULT_USER;
|
||
|
||
static {
|
||
log.info("Publisher properties configuration");
|
||
Properties properties = new Properties();
|
||
InputStream is = Constants.class.getClassLoader().getResourceAsStream("application.properties");
|
||
try {
|
||
properties.load(is);
|
||
} catch (IOException ex) {
|
||
log.fatal(null, ex);
|
||
}
|
||
SERVICE_ID = properties.getProperty("service-id");
|
||
WINGS_LOGIN = properties.getProperty("wings-login", "anonymous");
|
||
WINGS_PASSWORD = properties.getProperty("wings-password", "anonymous");
|
||
WINGS_URL = properties.getProperty("wings-url");
|
||
XACML_DEFAULT_USER = properties.getProperty("xacml-default-user");
|
||
}
|
||
}
|
DSeTa/DSeTa/src/main/java/fr/unicaen/iota/dseta/server/DSeTaWebService.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2012 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.dseta.server;
|
||
|
||
import fr.unicaen.iota.discovery.client.DsClient;
|
||
import fr.unicaen.iota.discovery.client.model.Event;
|
||
import fr.unicaen.iota.discovery.client.model.EventInfo;
|
||
import fr.unicaen.iota.discovery.client.model.Service;
|
||
import fr.unicaen.iota.discovery.client.model.UserInfo;
|
||
import fr.unicaen.iota.discovery.client.util.EnhancedProtocolException;
|
||
import fr.unicaen.iota.ds.model.*;
|
||
import fr.unicaen.iota.dseta.soap.IDedDSServicePortType;
|
||
import fr.unicaen.iota.tau.model.Identity;
|
||
import java.math.BigInteger;
|
||
import java.rmi.RemoteException;
|
||
import java.util.*;
|
||
import javax.xml.datatype.DatatypeConfigurationException;
|
||
import javax.xml.datatype.DatatypeFactory;
|
||
import javax.xml.datatype.XMLGregorianCalendar;
|
||
import org.apache.axis2.databinding.types.URI.MalformedURIException;
|
||
import org.apache.commons.logging.Log;
|
||
import org.apache.commons.logging.LogFactory;
|
||
|
||
/**
|
||
*
|
||
*/
|
||
public class DSeTaWebService implements IDedDSServicePortType {
|
||
|
||
private static final Log log = LogFactory.getLog(DSeTaWebService.class);
|
||
private final DsClient dsClient;
|
||
private static DatatypeFactory DF;
|
||
protected final Identity anonymous;
|
||
|
||
static {
|
||
try {
|
||
DF = DatatypeFactory.newInstance();
|
||
} catch (DatatypeConfigurationException ex) {
|
||
DF = null;
|
||
log.fatal(null, ex);
|
||
}
|
||
}
|
||
|
||
public DSeTaWebService() {
|
||
anonymous = new Identity();
|
||
anonymous.setAsString(Constants.XACML_DEFAULT_USER);
|
||
dsClient = new DsClient(Constants.WINGS_URL);
|
||
}
|
||
|
||
private TEventType createEventType(String type) {
|
||
return TEventType.valueOf(type.toUpperCase());
|
||
}
|
||
|
||
private TServiceType createServiceType(String type) {
|
||
return TServiceType.valueOf(type.toUpperCase());
|
||
}
|
||
|
||
@Override
|
||
public EventLookupOut iDedEventLookup(EventLookupIn parms, Identity id) {
|
||
try {
|
||
String sessionId = dsClient.userLogin(Constants.DEFAULT_SESSION, Constants.WINGS_LOGIN, Constants.WINGS_PASSWORD).getSessionId();
|
||
EventLookupOut res = new EventLookupOut();
|
||
// tres not used but required
|
||
TResult tres = new TResult();
|
||
tres.setCode(1000);
|
||
tres.setDesc("command successfull");
|
||
tres.setValue("10000");
|
||
res.setResult(tres);
|
||
TEventItemList evtList = new TEventItemList();
|
||
res.setEventList(evtList);
|
||
List<TEventItem> events = evtList.getEvent();
|
||
GregorianCalendar start = parms.getStartingAt() == null ? null : parms.getStartingAt().toGregorianCalendar();
|
||
GregorianCalendar end = parms.getEndingAt() == null ? null : parms.getEndingAt().toGregorianCalendar();
|
||
List<Event> clientEvents = dsClient.eventLookup(sessionId, parms.getObjectID(), start, end, parms.getLifeCycleStepID());
|
||
for (Event evt : clientEvents) {
|
||
TEventItem tevt = new TEventItem();
|
||
events.add(tevt);
|
||
tevt.setC(evt.getEventClass());
|
||
tevt.setE(BigInteger.valueOf(evt.getEventId()));
|
||
GregorianCalendar gCal = new GregorianCalendar();
|
||
gCal.setTime(evt.getEventTimeStamp().getTime());
|
||
XMLGregorianCalendar xmlCal = DF.newXMLGregorianCalendar(gCal);
|
||
tevt.setEts(xmlCal);
|
||
gCal.setTime(evt.getSourceTimeStamp().getTime());
|
||
xmlCal = DF.newXMLGregorianCalendar(gCal);
|
||
tevt.setSts(xmlCal);
|
||
tevt.setLcs(evt.getBizStep());
|
||
tevt.setO(evt.getObjectId());
|
||
tevt.setP(evt.getPartnerId());
|
||
tevt.setT(createEventType(evt.getEventType()));
|
||
tevt.setSc("not_used");
|
||
tevt.setU(evt.getUserId());
|
||
TServiceItemList srvs = new TServiceItemList();
|
||
tevt.setServiceList(srvs);
|
||
List<TServiceItem> srvlst = srvs.getService();
|
||
for (Service srv : evt.getServiceList()) {
|
||
TServiceItem tsrv = new TServiceItem();
|
||
srvlst.add(tsrv);
|
||
tsrv.setId(srv.getId());
|
||
tsrv.setType(createServiceType(srv.getType()));
|
||
tsrv.setUri(srv.getUri().toString());
|
||
}
|
||
}
|
||
dsClient.userLogout(sessionId);
|
||
return res;
|
||
} catch (MalformedURIException ex) {
|
||
log.fatal(null, ex);
|
||
} catch (RemoteException ex) {
|
||
log.fatal(null, ex);
|
||
} catch (EnhancedProtocolException ex) {
|
||
log.fatal(null, ex);
|
||
}
|
||
return null;
|
||
}
|
||
|
||
@Override
|
||
public MultipleEventCreateOut iDedMultipleEventCreate(MultipleEventCreateIn parms, Identity id) {
|
||
try {
|
||
String sessionId = dsClient.userLogin(Constants.DEFAULT_SESSION, Constants.WINGS_LOGIN, Constants.WINGS_PASSWORD).getSessionId();
|
||
|
||
UserInfo uInfo = dsClient.userInfo(sessionId, Constants.WINGS_LOGIN);
|
||
String userId = uInfo.getUserId();
|
||
String partnerId = uInfo.getPartnerId();
|
||
|
||
List<EventInfo> eventList = new LinkedList<EventInfo>();
|
||
for (TObjectEvent oe : parms.getEvents().getObjectEvent()) {
|
||
Calendar now = Calendar.getInstance();
|
||
now.setTime(new Date());
|
||
String etype = TEventType.OBJECT.toString();
|
||
Event event = new Event(0, oe.getObjectID(), partnerId, userId, oe.getLifeCycleStepID(),
|
||
etype, oe.getEventClass(), oe.getSourceTS().toGregorianCalendar(), now, new HashMap<String, String>());
|
||
eventList.add(new EventInfo(event, oe.getPriority(), oe.getTtl().intValue()));
|
||
}
|
||
List<Integer> idsList = dsClient.multipleEventCreate(sessionId, partnerId, eventList);
|
||
|
||
MultipleEventCreateOut res = new MultipleEventCreateOut();
|
||
TEventIDList teidList = new TEventIDList();
|
||
// tres not used but required
|
||
TResult tres = new TResult();
|
||
tres.setCode(1000);
|
||
tres.setDesc("command successfull");
|
||
tres.setValue("10000");
|
||
res.setResult(tres);
|
||
res.setEventIDList(teidList);
|
||
List<BigInteger> resIds = teidList.getEventID();
|
||
for (int eid : idsList) {
|
||
resIds.add(BigInteger.valueOf(eid));
|
||
}
|
||
|
||
dsClient.userLogout(sessionId);
|
||
return res;
|
||
} catch (MalformedURIException ex) {
|
||
log.fatal(null, ex);
|
||
} catch (RemoteException ex) {
|
||
log.fatal(null, ex);
|
||
} catch (EnhancedProtocolException ex) {
|
||
log.fatal(null, ex);
|
||
}
|
||
return null;
|
||
}
|
||
|
||
@Override
|
||
public EventCreateOut iDedEventCreate(EventCreateIn parms, Identity id) {
|
||
try {
|
||
String sessionId = dsClient.userLogin(Constants.DEFAULT_SESSION, Constants.WINGS_LOGIN, Constants.WINGS_PASSWORD).getSessionId();
|
||
UserInfo uInfo = dsClient.userInfo(sessionId, Constants.WINGS_LOGIN);
|
||
String partnerId = uInfo.getPartnerId();
|
||
|
||
Calendar now = Calendar.getInstance();
|
||
now.setTime(new Date());
|
||
TObjectEvent oe = parms.getEvent().getObjectEvent();
|
||
int eid = dsClient.eventCreate(sessionId, partnerId, oe.getObjectID(), oe.getLifeCycleStepID(), oe.getEventClass(),
|
||
oe.getSourceTS().toGregorianCalendar(), oe.getTtl().intValue(), null, oe.getPriority(), new HashMap<String, String>());
|
||
|
||
EventCreateOut res = new EventCreateOut();
|
||
// tres not used but required
|
||
TResult tres = new TResult();
|
||
tres.setCode(1000);
|
||
tres.setDesc("command successfull");
|
||
tres.setValue("10000");
|
||
res.setResult(tres);
|
||
res.setEventID(BigInteger.valueOf(eid));
|
||
dsClient.userLogout(sessionId);
|
||
return res;
|
||
} catch (MalformedURIException ex) {
|
||
log.fatal(null, ex);
|
||
} catch (RemoteException ex) {
|
||
log.fatal(null, ex);
|
||
} catch (EnhancedProtocolException ex) {
|
||
log.fatal(null, ex);
|
||
}
|
||
return null;
|
||
}
|
||
}
|
DSeTa/DSeTa/src/main/java/fr/unicaen/iota/dseta/server/DiscoveryWebService.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2012 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.dseta.server;
|
||
|
||
import fr.unicaen.iota.ds.model.*;
|
||
import fr.unicaen.iota.ds.soap.DSServicePortType;
|
||
|
||
/**
|
||
*
|
||
*/
|
||
public class DiscoveryWebService extends DSeTaWebService implements DSServicePortType {
|
||
|
||
@Override
|
||
public EventLookupOut eventLookup(EventLookupIn parms) {
|
||
return iDedEventLookup(parms, anonymous);
|
||
}
|
||
|
||
@Override
|
||
public MultipleEventCreateOut multipleEventCreate(MultipleEventCreateIn parms) {
|
||
return iDedMultipleEventCreate(parms, anonymous);
|
||
}
|
||
|
||
@Override
|
||
public EventCreateOut eventCreate(EventCreateIn parms) {
|
||
return iDedEventCreate(parms, anonymous);
|
||
}
|
||
}
|
DSeTa/DSeTa/src/main/java/fr/unicaen/iota/dseta/service/DSeTaService.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2012-2013 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.dseta.service;
|
||
|
||
import fr.unicaen.iota.ds.commons.OperationsBackendSQL;
|
||
import fr.unicaen.iota.ds.commons.OperationsSession;
|
||
import fr.unicaen.iota.ds.commons.Publish;
|
||
import fr.unicaen.iota.ds.model.CreateResponseType;
|
||
import fr.unicaen.iota.ds.model.DSEvent;
|
||
import fr.unicaen.iota.ds.model.EventCreateResp;
|
||
import fr.unicaen.iota.ds.model.EventLookupReq;
|
||
import fr.unicaen.iota.ds.model.EventLookupResp;
|
||
import fr.unicaen.iota.ds.model.InternalException;
|
||
import fr.unicaen.iota.ds.model.MultipleEventCreateResp;
|
||
import fr.unicaen.iota.ds.soap.ImplementationExceptionResponse;
|
||
import fr.unicaen.iota.ds.soap.InternalExceptionResponse;
|
||
import fr.unicaen.iota.dseta.model.EventCreateReq;
|
||
import fr.unicaen.iota.dseta.model.MultipleEventCreateReq;
|
||
import fr.unicaen.iota.dseta.soap.DSeTaServicePortType;
|
||
import fr.unicaen.iota.dseta.soap.SecurityExceptionResponse;
|
||
import fr.unicaen.iota.dseta.utils.Constants;
|
||
import fr.unicaen.iota.dseta.utils.Utils;
|
||
import fr.unicaen.iota.tau.model.Identity;
|
||
import fr.unicaen.iota.xacml.pep.XACMLDSEvent;
|
||
import fr.unicaen.iota.xi.client.DSPEP;
|
||
import java.security.Principal;
|
||
import java.sql.PreparedStatement;
|
||
import java.sql.ResultSet;
|
||
import java.sql.SQLException;
|
||
import java.util.ArrayList;
|
||
import java.util.Date;
|
||
import java.util.HashMap;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import javax.annotation.Resource;
|
||
import javax.jms.JMSException;
|
||
import javax.jms.MessageProducer;
|
||
import javax.jms.Queue;
|
||
import javax.jms.Session;
|
||
import javax.sql.DataSource;
|
||
import javax.xml.bind.JAXBException;
|
||
import javax.xml.datatype.DatatypeConfigurationException;
|
||
import javax.xml.datatype.XMLGregorianCalendar;
|
||
import javax.xml.ws.WebServiceContext;
|
||
import org.apache.commons.logging.Log;
|
||
import org.apache.commons.logging.LogFactory;
|
||
|
||
/**
|
||
* This <code>DSeTaService</code> implements the DSeTa web service. It handles DS events.
|
||
*/
|
||
public class DSeTaService implements DSeTaServicePortType {
|
||
|
||
@Resource
|
||
protected WebServiceContext wsContext;
|
||
private DSPEP pep;
|
||
private OperationsBackendSQL backend;
|
||
private DataSource dataSource;
|
||
private Publish publish;
|
||
private static final Log LOG = LogFactory.getLog(DSeTaService.class);
|
||
|
||
public DSPEP getPep() {
|
||
return pep;
|
||
}
|
||
|
||
public void setPep(DSPEP pep) {
|
||
this.pep = pep;
|
||
}
|
||
|
||
public DataSource getDataSource() {
|
||
return dataSource;
|
||
}
|
||
|
||
public void setDataSource(DataSource dataSource) {
|
||
this.dataSource = dataSource;
|
||
}
|
||
|
||
public OperationsBackendSQL getBackend() {
|
||
return backend;
|
||
}
|
||
|
||
public void setBackend(OperationsBackendSQL backend) {
|
||
this.backend = backend;
|
||
}
|
||
|
||
private void checkAuth(Identity id) throws SecurityExceptionResponse {
|
||
Principal authId = wsContext.getUserPrincipal();
|
||
if (authId == null) { // no TLS
|
||
if (!Constants.XACML_ANONYMOUS_USER.equals(id.getAsString())) {
|
||
throw new SecurityExceptionResponse("Can't allowed to pass as " + id.getAsString() +
|
||
" without authentication. Only " + Constants.XACML_ANONYMOUS_USER + " is allowed.");
|
||
}
|
||
} else { // TLS
|
||
String user = fr.unicaen.iota.mu.Utils.formatId(authId.getName());
|
||
String canBeUser = fr.unicaen.iota.mu.Utils.formatId(id.getAsString());
|
||
if (!user.equals(canBeUser)) {
|
||
int canBeResult = pep.canBe(user, canBeUser);
|
||
if (!fr.unicaen.iota.xi.utils.Utils.responseIsPermit(canBeResult)) {
|
||
throw new SecurityExceptionResponse(authId.getName() + " isn't allowed to pass as " + id.getAsString());
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
@Override
|
||
public EventCreateResp iDedEventCreate(EventCreateReq eventCreateReq, Identity identity)
|
||
throws ImplementationExceptionResponse, InternalExceptionResponse, SecurityExceptionResponse {
|
||
checkAuth(identity);
|
||
EventCreateResp createResp = new EventCreateResp();
|
||
DSEvent event = eventCreateReq.getDsEvent();
|
||
if (event.getEpc() == null || event.getEpc().isEmpty()
|
||
|| event.getEventType() == null || event.getEventType().isEmpty()
|
||
|| event.getBizStep() == null || event.getBizStep().isEmpty()
|
||
|| event.getEventTime() == null
|
||
|| event.getServiceType() == null || event.getServiceAddress().isEmpty()
|
||
|| event.getServiceAddress() == null || event.getServiceAddress().isEmpty()) {
|
||
createResp.setValue(CreateResponseType.NOT_ADDED);
|
||
createResp.setMessage("At least one field is missing or empty");
|
||
return createResp;
|
||
}
|
||
String userId = identity.getAsString();
|
||
DSEvent dsEvent = eventCreateReq.getDsEvent();
|
||
String owner = eventCreateReq.getOwner().getAsString();
|
||
if (!canCreateEvent(userId, dsEvent, owner)) {
|
||
createResp.setValue(CreateResponseType.NOT_ADDED);
|
||
createResp.setMessage("The user is not authorized to add the event");
|
||
return createResp;
|
||
}
|
||
try {
|
||
OperationsSession session = backend.openSession(dataSource);
|
||
Map<String, Object> paramObjMap = new HashMap<String, Object>();
|
||
paramObjMap.put("owner", owner);
|
||
boolean result = backend.eventCreate(session, dsEvent, paramObjMap);
|
||
createResp.setValue(CreateResponseType.CREATED_NOT_PUBLISHED);
|
||
String msg = (result)? "Event correctly added" : "Event not added";
|
||
LOG.info(msg);
|
||
if (result && Constants.MULTI_DSETA_ARCHITECTURE) {
|
||
if (publish == null) {
|
||
publish = new Publish(Constants.SERVICE_ID, Constants.ONS_HOSTS, Constants.JMS_URL,
|
||
Constants.JMS_LOGIN, Constants.JMS_PASSWORD, Constants.JMS_MESSAGE_TIME_PROPERTY);
|
||
}
|
||
try {
|
||
publish.createsJMSConnection();
|
||
Session producerSession = publish.createsJMSSession(false, Session.CLIENT_ACKNOWLEDGE);
|
||
Queue producerQueue = publish.createsJMSQueue(producerSession, Constants.JMS_QUEUE_NAME);
|
||
MessageProducer producer = publish.createJMSProducer(producerSession, producerQueue);
|
||
publish.startsJMSConnection();
|
||
try {
|
||
String eventCreateReqString = Utils.convertsEventCreateReqToString(eventCreateReq);
|
||
publish.sendsEvent(producerSession, producer, eventCreateReqString);
|
||
createResp.setValue(CreateResponseType.CREATED_AND_PUBLISHED);
|
||
} finally {
|
||
producerSession.close();
|
||
publish.closesJMSConnection();
|
||
}
|
||
} catch (JAXBException ex) {
|
||
msg = "Event added but not published";
|
||
if (LOG.isDebugEnabled()) {
|
||
LOG.info(msg, ex);
|
||
}
|
||
else {
|
||
LOG.info(msg);
|
||
}
|
||
} catch (JMSException ex) {
|
||
msg = "Event added but not published";
|
||
LOG.error(msg, ex);
|
||
}
|
||
}
|
||
createResp.setMessage(msg);
|
||
return createResp;
|
||
} catch (SQLException ex) {
|
||
InternalException iex = new InternalException();
|
||
String msg = "SQL error during capture execution: " + ex.getMessage();
|
||
LOG.error(msg, ex);
|
||
iex.setReason(msg);
|
||
throw new InternalExceptionResponse(msg, iex, ex);
|
||
}
|
||
}
|
||
|
||
@Override
|
||
public MultipleEventCreateResp iDedMultipleEventCreate(MultipleEventCreateReq multipleEventCreateReq, Identity identity) throws ImplementationExceptionResponse, SecurityExceptionResponse, InternalExceptionResponse {
|
||
checkAuth(identity);
|
||
String userId = identity.getAsString();
|
||
MultipleEventCreateResp multipleCreateResp = new MultipleEventCreateResp();
|
||
List<EventCreateResp> responseList = multipleCreateResp.getEventCreateResponses();
|
||
List<EventCreateReq> eventCreateList = multipleEventCreateReq.getEventCreate();
|
||
int nbDSEvents = eventCreateList.size();
|
||
int nbSuccess = 0;
|
||
try {
|
||
OperationsSession session = backend.openSession(dataSource);
|
||
for (int i = 0; i < nbDSEvents; i++) {
|
||
EventCreateReq eventCreate = eventCreateList.get(i);
|
||
EventCreateResp response = new EventCreateResp();
|
||
response.setValue(CreateResponseType.NOT_ADDED);
|
||
DSEvent event = eventCreate.getDsEvent();
|
||
String msg = "";
|
||
String owner = eventCreate.getOwner().getAsString();
|
||
if (event.getEpc() == null || event.getEpc().isEmpty()
|
||
|| event.getEventType() == null || event.getEventType().isEmpty()
|
||
|| event.getBizStep() == null || event.getBizStep().isEmpty()
|
||
|| event.getEventTime() == null
|
||
|| event.getServiceType() == null || event.getServiceAddress().isEmpty()
|
||
|| event.getServiceAddress() == null || event.getServiceAddress().isEmpty()
|
||
|| owner == null || owner.isEmpty()) {
|
||
msg = "At least one field is missing or empty";
|
||
}
|
||
else {
|
||
if (canCreateEvent(userId, event, owner)) {
|
||
try {
|
||
Map<String, Object> paramObjMap = new HashMap<String, Object>();
|
||
paramObjMap.put("owner", owner);
|
||
boolean res = backend.eventCreate(session, event, paramObjMap);
|
||
if (res == true) {
|
||
nbSuccess++;
|
||
msg = "Event correctly added";
|
||
response.setValue(CreateResponseType.CREATED_NOT_PUBLISHED);
|
||
}
|
||
else {
|
||
msg = "Event not added";
|
||
}
|
||
} catch (SQLException ex) {
|
||
msg = "SQL error during capture execution: " + ex.getMessage();
|
||
if (LOG.isDebugEnabled()) {
|
||
LOG.error(msg, ex);
|
||
}
|
||
else {
|
||
LOG.error(msg);
|
||
}
|
||
}
|
||
}
|
||
else {
|
||
msg = "The user is not authorized to add the event";
|
||
}
|
||
}
|
||
LOG.info(msg);
|
||
response.setMessage(msg);
|
||
responseList.add(i, response);
|
||
}
|
||
multipleCreateResp.setResult((nbSuccess == nbDSEvents)?
|
||
CreateResponseType.CREATED_NOT_PUBLISHED : CreateResponseType.NOT_ADDED);
|
||
} catch (SQLException ex) {
|
||
InternalException iex = new InternalException();
|
||
String msg = "SQL error during capture execution: " + ex.getMessage();
|
||
LOG.error(msg, ex);
|
||
iex.setReason(msg);
|
||
throw new InternalExceptionResponse(msg, iex, ex);
|
||
}
|
||
|
||
if (Constants.MULTI_DSETA_ARCHITECTURE) {
|
||
int nbPublishing = 0;
|
||
if (publish == null) {
|
||
publish = new Publish(Constants.SERVICE_ID, Constants.ONS_HOSTS, Constants.JMS_URL,
|
||
Constants.JMS_LOGIN, Constants.JMS_PASSWORD, Constants.JMS_MESSAGE_TIME_PROPERTY);
|
||
}
|
||
try {
|
||
publish.createsJMSConnection();
|
||
Session producerSession = publish.createsJMSSession(false, Session.CLIENT_ACKNOWLEDGE);
|
||
Queue producerQueue = publish.createsJMSQueue(producerSession, Constants.JMS_QUEUE_NAME);
|
||
MessageProducer producer = publish.createJMSProducer(producerSession, producerQueue);
|
||
publish.startsJMSConnection();
|
||
try {
|
||
for (int i = 0; i < responseList.size(); i++) {
|
||
EventCreateResp resp = responseList.get(i);
|
||
if (resp.getValue().equals(CreateResponseType.NOT_ADDED)) {
|
||
continue;
|
||
}
|
||
try {
|
||
String eventCreateReqString = Utils.convertsEventCreateReqToString(eventCreateList.get(i));
|
||
publish.sendsEvent(producerSession, producer, eventCreateReqString);
|
||
resp.setMessage("Event added and going to be published");
|
||
resp.setValue(CreateResponseType.CREATED_AND_PUBLISHED);
|
||
nbPublishing++;
|
||
} catch (Exception ex) {
|
||
String msg = "Event added but not published";
|
||
resp.setMessage(msg);
|
||
if (LOG.isDebugEnabled()) {
|
||
LOG.info(msg, ex);
|
||
}
|
||
else {
|
||
LOG.info(msg);
|
||
}
|
||
}
|
||
}
|
||
} finally {
|
||
producerSession.close();
|
||
publish.closesJMSConnection();
|
||
}
|
||
} catch (JMSException ex) {
|
||
LOG.error("Error with the JMS provider during the publishing", ex);
|
||
}
|
||
multipleCreateResp.setResult((nbPublishing == nbDSEvents)?
|
||
CreateResponseType.CREATED_AND_PUBLISHED : CreateResponseType.CREATED_NOT_PUBLISHED);
|
||
}
|
||
return multipleCreateResp;
|
||
}
|
||
|
||
@Override
|
||
public EventLookupResp iDedEventLookup(EventLookupReq eventLookupReq, Identity identity) throws ImplementationExceptionResponse, SecurityExceptionResponse, InternalExceptionResponse {
|
||
checkAuth(identity);
|
||
try {
|
||
String userId = identity.getAsString();
|
||
EventLookupResp lookupResp = new EventLookupResp();
|
||
OperationsSession session = backend.openSession(dataSource);
|
||
List<String> columnNames = new ArrayList<String>();
|
||
columnNames.add("epc");
|
||
columnNames.add("eventType");
|
||
columnNames.add("bizStep");
|
||
columnNames.add("eventTime");
|
||
columnNames.add("serviceAddress");
|
||
columnNames.add("serviceType");
|
||
columnNames.add("owner");
|
||
PreparedStatement stmt = backend.getPreparedStatementSelect(session, eventLookupReq.getEpc(),
|
||
eventLookupReq.getEventType(), eventLookupReq.getBizStep(), eventLookupReq.getStartingAt(),
|
||
eventLookupReq.getEndingAt(), eventLookupReq.getServiceType(), columnNames);
|
||
ResultSet rs = stmt.executeQuery();
|
||
List<DSEvent> dsEventList = lookupResp.getDsEventList();
|
||
while (rs.next()) {
|
||
DSEvent dSEvent = new DSEvent();
|
||
dSEvent.setEpc(rs.getString("epc"));
|
||
dSEvent.setEventType(rs.getString("eventType"));
|
||
dSEvent.setBizStep(rs.getString("bizStep"));
|
||
dSEvent.setEventTime(backend.timestampToXmlCalendar(rs.getTimestamp("eventTime")));
|
||
dSEvent.setServiceAddress(rs.getString("serviceAddress"));
|
||
dSEvent.setServiceType(rs.getString("serviceType"));
|
||
String owner = rs.getString("owner");
|
||
if (canLookupEvent(userId, dSEvent, owner)) {
|
||
dsEventList.add(dSEvent);
|
||
}
|
||
}
|
||
return lookupResp;
|
||
} catch (DatatypeConfigurationException ex) {
|
||
InternalException iex = new InternalException();
|
||
String msg = "Error during event time conversion: " + ex.getMessage();
|
||
LOG.error(msg, ex);
|
||
iex.setReason(msg);
|
||
throw new InternalExceptionResponse(msg, iex, ex);
|
||
} catch (SQLException ex) {
|
||
InternalException iex = new InternalException();
|
||
String msg = "SQL error during query execution: " + ex.getMessage();
|
||
LOG.error(msg, ex);
|
||
iex.setReason(msg);
|
||
throw new InternalExceptionResponse(msg, iex, ex);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Checks if the user can create the DSeTa event.
|
||
* @param userId The user who wants to add the event.
|
||
* @param dsEvent The DSEvent the user wants to add.
|
||
* @param owner The owner of the event to add.
|
||
* @return True if the user is not authorized to add the event.
|
||
*/
|
||
private boolean canCreateEvent(String userId, DSEvent dsEvent, String owner) {
|
||
String formatedOwner = fr.unicaen.iota.mu.Utils.formatId(owner);
|
||
String formatedUser = fr.unicaen.iota.mu.Utils.formatId(userId);
|
||
XACMLDSEvent xacmlEvent = createsXACMLDSEvent(dsEvent, formatedOwner);
|
||
int canCreate = pep.eventCreate(formatedUser, xacmlEvent);
|
||
return fr.unicaen.iota.xi.utils.Utils.responseIsPermit(canCreate);
|
||
}
|
||
|
||
/**
|
||
* Checks if the user can lookup the DS event.
|
||
* @param userId The user who wants to add the event.
|
||
* @param dsEvent The DSEvent the user wants to add.
|
||
* @param owner The owner of the event to add.
|
||
* @return True if the user is authorized to lookup the event.
|
||
*/
|
||
private boolean canLookupEvent(String userId, DSEvent dsEvent, String owner) {
|
||
String formatedOwner = fr.unicaen.iota.mu.Utils.formatId(owner);
|
||
String formatedUser = fr.unicaen.iota.mu.Utils.formatId(userId);
|
||
XACMLDSEvent xacmlEvent = createsXACMLDSEvent(dsEvent, formatedOwner);
|
||
int canLookup = pep.eventLookup(formatedUser, xacmlEvent);
|
||
return fr.unicaen.iota.xi.utils.Utils.responseIsPermit(canLookup);
|
||
}
|
||
|
||
/**
|
||
* Creates a XACMLDSEvent.
|
||
* @param dsEvent The DSEvent associated to the XACMLDSevent.
|
||
* @param owner The owner of the DSEvent.
|
||
* @return The XACMLDSEvent associated to the given parameters.
|
||
*/
|
||
private XACMLDSEvent createsXACMLDSEvent(DSEvent dsEvent, String owner) {
|
||
String epc = dsEvent.getEpc();
|
||
String eventType = dsEvent.getEventType();
|
||
String bizStep = dsEvent.getBizStep();
|
||
XMLGregorianCalendar eventTime = dsEvent.getEventTime();
|
||
Date d = eventTime.toGregorianCalendar().getTime();
|
||
XACMLDSEvent xacmlEvent = new XACMLDSEvent(owner, bizStep, epc, eventType, d);
|
||
return xacmlEvent;
|
||
}
|
||
|
||
}
|
DSeTa/DSeTa/src/main/java/fr/unicaen/iota/dseta/service/IDedPublish.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2013 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.dseta.service;
|
||
|
||
import fr.unicaen.iota.ds.commons.Publish;
|
||
import fr.unicaen.iota.ds.model.CreateResponseType;
|
||
import fr.unicaen.iota.ds.model.EventCreateResp;
|
||
import fr.unicaen.iota.dseta.client.DSeTaClient;
|
||
import fr.unicaen.iota.dseta.model.EventCreateReq;
|
||
import fr.unicaen.iota.dseta.utils.Constants;
|
||
import fr.unicaen.iota.dseta.utils.Utils;
|
||
import fr.unicaen.iota.nu.ONSEntryType;
|
||
import fr.unicaen.iota.tau.model.Identity;
|
||
import java.io.IOException;
|
||
import javax.jms.JMSException;
|
||
import javax.jms.Message;
|
||
import javax.jms.MessageConsumer;
|
||
import javax.jms.MessageProducer;
|
||
import javax.jms.Session;
|
||
import javax.jms.TextMessage;
|
||
import javax.xml.bind.JAXBException;
|
||
import javax.xml.parsers.ParserConfigurationException;
|
||
import org.apache.commons.logging.Log;
|
||
import org.apache.commons.logging.LogFactory;
|
||
import org.xml.sax.SAXException;
|
||
|
||
public class IDedPublish extends Publish {
|
||
|
||
private static final Log LOG = LogFactory.getLog(IDedPublish.class);
|
||
|
||
public IDedPublish(String myAddress, String[] onsHosts, String jmsUrl, String jmsLogin, String jmsPassword, String timeProperty) {
|
||
super(myAddress, onsHosts, jmsUrl, jmsLogin, jmsPassword, timeProperty);
|
||
}
|
||
|
||
/**
|
||
* Publishes the event. If the event can not be published, the event is resend to the queue.
|
||
* @param consumer The JMS consumer which retrieves the event to publish.
|
||
* @param timeout Waits until this time expires (in milliseconds).
|
||
* @param producerSession The JMS session associated to the producer.
|
||
* @param producer The JMS producer which sends the event to the next queue if the event could not be published.
|
||
* @param runtime The runtime.
|
||
* @return True if the publishing can continue.
|
||
* @throws JMSException If an error occurred with the JMS provider.
|
||
* @throws JAXBException If an error occurred during the conversion from the string to <code>DSEvent</code>.
|
||
* @throws ParserConfigurationException If an error occurred during the conversion from the JMS message to string.
|
||
* @throws SAXException If an error occurred during the conversion from the JMS message to string.
|
||
* @throws IOException If an I/O error occurred.
|
||
*/
|
||
@Override
|
||
public boolean publishEvent(MessageConsumer consumer, long timeout, Session producerSession, MessageProducer producer,
|
||
long runtime) throws JMSException, JAXBException, ParserConfigurationException, SAXException, IOException {
|
||
boolean continuePublishing = true;
|
||
boolean republish = true;
|
||
Message message = consumer.receive(timeout);
|
||
if (message == null) {
|
||
return false;
|
||
}
|
||
TextMessage text = (TextMessage) message;
|
||
String docText = text.getText();
|
||
if (text.getLongProperty(getTimeProperty()) <= runtime) {
|
||
EventCreateReq evtReq = Utils.extractsEventCreateReq(docText);
|
||
String epc = evtReq.getDsEvent().getEpc();
|
||
String dsAddress = getDSAdress(epc, ONSEntryType.ided_ds);
|
||
String owner = evtReq.getOwner().getAsString();
|
||
if (dsAddress == null) {
|
||
LOG.error("Could not get the referent DSeTa address for " + epc);
|
||
}
|
||
else {
|
||
try {
|
||
if (notMe(dsAddress)) {
|
||
Identity id = new Identity();
|
||
id.setAsString(owner);
|
||
DSeTaClient dsetaClient = new DSeTaClient(id, dsAddress, Constants.PKS_FILENAME, Constants.PKS_PASSWORD,
|
||
Constants.TRUST_PKS_FILENAME, Constants.TRUST_PKS_PASSWORD);
|
||
EventCreateResp result = dsetaClient.eventCreate(evtReq.getDsEvent(), owner);
|
||
if (!CreateResponseType.NOT_ADDED.equals(result.getValue())) {
|
||
republish = false;
|
||
LOG.info("Event published to " + dsAddress);
|
||
}
|
||
}
|
||
else {
|
||
republish = false;
|
||
LOG.info("Event not published: already in the corresponding DSeTa.");
|
||
}
|
||
} catch (Exception ex) {
|
||
String msg = "Fails to send event to " + dsAddress;
|
||
if (LOG.isDebugEnabled()) {
|
||
LOG.debug(msg, ex);
|
||
}
|
||
else {
|
||
LOG.info(msg);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
else {
|
||
continuePublishing = false;
|
||
}
|
||
|
||
if (republish) {
|
||
sendsEvent(producerSession, producer, docText);
|
||
}
|
||
message.acknowledge();
|
||
return continuePublishing;
|
||
}
|
||
|
||
}
|
DSeTa/DSeTa/src/main/java/fr/unicaen/iota/dseta/service/Publisher.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2013 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.dseta.service;
|
||
|
||
import fr.unicaen.iota.dseta.utils.Constants;
|
||
import java.io.IOException;
|
||
import java.util.Timer;
|
||
import java.util.TimerTask;
|
||
import javax.jms.JMSException;
|
||
import javax.jms.MessageConsumer;
|
||
import javax.jms.MessageProducer;
|
||
import javax.jms.Queue;
|
||
import javax.jms.Session;
|
||
import javax.xml.bind.JAXBException;
|
||
import javax.xml.parsers.ParserConfigurationException;
|
||
import org.apache.commons.logging.Log;
|
||
import org.apache.commons.logging.LogFactory;
|
||
import org.xml.sax.SAXException;
|
||
|
||
/**
|
||
*
|
||
*/
|
||
public class Publisher {
|
||
|
||
private final Timer timer;
|
||
private final IDedPublish publish;
|
||
private final long delay;
|
||
private final long period;
|
||
private final long timeout;
|
||
private static final Log LOG = LogFactory.getLog(Publisher.class);
|
||
|
||
public Publisher(long delay, long period, long timeout) {
|
||
this.timer = new Timer();
|
||
this.publish = new IDedPublish(Constants.SERVICE_ID, Constants.ONS_HOSTS, Constants.JMS_URL,
|
||
Constants.JMS_LOGIN, Constants.JMS_PASSWORD, Constants.JMS_MESSAGE_TIME_PROPERTY);
|
||
this.delay = delay;
|
||
this.period = period;
|
||
this.timeout = timeout;
|
||
}
|
||
|
||
public void start() {
|
||
timer.schedule(new PublisherTask(), delay, period);
|
||
}
|
||
|
||
public void stop() {
|
||
timer.cancel();
|
||
}
|
||
|
||
private class PublisherTask extends TimerTask {
|
||
|
||
@Override
|
||
public void run() {
|
||
try {
|
||
publish.createsJMSConnection();
|
||
Session consumerSession = publish.createsJMSSession(false, Session.CLIENT_ACKNOWLEDGE);
|
||
Queue consumerQueue = publish.createsJMSQueue(consumerSession, Constants.JMS_QUEUE_NAME);
|
||
MessageConsumer consumer = publish.createsJMSConsumer(consumerSession, consumerQueue);
|
||
Session producerSession = publish.createsJMSSession(false, Session.CLIENT_ACKNOWLEDGE);
|
||
Queue producerQueue = publish.createsJMSQueue(producerSession, Constants.JMS_QUEUE_NAME);
|
||
MessageProducer producer = publish.createJMSProducer(producerSession, producerQueue);
|
||
publish.startsJMSConnection();
|
||
try {
|
||
long runtime = System.currentTimeMillis();
|
||
while (true) {
|
||
boolean result = publish.publishEvent(consumer, timeout, producerSession, producer, runtime);
|
||
if (!result) {
|
||
break;
|
||
}
|
||
}
|
||
} finally {
|
||
consumerSession.close();
|
||
producerSession.close();
|
||
publish.closesJMSConnection();
|
||
}
|
||
} catch (IOException ex) {
|
||
LOG.error("An I/O error occurred");
|
||
LOG.debug("", ex);
|
||
} catch (JMSException ex) {
|
||
LOG.error("Error during receiving or sending message");
|
||
LOG.debug("", ex);
|
||
} catch (JAXBException ex) {
|
||
LOG.error("Error during the conversion from the string to DSEvent");
|
||
LOG.debug("", ex);
|
||
} catch (ParserConfigurationException ex) {
|
||
LOG.error("Error during the conversion from the JMS message to string.");
|
||
LOG.debug("", ex);
|
||
} catch (SAXException ex) {
|
||
LOG.error("Error during the conversion from the JMS message to string.");
|
||
LOG.debug("", ex);
|
||
} catch (Exception ex) {
|
||
LOG.error("An unexpected error occurred", ex);
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
DSeTa/DSeTa/src/main/java/fr/unicaen/iota/dseta/service/PublisherContextListener.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2013 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.dseta.service;
|
||
|
||
import fr.unicaen.iota.dseta.utils.Constants;
|
||
import javax.servlet.ServletContextEvent;
|
||
import javax.servlet.ServletContextListener;
|
||
|
||
public class PublisherContextListener implements ServletContextListener {
|
||
|
||
private Publisher publisher;
|
||
|
||
public PublisherContextListener() {
|
||
publisher = new Publisher(Constants.PUBLISHER_DELAY, Constants.PUBLISHER_PERIOD, Constants.PUBLISHER_TIMEOUT);
|
||
}
|
||
|
||
@Override
|
||
public void contextInitialized(ServletContextEvent sce) {
|
||
publisher.start();
|
||
}
|
||
|
||
@Override
|
||
public void contextDestroyed(ServletContextEvent sce) {
|
||
publisher.stop();
|
||
}
|
||
|
||
}
|
DSeTa/DSeTa/src/main/java/fr/unicaen/iota/dseta/utils/Constants.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2012-2013 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.dseta.utils;
|
||
|
||
import java.io.IOException;
|
||
import java.io.InputStream;
|
||
import java.util.Properties;
|
||
import org.apache.commons.logging.Log;
|
||
import org.apache.commons.logging.LogFactory;
|
||
|
||
public final class Constants {
|
||
|
||
public static final boolean XACML_USE_TLS_ID;
|
||
public static final String XACML_DEFAULT_USER;
|
||
public static final String XACML_ANONYMOUS_USER;
|
||
public static final boolean MULTI_DSETA_ARCHITECTURE;
|
||
public static final String SERVICE_ID;
|
||
public static final String PKS_FILENAME;
|
||
public static final String PKS_PASSWORD;
|
||
public static final String TRUST_PKS_FILENAME;
|
||
public static final String TRUST_PKS_PASSWORD;
|
||
public static final String[] ONS_HOSTS;
|
||
public static final String JMS_URL;
|
||
public static final String JMS_LOGIN;
|
||
public static final String JMS_PASSWORD;
|
||
public static final String JMS_QUEUE_NAME;
|
||
public static final String JMS_MESSAGE_TIME_PROPERTY;
|
||
public static final long PUBLISHER_DELAY;
|
||
public static final long PUBLISHER_PERIOD;
|
||
public static final long PUBLISHER_TIMEOUT;
|
||
private static final Log LOG = LogFactory.getLog(Constants.class);
|
||
|
||
public Constants() {
|
||
}
|
||
|
||
static {
|
||
Properties properties = new Properties();
|
||
InputStream is = Constants.class.getClassLoader().getResourceAsStream("application.properties");
|
||
LOG.debug("Chargement des propriétés de l'application");
|
||
try {
|
||
properties.load(is);
|
||
} catch (IOException ex) {
|
||
LOG.fatal(null, ex);
|
||
}
|
||
PKS_FILENAME = properties.getProperty("pks-filename", "privatekeys.jks");
|
||
PKS_PASSWORD = properties.getProperty("pks-password", "changeit");
|
||
TRUST_PKS_FILENAME = properties.getProperty("trust-pks-filename", "publickeys.jks");
|
||
TRUST_PKS_PASSWORD = properties.getProperty("trust-pks-password", "changeit");
|
||
XACML_USE_TLS_ID = Boolean.parseBoolean(properties.getProperty("xacml-use-tls-id"));
|
||
XACML_ANONYMOUS_USER = properties.getProperty("xacml-anonymous-user", "anonymous");
|
||
XACML_DEFAULT_USER = properties.getProperty("xacml-default-user", "default");
|
||
MULTI_DSETA_ARCHITECTURE = Boolean.parseBoolean(properties.getProperty("multi-dseta-architecture"));
|
||
if (MULTI_DSETA_ARCHITECTURE) {
|
||
SERVICE_ID = properties.getProperty("service-id");
|
||
ONS_HOSTS = fr.unicaen.iota.nu.Constants.ONS_HOSTS;
|
||
JMS_URL = properties.getProperty("jms-url");
|
||
JMS_LOGIN = properties.getProperty("jms-login");
|
||
JMS_PASSWORD = properties.getProperty("jms-password");
|
||
JMS_QUEUE_NAME = properties.getProperty("jms-queue-name");
|
||
JMS_MESSAGE_TIME_PROPERTY = properties.getProperty("jms-message-time-property");
|
||
PUBLISHER_DELAY = Long.valueOf(properties.getProperty("publisher-delay"));
|
||
PUBLISHER_PERIOD = Long.valueOf(properties.getProperty("publisher-period"));
|
||
PUBLISHER_TIMEOUT = Long.valueOf(properties.getProperty("publisher-timeout"));
|
||
}
|
||
else {
|
||
SERVICE_ID = "127.0.0.1";
|
||
ONS_HOSTS = null;
|
||
JMS_URL = null;
|
||
JMS_LOGIN = null;
|
||
JMS_PASSWORD = null;
|
||
JMS_QUEUE_NAME = null;
|
||
JMS_MESSAGE_TIME_PROPERTY = null;
|
||
PUBLISHER_DELAY = 0;
|
||
PUBLISHER_PERIOD = 0;
|
||
PUBLISHER_TIMEOUT = 0;
|
||
}
|
||
}
|
||
}
|
DSeTa/DSeTa/src/main/java/fr/unicaen/iota/dseta/utils/Utils.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2013 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.dseta.utils;
|
||
|
||
import fr.unicaen.iota.dseta.model.EventCreateReq;
|
||
import java.io.IOException;
|
||
import java.io.StringWriter;
|
||
import javax.xml.bind.JAXBContext;
|
||
import javax.xml.bind.JAXBElement;
|
||
import javax.xml.bind.JAXBException;
|
||
import javax.xml.bind.Marshaller;
|
||
import javax.xml.bind.Unmarshaller;
|
||
import javax.xml.namespace.QName;
|
||
import javax.xml.parsers.ParserConfigurationException;
|
||
import org.w3c.dom.Document;
|
||
import org.xml.sax.SAXException;
|
||
|
||
public class Utils {
|
||
|
||
/**
|
||
* Converts an EventCreateReq to String.
|
||
* @param eventCreateReq The EventCreateReq to convert.
|
||
* @return The String associated to the EventCreateReq.
|
||
* @throws JAXBException If an error occurred during the conversion.
|
||
*/
|
||
public static String convertsEventCreateReqToString(EventCreateReq eventCreateReq) throws JAXBException {
|
||
JAXBContext context = JAXBContext.newInstance("fr.unicaen.iota.dseta.model");
|
||
Marshaller marshaller = context.createMarshaller();
|
||
StringWriter stringWriter = new StringWriter();
|
||
marshaller.marshal(new JAXBElement(new QName("urn:unicaen:iota:dseta:xsd","dseta"), EventCreateReq.class, eventCreateReq), stringWriter);
|
||
return stringWriter.toString();
|
||
}
|
||
|
||
/**
|
||
* Extracts a EventCreateReq object from a String.
|
||
* @param xmlString The string to parse.
|
||
* @return The EventCreateReq associated to the string.
|
||
* @throws JAXBException If an error occurred during the conversion.
|
||
* @throws ParserConfigurationException If a DocumentBuilder cannot be created.
|
||
* @throws SAXException If an error processing the XML document occurred.
|
||
* @throws IOException If an I/O error occurred.
|
||
*/
|
||
public static EventCreateReq extractsEventCreateReq(String xmlString) throws JAXBException,
|
||
ParserConfigurationException, SAXException, IOException {
|
||
Document doc = fr.unicaen.iota.ds.commons.Utils.extractsDocument(xmlString);
|
||
JAXBContext context = JAXBContext.newInstance("fr.unicaen.iota.dseta.model");
|
||
Unmarshaller unmarshaller = context.createUnmarshaller();
|
||
JAXBElement<EventCreateReq> jaxbObject = (JAXBElement<EventCreateReq>) unmarshaller.unmarshal(doc, EventCreateReq.class);
|
||
return jaxbObject.getValue();
|
||
}
|
||
|
||
/**
|
||
* Extracts a EventCreateReq object from a XML document.
|
||
* @param doc The XML document to parse.
|
||
* @return The EventCreateReq object associated to the string.
|
||
* @throws JAXBException If an error occurred during the conversion.
|
||
* @throws ParserConfigurationException If a DocumentBuilder cannot be created.
|
||
* @throws SAXException If an error processing the XML document occurred.
|
||
* @throws IOException If an I/O error occurred.
|
||
*/
|
||
public static EventCreateReq extractsEventCreateReq(Document doc) throws JAXBException,
|
||
ParserConfigurationException, SAXException, IOException {
|
||
JAXBContext context = JAXBContext.newInstance("fr.unicaen.iota.dseta.model");
|
||
Unmarshaller unmarshaller = context.createUnmarshaller();
|
||
JAXBElement<EventCreateReq> jaxbObject = (JAXBElement<EventCreateReq>) unmarshaller.unmarshal(doc, EventCreateReq.class);
|
||
return jaxbObject.getValue();
|
||
}
|
||
|
||
}
|
DSeTa/DSeTa/src/main/resources/application.properties | ||
---|---|---|
service-id=urn:epc:id:gsrn:1.001
|
||
|
||
session-time-lease=30
|
||
|
||
session-failed-id = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||
|
||
ds-service-type = ds
|
||
|
||
html-service-type = html
|
||
|
||
epcis-service-type = epcis
|
||
|
||
ds-ons-type = epc\\+ds
|
||
|
||
html-ons-type = epc\\+html
|
||
|
||
epcis-ons-type = epc\\+epcis
|
||
|
||
use-xacml = false;
|
||
|
||
xacml-address = localhost
|
||
|
||
xacml-port = 9999
|
||
|
||
xacml-ihm-url = http://localhost:8080/xacml-local/
|
||
# TLS private and public keys
|
||
pks-filename = /srv/privatekeys.jks
|
||
pks-password = changeit
|
||
trust-pks-filename = /srv/publickeys.jks
|
||
trust-pks-password = changeit
|
||
|
||
xacml-url=http://localhost:8080/dphi/xi
|
||
xacml-default-user=default
|
||
xacml-anonymous-user=anonymous
|
||
|
||
## The following properties provide configuration to DSeTa in a
|
||
## multi DSeTa architecture mode.
|
||
|
||
## Set true if DSeTa is able to discuss with other DSeTas in the internet of things.
|
||
|
||
multi-dseta-architecture = false
|
||
|
||
## Set the ONS hosts to locate the address of a particular DSeTa for a particular
|
||
## EPC code. (ex : ons = addr1,addr2,..... )
|
||
ons-hosts = localhost
|
||
|
||
# ONS root domain (to construct FQDN from EPCs)
|
||
ons-domain-prefix = ons-peer.com.
|
||
|
||
# ONS specification used.
|
||
# 1.0 : original version (10000.30000.sgtin.id.ons-peer.com)
|
||
# 2.0 : WINGS version (0.0.0.0.1.0.0.0.0.3.sgtin.id.ons-peer.com)
|
||
ons-spec-level = 2.0
|
||
|
||
# nomenclature of the NAPTR fields
|
||
ons-epcis-entry = epc\\+epcis
|
||
ons-ided-epcis-entry = epc\\+ided_epcis
|
||
ons-ds-entry = epc\\+ds
|
||
ons-ided-ds-entry = epc\\+ided_ds
|
||
ons-html-entry = epc\\+html
|
||
ons-entry-regex = \\!\\^\\.\\*\\$\\!|\\!
|
||
|
||
service-id = https://localhost:8443/dseta
|
||
|
||
publisher-delay = 10000
|
||
publisher-period = 60000
|
||
publisher-timeout = 200
|
||
|
||
jms-url = tcp://localhost:61616
|
||
jms-login=
|
||
jms-password=
|
||
jms-queue-name= toPublish
|
||
jms-message-time-property = lastPublication
|
DSeTa/DSeTa/src/main/resources/commons-logging.properties | ||
---|---|---|
# use LOG4J as the underlying logging toolkit
|
||
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
|
DSeTa/DSeTa/src/main/resources/ds-client.properties | ||
---|---|---|
ws-connection-pool-size=10
|
DSeTa/DSeTa/src/main/resources/log4j.properties | ||
---|---|---|
# LOG4J configuration
|
||
|
||
# default logging
|
||
log4j.rootCategory=INFO, LOGFILE
|
||
|
||
# customize logging levels
|
||
log4j.logger.fr.unicaen.iota=INFO
|
||
|
||
# enable logging of SQL prepared statements
|
||
#log4j.logger.org.hibernate.SQL=FINE
|
||
#log4j.logger.org.hibernate.type=FINE
|
||
log4j.rootCategory = INFO, LOGFILE
|
||
|
||
# enable logging of incoming/outgoing SOAP requests/responses
|
||
#log4j.logger.org.apache.cxf.interceptor.LoggingInInterceptor=INFO
|
||
#log4j.logger.org.apache.cxf.interceptor.LoggingOutInterceptor=INFO
|
||
#log4j.logger.org.apache.cxf.interceptor.LoggingInInterceptor=WARN, LOGFILE
|
||
#log4j.logger.org.apache.cxf.interceptor.LoggingOutInterceptor=WARN, LOGFILE
|
||
log4j.logger.org.apache.cxf = WARN, LOGFILE
|
||
|
||
# spring logging
|
||
log4j.logger.org.springframework = WARN, LOGFILE
|
||
|
||
# logging to file
|
||
log4j.appender.LOGFILE=org.apache.log4j.RollingFileAppender
|
||
log4j.appender.LOGFILE=org.apache.log4j.DailyRollingFileAppender
|
||
log4j.appender.LOGFILE.File=${catalina.base}/logs/dseta.log
|
||
#log4j.appender.LOGFILE.DatePattern='.'yyyy-MM-dd'.log'
|
||
log4j.appender.LOGFILE.DatePattern='.'yyyy-MM-dd'.log'
|
||
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
|
||
log4j.appender.LOGFILE.layout.ConversionPattern=%5p (%d{yyyy-MM-dd HH:mm:ss,SSS}) [%C:%L] - %m%n
|
||
|
||
|
||
## CONSOLE is set to be a ConsoleAppender using a PatternLayout.
|
||
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
|
||
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
|
||
log4j.appender.CONSOLE.layout.ConversionPattern=[%p] [%C{1}:%L] %m%n
|
||
log4j.appender.LOGGER.MaxBackupIndex=7
|
DSeTa/DSeTa/src/main/resources/publisher.properties | ||
---|---|---|
## This file is a property file that provide configuration to the DS in a
|
||
## multi DS architecture mode.
|
||
|
||
## Set true if the DS is able to discuss with other DSs in the internet of things.
|
||
## You have to create account on other DS before being in multi-ds-architecture mode.
|
||
|
||
multi-ds-architecture = false
|
||
|
||
## Set the ONS hosts to locate the address of a particular DS for a particular
|
||
## EPC code. (ex : ons-addresses = addr1,addr2,..... )
|
||
|
||
ons-hosts = 127.0.0.1
|
||
## 208.67.222.222
|
||
## 161.105.145.124
|
||
|
||
## The DS login account
|
||
|
||
ds-login = anonymous
|
||
|
||
## the DS password account
|
||
|
||
ds-password = anonymous
|
||
|
||
## Gap after what an unpublished (because of server failure for exemple) event will be published one more time.
|
||
|
||
publisher-event-republish-gap = 180000
|
||
|
||
|
||
ds-to-ds-class = urn:epc:id:sgtin:0.0
|
||
ds-to-ds-biz-step = xx:xx:xx:xx:xx:xx
|
||
ds-to-ds-event-type = "xxxx"
|
||
ds-to-ds-pool-event = 1000
|
||
default-event-topublish-timestamp= 10000000
|
||
publisher-timeout = 100000
|
||
publisher-monitor-frequency = 25000
|
||
publisher-frequency = 10000
|
||
simultaneous-publish-limit = 20
|
||
ons-domain-prefix = ons-peer.com
|
DSeTa/DSeTa/src/main/resources/root-account.properties | ||
---|---|---|
login = superadmin
|
||
password = superadmin
|
DSeTa/DSeTa/src/main/webapp/META-INF/context.xml | ||
---|---|---|
<?xml version="1.0" encoding="UTF-8"?>
|
||
<Context path="/dseta" reloadable="true">
|
||
<Resource
|
||
auth="Container"
|
||
defaultAutoCommit="false"
|
||
driverClassName="com.mysql.jdbc.Driver"
|
||
name="jdbc/DSETADB"
|
||
username="dseta_usr"
|
||
password="dseta_pwd"
|
||
type="javax.sql.DataSource"
|
||
url="jdbc:mysql://localhost:3306/dseta_db?autoReconnect=true" />
|
||
</Context>
|
DSeTa/DSeTa/src/main/webapp/WEB-INF/applicationContext.xml | ||
---|---|---|
http://cxf.apache.org/jaxws
|
||
http://cxf.apache.org/schemas/jaxws.xsd">
|
||
|
||
<!-- beans and configurations defined in the cxf jars -->
|
||
<import resource="classpath:META-INF/cxf/cxf.xml" />
|
||
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
|
||
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
|
||
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
|
||
|
||
<!-- post-processor which replaces placeholders like ${test} with values from property files -->
|
||
<bean id="dataPropertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||
<property name="locations">
|
||
<list>
|
||
... | ... | |
</property>
|
||
</bean>
|
||
|
||
<!-- =========================================================== -->
|
||
<!-- Service layer definitions -->
|
||
<!-- =========================================================== -->
|
||
|
||
<bean id="ds" class="fr.unicaen.iota.dseta.server.DiscoveryWebService">
|
||
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean" scope="singleton">
|
||
<property name="jndiName" value="java:comp/env/jdbc/DSETADB" />
|
||
</bean>
|
||
|
||
<bean id="dseta" class="fr.unicaen.iota.dseta.server.DSeTaWebService">
|
||
<bean id="dsPEP" class="fr.unicaen.iota.xi.client.DSPEP">
|
||
<constructor-arg type="java.lang.String" value="${xacml-url}" />
|
||
<constructor-arg type="java.lang.String" value="${pks-filename}" />
|
||
<constructor-arg type="java.lang.String" value="${pks-password}" />
|
||
<constructor-arg type="java.lang.String" value="${trust-pks-filename}" />
|
||
<constructor-arg type="java.lang.String" value="${trust-pks-password}" />
|
||
</bean>
|
||
|
||
|
||
<!-- =========================================================== -->
|
||
<!-- CXF (Web service) configuration -->
|
||
<!-- =========================================================== -->
|
||
|
||
<!-- publish the Web service endpoint and it's implementing bean -->
|
||
<jaxws:endpoint id="DSEndpoint"
|
||
serviceName="ser:DS_Service"
|
||
implementor="#ds"
|
||
address="/ds"
|
||
xmlns:ser="urn:unicaen:iota:ds:wsdl" />
|
||
<jaxws:endpoint id="DSeTaEndpoint"
|
||
serviceName="ser:IDed_DS_Service"
|
||
implementor="#dseta"
|
||
address="/ided_ds"
|
||
xmlns:ser="urn:unicaen:iota:dseta:wsdl" />
|
||
|
||
<!-- register local transport -->
|
||
<bean class="org.apache.cxf.transport.local.LocalTransportFactory" lazy-init="false">
|
||
<property name="transportIds">
|
||
<list>
|
||
<value>http://cxf.apache.org/transports/local</value>
|
||
<value>http://schemas.xmlsoap.org/soap/http</value>
|
||
<value>http://schemas.xmlsoap.org/wsdl/soap/http</value>
|
||
</list>
|
||
<bean id="dsetaService" class="fr.unicaen.iota.dseta.service.DSeTaService">
|
||
<property name="dataSource" ref="dataSource" />
|
||
<property name="pep" ref="dsPEP" />
|
||
<property name="backend">
|
||
<bean class="fr.unicaen.iota.ds.commons.OperationsBackendSQL" />
|
||
</property>
|
||
</bean>
|
||
|
||
<jaxws:endpoint id="DSeTaEndpoint"
|
||
serviceName="dseta:DSeTaService"
|
||
implementor="#dsetaService"
|
||
address="/"
|
||
xmlns:dseta="urn:unicaen:iota:dseta:wsdl" />
|
||
|
||
</beans>
|
DSeTa/DSeTa/src/main/webapp/WEB-INF/non-spring-web.xml | ||
---|---|---|
<?xml version="1.0" encoding="UTF-8"?>
|
||
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
|
||
<web-app>
|
||
<display-name>DSeTa</display-name>
|
||
|
||
<servlet>
|
||
<servlet-name>DSeTa</servlet-name>
|
||
<servlet-class>fr.unicaen.iota.dseta.server.DSeTaWebService</servlet-class>
|
||
</servlet>
|
||
<servlet>
|
||
<servlet-name>DS</servlet-name>
|
||
<servlet-class>fr.unicaen.iota.dseta.server.DiscoveryWebService</servlet-class>
|
||
</servlet>
|
||
|
||
<servlet-mapping>
|
||
<!-- The DS servlet will be available at http://{url:port}/{context-path}/ds -->
|
||
<servlet-name>DS</servlet-name>
|
||
<url-pattern>/ds/*</url-pattern>
|
||
</servlet-mapping>
|
||
<servlet-mapping>
|
||
<!-- The DSeTa servlet will be available at http://{url:port}/{context-path}/ided_ds -->
|
||
<servlet-name>DSeTa</servlet-name>
|
||
<url-pattern>/ided_ds/*</url-pattern>
|
||
</servlet-mapping>
|
||
|
||
<mime-mapping>
|
||
<extension>wsdl</extension>
|
||
<mime-type>text/xml</mime-type>
|
||
</mime-mapping>
|
||
<mime-mapping>
|
||
<extension>xsd</extension>
|
||
<mime-type>text/xml</mime-type>
|
||
</mime-mapping>
|
||
|
||
<welcome-file-list id="WelcomeFileList">
|
||
<welcome-file>index.jsp</welcome-file>
|
||
</welcome-file-list>
|
||
|
||
</web-app>
|
DSeTa/DSeTa/src/main/webapp/WEB-INF/web.xml | ||
---|---|---|
<?xml version="1.0" encoding="UTF-8"?>
|
||
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
|
||
<display-name>DSeTa</display-name>
|
||
|
||
<context-param>
|
||
<param-name>contextConfigLocation</param-name>
|
||
<param-value>WEB-INF/applicationContext.xml</param-value>
|
||
</context-param>
|
||
<listener>
|
||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||
</listener>
|
||
</listener>
|
||
|
||
<servlet>
|
||
<!-- CXFServlet providing the DSeTa Interface Endpoint -->
|
||
<servlet-name>DSeTa</servlet-name>
|
||
<servlet-name>DSeTaCaptureAndQueryInterface</servlet-name>
|
||
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
|
||
<load-on-startup>1</load-on-startup>
|
||
</servlet>
|
||
|
||
<servlet-mapping>
|
||
<!-- The CXF Web service will be available at http://{url:port}/{context-path}/* -->
|
||
<servlet-name>DSeTa</servlet-name>
|
||
<servlet-name>DSeTaCaptureAndQueryInterface</servlet-name>
|
||
<url-pattern>/*</url-pattern>
|
||
</servlet-mapping>
|
||
|
||
<session-config>
|
||
<session-timeout>5</session-timeout>
|
||
</session-config>
|
||
|
||
<mime-mapping>
|
||
<extension>wsdl</extension>
|
||
<mime-type>text/xml</mime-type>
|
||
... | ... | |
<extension>xsd</extension>
|
||
<mime-type>text/xml</mime-type>
|
||
</mime-mapping>
|
||
<welcome-file-list id="WelcomeFileList">
|
||
<welcome-file>index.html</welcome-file>
|
||
</welcome-file-list>
|
||
|
||
<security-constraint>
|
||
<web-resource-collection>
|
||
<web-resource-name>DSeTaSecure</web-resource-name>
|
||
<url-pattern>/*</url-pattern>
|
||
<http-method>GET</http-method>
|
||
<http-method>POST</http-method>
|
||
</web-resource-collection>
|
||
<auth-constraint>
|
||
<role-name>dseta_user</role-name>
|
||
</auth-constraint>
|
||
<user-data-constraint>
|
||
<transporting-guarantee>CONFIDENTIAL</transporting-guarantee>
|
||
</user-data-constraint>
|
||
</security-constraint>
|
||
<login-config>
|
||
<auth-method>CLIENT-CERT</auth-method>
|
||
</login-config>
|
||
<security-role>
|
||
<role-name>dseta_user</role-name>
|
||
</security-role>
|
||
|
||
</web-app>
|
DSeTa/DiscoveryPHI/LISEZMOI | ||
---|---|---|
|
||
Dépendances:
|
||
modules IoTa:
|
||
- IoTa-DiscoveryWS-Client
|
||
- LibXACML-DS
|
||
- YPSilon-Client
|
||
- Mu
|
||
bibliothèques:
|
||
- sunxacml
|
||
- axis2-adb
|
||
- servlet-api
|
||
- commons-logging
|
||
- log4j
|
||
... | ... | |
IoTa-Installer installe et configure DiscoveryPHI.
|
||
(application.properties pour cette application,
|
||
xacml_configuration.properties pour la bibliothèque cliente LibXACML-DS,
|
||
ds-client.properties pour la bibliothèque cliente IoTa-DiscoveryWS-Client,
|
||
commons-logging.properties et log4j.properties pour les journaux)
|
||
Un utilisateur doit utiliser une paire de clés publique/privée pour se
|
||
connecter à l'interface web. IoTa-Installer peut générer ces clés.
|
||
La clé publique devra ensuite être ajoutée aux clés de confiance du serveur.
|
||
Le DN (Distinguished Name) devra être similaire à celui utilisé par
|
||
l'annuaire LDAP géré par YPSilon. Cette manipulation devra être
|
||
faite pour l'utilisateur "superadmin" qui gère les comptes utilisateurs
|
||
via l'interface web.
|
||
Modifier le fichier tomcat-users.xml de Tomcat pour la gestion des
|
||
identités en TLS.
|
||
Voir le fichier INSTALL.fr
|
||
|
||
|
||
Dépendances d’utilisation:
|
||
- un DWS
|
||
- un DSeTa
|
||
|
||
Utilisation:
|
||
http://localhost:8080/discovery-phi/
|
||
https://localhost:8443/discovery-phi/
|
DSeTa/DiscoveryPHI/README | ||
---|---|---|
|
||
Dependencies:
|
||
IoTa modules:
|
||
- IoTa-DiscoveryWS-Client
|
||
- LibXACML-DS
|
||
- YPSilon-Client
|
||
- Mu
|
||
librairies:
|
||
- sunxacml
|
||
- axis2-adb
|
||
- servlet-api
|
||
- commons-logging
|
||
- log4j
|
||
... | ... | |
IoTa-Installer installs and configures DiscoveryPHI.
|
||
(application.properties for this application,
|
||
xacml_configuration.properties for the client library LibXACML-DS,
|
||
ds-client.properties for the client library IoTa-DiscoveryWS-Client,
|
||
commons-logging.properties and log4j.properties for the logs)
|
||
A user must use a public/private key pair to connect to the web interface.
|
||
IoTa-Installer can generate this keys. The public key have to be added to the
|
||
truststore of the server. DN (Distinguished name) needs to be similar
|
||
to the LDAP directory provided by YPSilon. To log to the web
|
||
interface as "superadmin" who manages user accounts, add this user
|
||
in this way.
|
||
Modify the tomcat-users.xml file of Tomcat to manage identity with TLS.
|
||
See the INSTALL file.
|
||
|
||
|
||
Usage Dependencies:
|
||
- a DWS
|
||
- a DSeTa
|
||
|
||
Usage:
|
||
http://localhost:8080/discovery-phi/
|
||
https://localhost:8443/discovery-phi/
|
DSeTa/DiscoveryPHI/pom.xml | ||
---|---|---|
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>discovery-phi</artifactId>
|
||
<version>1.99</version>
|
||
<version>2.0</version>
|
||
<packaging>war</packaging>
|
||
|
||
<name>DiscoveryPHI</name>
|
||
... | ... | |
|
||
<dependency>
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>discovery-client</artifactId>
|
||
<artifactId>ypsilon-client</artifactId>
|
||
<version>${project.version}</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>fr.unicaen.iota</groupId>
|
||
<artifactId>mu</artifactId>
|
||
<version>${project.version}</version>
|
||
</dependency>
|
||
|
||
... | ... | |
<!-- Other dependency -->
|
||
<dependency>
|
||
<groupId>javax.servlet</groupId>
|
||
<artifactId>servlet-api</artifactId>
|
||
<version>2.5</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>org.apache.axis2</groupId>
|
||
<artifactId>axis2-adb</artifactId>
|
||
<version>1.5.6</version>
|
||
<artifactId>javax.servlet-api</artifactId>
|
||
<version>3.0.1</version>
|
||
<scope>provided</scope>
|
||
</dependency>
|
||
|
||
</dependencies>
|
||
... | ... | |
</plugins>
|
||
</build>
|
||
|
||
<!--
|
||
<repositories>
|
||
<repository>
|
||
<id>sunxacml-repository</id>
|
||
<name>sunxacml Repository</name>
|
||
<url>http://sunxacml.sourceforge.net/maven2/repository/</url>
|
||
<snapshots>
|
||
<enabled>true</enabled>
|
||
</snapshots>
|
||
</repository>
|
||
<url>http://sourceforge.net/projects/sunxacml/files/maven/snapshots</url>
|
||
</repository>
|
||
</repositories>
|
||
-->
|
||
|
||
</project>
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/auth/Partner.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2008-2012 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.auth;
|
||
|
||
import java.util.Date;
|
||
import java.util.Set;
|
||
|
||
/**
|
||
* This class has been automatically generated by Hibernate Synchronizer. For
|
||
* more information or documentation, visit The Hibernate Synchronizer page at
|
||
* http://www.binamics.com/hibernatesync or contact Joe Hudson at
|
||
* joe@binamics.com.
|
||
*
|
||
* This is an object that contains data related to the partner table. Do not
|
||
* modify this class because it will be overwritten if the configuration file
|
||
* related to this class is modified.
|
||
*
|
||
* @hibernate.class table="partner"
|
||
*/
|
||
public class Partner {
|
||
|
||
public static String PROP_ACTIVE = "Active";
|
||
public static String PROP_DATE = "Date";
|
||
public static String PROP_SERVICE_ID = "ServiceID";
|
||
public static String PROP_SERVICE_ADDRESS = "ServiceAddress";
|
||
public static String PROP_SERVICE_TYPE = "ServiceType";
|
||
public static String PROP_ID = "Id";
|
||
public static String PROP_PARTNER_I_D = "PartnerID";
|
||
// primary key
|
||
private Integer _id;
|
||
// fields
|
||
private boolean _active;
|
||
private String _partnerID;
|
||
private String _serviceID;
|
||
private Date _date;
|
||
private String _serviceType;
|
||
private String _serviceAddress;
|
||
// collections
|
||
private Set _userSet;
|
||
private Set _scSet;
|
||
private Set _scassociationSet;
|
||
|
||
// constructors
|
||
public Partner() {
|
||
initialize();
|
||
}
|
||
|
||
/**
|
||
* Constructor for primary key
|
||
*/
|
||
public Partner(Integer _id) {
|
||
this.setId(_id);
|
||
initialize();
|
||
}
|
||
|
||
/**
|
||
* Constructor for required fields
|
||
*/
|
||
public Partner(Integer _id, boolean _active, String _partnerID, java.util.Date _date, String _serviceID, String _serviceType, String _serviceAddress) {
|
||
this.setId(_id);
|
||
this.setActive(_active);
|
||
this.setPartnerID(_partnerID);
|
||
this.setDate(_date);
|
||
this.setServiceID(_serviceID);
|
||
this.setServiceType(_serviceType);
|
||
this.setServiceAddress(_serviceAddress);
|
||
initialize();
|
||
}
|
||
|
||
protected void initialize() {
|
||
}
|
||
|
||
/**
|
||
* Return the unique identifier of this class @hibernate.id
|
||
* generator-class="vm" column="ID"
|
||
*/
|
||
public Integer getId() {
|
||
return _id;
|
||
}
|
||
|
||
/**
|
||
* Set the unique identifier of this class
|
||
*
|
||
* @param _id the new ID
|
||
*/
|
||
public void setId(Integer _id) {
|
||
this._id = _id;
|
||
}
|
||
|
||
/**
|
||
* Return the value associated with the column: active
|
||
*/
|
||
public boolean isActive() {
|
||
return _active;
|
||
}
|
||
|
||
/**
|
||
* Set the value related to the column: active
|
||
*
|
||
* @param _active the active value
|
||
*/
|
||
public void setActive(boolean _active) {
|
||
this._active = _active;
|
||
}
|
||
|
||
/**
|
||
* Return the value associated with the column: partnerID
|
||
*/
|
||
public String getPartnerID() {
|
||
return _partnerID;
|
||
}
|
||
|
||
/**
|
||
* Set the value related to the column: partnerID
|
||
*
|
||
* @param _partnerID the partnerID value
|
||
*/
|
||
public void setPartnerID(String _partnerID) {
|
||
this._partnerID = _partnerID;
|
||
}
|
||
|
||
/**
|
||
* Return the value associated with the column: date
|
||
*/
|
||
public java.util.Date getDate() {
|
||
return _date;
|
||
}
|
||
|
||
/**
|
||
* Set the value related to the column: date
|
||
*
|
||
* @param _date the date value
|
||
*/
|
||
public void setDate(java.util.Date _date) {
|
||
this._date = _date;
|
||
}
|
||
|
||
public String getServiceID() {
|
||
return _serviceID;
|
||
}
|
||
|
||
public void setServiceID(String _serviceID) {
|
||
this._serviceID = _serviceID;
|
||
}
|
||
|
||
/**
|
||
* Return the value associated with the column: serviceType
|
||
*/
|
||
public String getServiceType() {
|
||
return _serviceType;
|
||
}
|
||
|
||
/**
|
||
* Set the value related to the column: serviceType
|
||
*
|
||
* @param _serviceType the serviceType value
|
||
*/
|
||
public void setServiceType(String _serviceType) {
|
||
this._serviceType = _serviceType;
|
||
}
|
||
|
||
/**
|
||
* Return the value associated with the column: serviceAddress
|
||
*/
|
||
public String getServiceAddress() {
|
||
return _serviceAddress;
|
||
}
|
||
|
||
/**
|
||
* Set the value related to the column: serviceAddress
|
||
*
|
||
* @param _serviceAddress the serviceAddress value
|
||
*/
|
||
public void setServiceAddress(String _serviceAddress) {
|
||
this._serviceAddress = _serviceAddress;
|
||
}
|
||
|
||
/**
|
||
* Return the value associated with the column: UserSet
|
||
*/
|
||
public java.util.Set getUserSet() {
|
||
return this._userSet;
|
||
}
|
||
|
||
/**
|
||
* Set the value related to the column: UserSet
|
||
*
|
||
* @param _userSet the UserSet value
|
||
*/
|
||
public void setUserSet(java.util.Set _userSet) {
|
||
this._userSet = _userSet;
|
||
}
|
||
|
||
public void addToUserSet(Object obj) {
|
||
if (null == this._userSet) {
|
||
this._userSet = new java.util.HashSet();
|
||
}
|
||
this._userSet.add(obj);
|
||
}
|
||
|
||
/**
|
||
* Return the value associated with the column: ScSet
|
||
*/
|
||
public java.util.Set getScSet() {
|
||
return this._scSet;
|
||
}
|
||
|
||
/**
|
||
* Set the value related to the column: ScSet
|
||
*
|
||
* @param _scSet the ScSet value
|
||
*/
|
||
public void setScSet(java.util.Set _scSet) {
|
||
this._scSet = _scSet;
|
||
}
|
||
|
||
public void addToScSet(Object obj) {
|
||
if (null == this._scSet) {
|
||
this._scSet = new java.util.HashSet();
|
||
}
|
||
this._scSet.add(obj);
|
||
}
|
||
|
||
/**
|
||
* Return the value associated with the column: ScassociationSet
|
||
*/
|
||
public java.util.Set getScassociationSet() {
|
||
return this._scassociationSet;
|
||
}
|
||
|
||
/**
|
||
* Set the value related to the column: ScassociationSet
|
||
*
|
||
* @param _scassociationSet the ScassociationSet value
|
||
*/
|
||
public void setScassociationSet(java.util.Set _scassociationSet) {
|
||
this._scassociationSet = _scassociationSet;
|
||
}
|
||
|
||
public void addToScassociationSet(Object obj) {
|
||
if (null == this._scassociationSet) {
|
||
this._scassociationSet = new java.util.HashSet();
|
||
}
|
||
this._scassociationSet.add(obj);
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
return super.toString();
|
||
}
|
||
}
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/auth/User.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2008-2012 Université de Caen Basse-Normandie, GREYC
|
||
* Copyright © 2008-2013 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU General Public License as published by
|
||
... | ... | |
*/
|
||
package fr.unicaen.iota.auth;
|
||
|
||
import java.util.Date;
|
||
|
||
public class User {
|
||
|
||
public static String PROP_LOGIN = "Login";
|
||
public static String PROP_DATE = "Date";
|
||
public static String PROP_USER_I_D = "UserID";
|
||
public static String PROP_ID = "Id";
|
||
public static String PROP_PARTNER = "Partner";
|
||
public static String PROP_PASSWD = "Passwd";
|
||
// primary key
|
||
private Integer _id;
|
||
// fields
|
||
private String _passwd;
|
||
private String _userID;
|
||
private String _login;
|
||
private Date _date;
|
||
// many to one
|
||
private Partner _partner;
|
||
private String userID;
|
||
private String ownerID;
|
||
|
||
// constructors
|
||
public User() {
|
||
initialize();
|
||
}
|
||
|
||
/**
|
||
* Constructor for primary key
|
||
*/
|
||
public User(Integer _id) {
|
||
this.setId(_id);
|
||
initialize();
|
||
}
|
||
|
||
/**
|
||
* Constructor for required fields
|
||
*/
|
||
public User(Integer _id, Partner _partner, String _passwd, String _userID, String _login, Date _date) {
|
||
this.setId(_id);
|
||
this.setPartner(_partner);
|
||
this.setPasswd(_passwd);
|
||
this.setUserID(_userID);
|
||
this.setLogin(_login);
|
||
this.setDate(_date);
|
||
initialize();
|
||
public User(String userID, String ownerID) {
|
||
this.userID = userID;
|
||
this.ownerID = ownerID;
|
||
}
|
||
|
||
protected void initialize() {
|
||
public String getOwnerID() {
|
||
return ownerID;
|
||
}
|
||
|
||
public Integer getId() {
|
||
return _id;
|
||
}
|
||
|
||
public void setId(Integer _id) {
|
||
this._id = _id;
|
||
}
|
||
|
||
public String getPasswd() {
|
||
return _passwd;
|
||
}
|
||
|
||
public void setPasswd(String _passwd) {
|
||
this._passwd = _passwd;
|
||
public void setOwnerID(String ownerID) {
|
||
this.ownerID = ownerID;
|
||
}
|
||
|
||
public String getUserID() {
|
||
return _userID;
|
||
}
|
||
|
||
public void setUserID(String _userID) {
|
||
this._userID = _userID;
|
||
return userID;
|
||
}
|
||
|
||
public String getLogin() {
|
||
return _login;
|
||
public void setUserID(String userID) {
|
||
this.userID = userID;
|
||
}
|
||
|
||
public void setLogin(String _login) {
|
||
this._login = _login;
|
||
}
|
||
|
||
public java.util.Date getDate() {
|
||
return _date;
|
||
}
|
||
|
||
public void setDate(java.util.Date _date) {
|
||
this._date = _date;
|
||
}
|
||
|
||
public Partner getPartner() {
|
||
return this._partner;
|
||
}
|
||
|
||
public void setPartner(Partner _partner) {
|
||
this._partner = _partner;
|
||
}
|
||
|
||
@Override
|
||
public String toString() {
|
||
return super.toString();
|
||
}
|
||
}
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/utils/Constants.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2011-2013 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.utils;
|
||
|
||
import java.io.IOException;
|
||
import java.io.InputStream;
|
||
import java.util.Properties;
|
||
import org.apache.commons.logging.Log;
|
||
import org.apache.commons.logging.LogFactory;
|
||
|
||
public final class Constants {
|
||
|
||
private Constants() {
|
||
}
|
||
private static Log log = LogFactory.getLog(Constants.class);
|
||
public static final String YPSILON_ADDRESS;
|
||
public static final String PKS_FILENAME;
|
||
public static final String PKS_PASSWORD;
|
||
public static final String TRUST_PKS_FILENAME;
|
||
public static final String TRUST_PKS_PASSWORD;
|
||
|
||
|
||
static {
|
||
Properties properties = new Properties();
|
||
InputStream is = Constants.class.getClassLoader().getResourceAsStream("application.properties");
|
||
log.info("Chargement des propriétés de l'application");
|
||
|
||
try {
|
||
properties.load(is);
|
||
} catch (IOException ex) {
|
||
log.fatal(null, ex);
|
||
}
|
||
YPSILON_ADDRESS = properties.getProperty("ypsilon-url");
|
||
PKS_FILENAME = properties.getProperty("pks-filename", "privatekeys.jks");
|
||
PKS_PASSWORD = properties.getProperty("pks-password", "changeit");
|
||
TRUST_PKS_FILENAME = properties.getProperty("trust-pks-filename", "publickeys.jks");
|
||
TRUST_PKS_PASSWORD = properties.getProperty("trust-pks-password", "changeit");
|
||
}
|
||
|
||
}
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/utils/HTMLUtilities.java | ||
---|---|---|
private HTMLUtilities() {
|
||
}
|
||
|
||
public static String createPartnerSelect() {
|
||
public static String createOwnerSelect() {
|
||
StringBuilder res = new StringBuilder();
|
||
res.append("<select class=\"partnerSelector\" id=\"groupPartnerName\">");
|
||
for (String partnerId : listAllPartners()) {
|
||
res.append("<option label=\"partner: ");
|
||
res.append(partnerId);
|
||
res.append("<select class=\"ownerSelector\" id=\"groupOwnerName\">");
|
||
for (String ownerId : listAllOwners()) {
|
||
res.append("<option label=\"owner: ");
|
||
res.append(ownerId);
|
||
res.append("\" value=\"");
|
||
res.append(partnerId);
|
||
res.append(ownerId);
|
||
res.append("\">");
|
||
res.append(partnerId);
|
||
res.append(ownerId);
|
||
res.append("</option>");
|
||
}
|
||
res.append("</select>");
|
||
... | ... | |
return res.toString();
|
||
}
|
||
|
||
public static String createSelectEventClassFilter() {
|
||
public static String createSelectEventTypeFilter() {
|
||
StringBuilder res = new StringBuilder();
|
||
res.append("<select id=\"epcClassFilterName\" >");
|
||
res.append("<select id=\"eventTypeFilterName\" >");
|
||
for (String s : TYPES) {
|
||
res.append("<option value=\"");
|
||
res.append(s);
|
||
... | ... | |
return res.toString();
|
||
}
|
||
|
||
private static Iterable<String> listAllPartners() {
|
||
private static Iterable<String> listAllOwners() {
|
||
|
||
// TODO: TODOTODO !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||
|
||
List<String> partnerIdList = new ArrayList<String>();
|
||
partnerIdList.add("partner1");
|
||
partnerIdList.add("partner2");
|
||
partnerIdList.add("partner3");
|
||
partnerIdList.add("partner4");
|
||
partnerIdList.add("partner5");
|
||
List<String> ownerIdList = new ArrayList<String>();
|
||
ownerIdList.add("owner1");
|
||
ownerIdList.add("owner2");
|
||
ownerIdList.add("owner3");
|
||
ownerIdList.add("owner4");
|
||
ownerIdList.add("owner5");
|
||
|
||
return partnerIdList;
|
||
return ownerIdList;
|
||
}
|
||
|
||
private static Iterable<String> listAllMethods() {
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/utils/InterfaceHelper.java | ||
---|---|---|
// TODO @SLS public field!
|
||
public AccessPolicyManagerSession APMSession;
|
||
|
||
public InterfaceHelper(String partner) {
|
||
public InterfaceHelper(String owner) {
|
||
log.info("InterfaceHelper instanciated");
|
||
APMSession = MapSessions.APM.getInstance(partner);
|
||
APMSession = MapSessions.APM.getInstance(owner);
|
||
}
|
||
|
||
public void updateAPM() {
|
||
... | ... | |
|
||
public void reload() {
|
||
log.info("RELAOD DSPDP");
|
||
APMSession.initDSPDP(APMSession.getPartner());
|
||
APMSession.initDSPDP(APMSession.getOwner());
|
||
APMSession.initFinderModule();
|
||
}
|
||
}
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/utils/MapSessions.java | ||
---|---|---|
return res.toString();
|
||
}
|
||
|
||
public static synchronized InterfaceHelper getAPMSession(String sessionId, String partnerId) {
|
||
public static synchronized InterfaceHelper getAPMSession(String sessionId, String ownerId) {
|
||
if (APMSessions.containsKey(sessionId)) {
|
||
return APMSessions.get(sessionId);
|
||
} else {
|
||
InterfaceHelper IH = new InterfaceHelper(partnerId);
|
||
InterfaceHelper IH = new InterfaceHelper(ownerId);
|
||
APMSessions.put(sessionId, IH);
|
||
return IH;
|
||
}
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/utils/PEPRequester.java | ||
---|---|---|
|
||
public static int checkAccess(User user, String methodName) {
|
||
String userS = user.getUserID();
|
||
String partner = user.getPartner().getPartnerID();
|
||
String owner = user.getOwnerID();
|
||
ArrayList<String> args = new ArrayList<String>();
|
||
args.add(userS);
|
||
args.add(partner);
|
||
args.add(owner);
|
||
DSPEP dspep = new DSPEP();
|
||
return (Integer) runMethod(dspep, args.toArray(), methodName);
|
||
}
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/utils/SessionLoader.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2008-2012 Université de Caen Basse-Normandie, GREYC
|
||
* Copyright © 2008-2013 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU General Public License as published by
|
||
... | ... | |
*/
|
||
package fr.unicaen.iota.utils;
|
||
|
||
import fr.unicaen.iota.discovery.client.DsClient;
|
||
import fr.unicaen.iota.discovery.client.model.PartnerInfo;
|
||
import fr.unicaen.iota.discovery.client.model.UserInfo;
|
||
import fr.unicaen.iota.discovery.client.util.EnhancedProtocolException;
|
||
import java.rmi.RemoteException;
|
||
import fr.unicaen.iota.ypsilon.client.YPSilonClient;
|
||
import fr.unicaen.iota.ypsilon.client.model.UserInfoOut;
|
||
import fr.unicaen.iota.ypsilon.client.soap.ImplementationExceptionResponse;
|
||
import fr.unicaen.iota.ypsilon.client.soap.SecurityExceptionResponse;
|
||
import javax.servlet.http.HttpSession;
|
||
import org.apache.commons.logging.Log;
|
||
import org.apache.commons.logging.LogFactory;
|
||
... | ... | |
|
||
private SessionLoader() {
|
||
}
|
||
private static final Log log = LogFactory.getLog(SessionLoader.class);
|
||
private static final Log LOG = LogFactory.getLog(SessionLoader.class);
|
||
|
||
public static synchronized String loadSession(String sessionId, DsClient dsClient, String userId, HttpSession session) {
|
||
public static synchronized String loadSession(String sessionId, YPSilonClient ypsilonClient, String userId, HttpSession session) {
|
||
try {
|
||
UserInfo uInfo = dsClient.userInfo(sessionId, userId);
|
||
log.trace("#######################" + sessionId + " " + uInfo.getPartnerId());
|
||
PartnerInfo pInfo = dsClient.partnerInfo(sessionId, uInfo.getPartnerId());
|
||
UserInfoOut uInfo = ypsilonClient.userInfo(sessionId, userId);
|
||
session.setAttribute("uInfo", uInfo);
|
||
session.setAttribute("pInfo", pInfo);
|
||
session.setAttribute("session-id", sessionId);
|
||
} catch (EnhancedProtocolException ex) {
|
||
log.error(null, ex);
|
||
return "";
|
||
} catch (ImplementationExceptionResponse ex) {
|
||
LOG.error("An error occurred", ex);
|
||
return "?message=" + ex.getMessage();
|
||
} catch (SecurityExceptionResponse ex) {
|
||
LOG.error("A security error occurred", ex);
|
||
return "?message=" + ex.getMessage();
|
||
} catch (RemoteException e) {
|
||
log.error(null, e);
|
||
return "?message=Internal server error";
|
||
}
|
||
return "";
|
||
}
|
||
|
||
public static void clearSession(HttpSession session) {
|
||
session.setAttribute("session-id", null);
|
||
session.setAttribute("uInfo", null);
|
||
session.setAttribute("pInfo", null);
|
||
}
|
||
}
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/xacml/conf/Configuration.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2008-2012 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.xacml.conf;
|
||
|
||
import java.io.IOException;
|
||
import java.io.InputStream;
|
||
import java.util.Properties;
|
||
import org.apache.commons.logging.LogFactory;
|
||
|
||
/**
|
||
*
|
||
*/
|
||
public final class Configuration {
|
||
|
||
private Configuration() {
|
||
}
|
||
private static final String PROPERTIES_CONFIG_FILE = "/application.properties";
|
||
public static String DS_ADDRESS;
|
||
|
||
static {
|
||
try {
|
||
Properties props = loadProperties();
|
||
DS_ADDRESS = props.getProperty("ds-address");
|
||
} catch (IOException ex) {
|
||
LogFactory.getLog(Configuration.class).fatal(null, ex);
|
||
}
|
||
}
|
||
|
||
public static Properties loadProperties() throws IOException {
|
||
Properties props = new Properties();
|
||
InputStream in = Configuration.class.getClassLoader().getResourceAsStream(PROPERTIES_CONFIG_FILE);
|
||
props.load(in);
|
||
in.close();
|
||
return props;
|
||
}
|
||
}
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/xacml/ihm/NodeType.java | ||
---|---|---|
policyNode,
|
||
bizStepFilterNode,
|
||
epcFilterNode,
|
||
epcClassFilterNode,
|
||
eventTypeFilterNode,
|
||
eventTimeFilterNode,
|
||
methodFilterNode,
|
||
bizStepFilterGroupNode,
|
||
epcFilterGroupNode,
|
||
epcClassFilterGroupNode,
|
||
eventTypeFilterGroupNode,
|
||
eventTimeFilterGroupNode,
|
||
methodFilterGroupNode,
|
||
rulesNode,
|
||
... | ... | |
public boolean isFilter() {
|
||
return this == bizStepFilterNode
|
||
|| this == epcFilterNode
|
||
|| this == epcClassFilterNode
|
||
|| this == eventTypeFilterNode
|
||
|| this == eventTimeFilterNode
|
||
|| this == methodFilterNode;
|
||
}
|
||
... | ... | |
public boolean isFilterGroup() {
|
||
return this == bizStepFilterGroupNode
|
||
|| this == epcFilterGroupNode
|
||
|| this == epcClassFilterGroupNode
|
||
|| this == eventTypeFilterGroupNode
|
||
|| this == eventTimeFilterGroupNode
|
||
|| this == methodFilterGroupNode;
|
||
}
|
||
... | ... | |
public boolean isExpandable() {
|
||
return this == bizStepFilterGroupNode
|
||
|| this == epcFilterGroupNode
|
||
|| this == epcClassFilterGroupNode
|
||
|| this == eventTypeFilterGroupNode
|
||
|| this == eventTimeFilterGroupNode
|
||
|| this == policyNode
|
||
|| this == policiesNode
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/xacml/ihm/TreeFactory.java | ||
---|---|---|
return "BizStep Filters / default policy: ";
|
||
case epcFilterGroupNode:
|
||
return "EPC Filters / default policy: ";
|
||
case epcClassFilterGroupNode:
|
||
case eventTypeFilterGroupNode:
|
||
return "Event Class Filters / default policy: ";
|
||
case eventTimeFilterGroupNode:
|
||
return "Event Time Filters / default policy: ";
|
||
... | ... | |
return "bizStep filter: ";
|
||
case eventTimeFilterNode:
|
||
return "period filter: ";
|
||
case epcClassFilterNode:
|
||
case eventTypeFilterNode:
|
||
return "Event class filter: ";
|
||
case epcFilterNode:
|
||
return "EPC filter: ";
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/xacml/ihm/factory/AccessPolicies.java | ||
---|---|---|
public AccessPolicies() {
|
||
}
|
||
|
||
public AccessPolicies(String sessionId, String partner) {
|
||
this.createQueryPolicies(sessionId, partner);
|
||
this.createCapturePolicies(sessionId, partner);
|
||
this.createAdminPolicies(sessionId, partner);
|
||
public AccessPolicies(String sessionId, String owner) {
|
||
this.createQueryPolicies(sessionId, owner);
|
||
this.createCapturePolicies(sessionId, owner);
|
||
this.createAdminPolicies(sessionId, owner);
|
||
}
|
||
|
||
public AccessPolicies(String sessionId, String partner, Module module) {
|
||
public AccessPolicies(String sessionId, String owner, Module module) {
|
||
switch (module) {
|
||
case adminModule:
|
||
this.createAdminPolicies(sessionId, partner);
|
||
this.createAdminPolicies(sessionId, owner);
|
||
break;
|
||
case queryModule:
|
||
this.createQueryPolicies(sessionId, partner);
|
||
this.createQueryPolicies(sessionId, owner);
|
||
break;
|
||
case captureModule:
|
||
this.createCapturePolicies(sessionId, partner);
|
||
this.createCapturePolicies(sessionId, owner);
|
||
break;
|
||
}
|
||
}
|
||
|
||
private synchronized void createQueryPolicies(String sessionId, String partner) {
|
||
OwnerPolicies ownerPolicies = MapSessions.getAPMSession(sessionId, partner).APMSession.getQueryPolicy(partner);
|
||
private synchronized void createQueryPolicies(String sessionId, String owner) {
|
||
OwnerPolicies ownerPolicies = MapSessions.getAPMSession(sessionId, owner).APMSession.getQueryPolicy(owner);
|
||
Node policies = new Node("", NodeType.policiesNode, null, Module.queryModule, null);
|
||
if (ownerPolicies != null) {
|
||
for (Object ogp : ownerPolicies.getPolicies()) {
|
||
... | ... | |
}
|
||
filters.addChild(bizStepRuleTreeNode);
|
||
|
||
EpcClassRuleTreeNode epcClassRuleTreeNode = new EpcClassRuleTreeNode(gp.getEpcClassesFilterFunction(), gp.getId().toString(), Module.queryModule);
|
||
EventTypeRuleTreeNode eventTypeRuleTreeNode = new EventTypeRuleTreeNode(gp.getEventTypesFilterFunction(), gp.getId().toString(), Module.queryModule);
|
||
|
||
for (Object ob : gp.getEpcClasses()) {
|
||
for (Object ob : gp.getEventTypes()) {
|
||
String value = (String) ob;
|
||
EpcClassTreeNode treeNode = new EpcClassTreeNode(value, value, gp.getId().toString(), Module.queryModule);
|
||
epcClassRuleTreeNode.addChild(treeNode);
|
||
EventTypeTreeNode treeNode = new EventTypeTreeNode(value, value, gp.getId().toString(), Module.queryModule);
|
||
eventTypeRuleTreeNode.addChild(treeNode);
|
||
}
|
||
|
||
filters.addChild(epcClassRuleTreeNode);
|
||
filters.addChild(eventTypeRuleTreeNode);
|
||
|
||
EpcsRuleTreeNode epcRuleTreeNode = new EpcsRuleTreeNode(gp.getEpcsFilterFunction(), gp.getId().toString(), Module.queryModule);
|
||
|
||
... | ... | |
}
|
||
}
|
||
} else {
|
||
InterfaceHelper ih = MapSessions.getAPMSession(sessionId, partner);
|
||
ownerPolicies = new OwnerPolicies(partner, fr.unicaen.iota.xacml.policy.Module.queryModule);
|
||
InterfaceHelper ih = MapSessions.getAPMSession(sessionId, owner);
|
||
ownerPolicies = new OwnerPolicies(owner, fr.unicaen.iota.xacml.policy.Module.queryModule);
|
||
ih.APMSession.addQueryPolicy(ownerPolicies);
|
||
ih.APMSession.saveQueryPolicies(partner);
|
||
ih.APMSession.saveQueryPolicies(owner);
|
||
ih.updateAPM();
|
||
}
|
||
getPoliciesQuery().add(policies);
|
||
}
|
||
|
||
private synchronized void createCapturePolicies(String sessionId, String partner) {
|
||
OwnerPolicies ownerPolicies = MapSessions.getAPMSession(sessionId, partner).APMSession.getCapturePolicy(partner);
|
||
private synchronized void createCapturePolicies(String sessionId, String owner) {
|
||
OwnerPolicies ownerPolicies = MapSessions.getAPMSession(sessionId, owner).APMSession.getCapturePolicy(owner);
|
||
Node policies = new Node("", NodeType.policiesNode, null, Module.captureModule, null);
|
||
|
||
if (ownerPolicies != null) {
|
||
... | ... | |
}
|
||
filters.addChild(bizStepRuleTreeNode);
|
||
|
||
EpcClassRuleTreeNode epcClassRuleTreeNode = new EpcClassRuleTreeNode(gp.getEpcClassesFilterFunction(), gp.getId().toString(), Module.captureModule);
|
||
EventTypeRuleTreeNode eventTypeRuleTreeNode = new EventTypeRuleTreeNode(gp.getEventTypesFilterFunction(), gp.getId().toString(), Module.captureModule);
|
||
|
||
for (Object ob : gp.getEpcClasses()) {
|
||
for (Object ob : gp.getEventTypes()) {
|
||
String value = (String) ob;
|
||
EpcClassTreeNode treeNode = new EpcClassTreeNode(value, value, gp.getId().toString(), Module.captureModule);
|
||
epcClassRuleTreeNode.addChild(treeNode);
|
||
EventTypeTreeNode treeNode = new EventTypeTreeNode(value, value, gp.getId().toString(), Module.captureModule);
|
||
eventTypeRuleTreeNode.addChild(treeNode);
|
||
}
|
||
|
||
filters.addChild(epcClassRuleTreeNode);
|
||
filters.addChild(eventTypeRuleTreeNode);
|
||
|
||
EpcsRuleTreeNode epcRuleTreeNode = new EpcsRuleTreeNode(gp.getEpcsFilterFunction(), gp.getId().toString(), Module.captureModule);
|
||
|
||
... | ... | |
}
|
||
}
|
||
} else {
|
||
InterfaceHelper ih = MapSessions.getAPMSession(sessionId, partner);
|
||
ownerPolicies = new OwnerPolicies(partner, fr.unicaen.iota.xacml.policy.Module.captureModule);
|
||
InterfaceHelper ih = MapSessions.getAPMSession(sessionId, owner);
|
||
ownerPolicies = new OwnerPolicies(owner, fr.unicaen.iota.xacml.policy.Module.captureModule);
|
||
ih.APMSession.addCapturePolicy(ownerPolicies);
|
||
ih.APMSession.saveCapturePolicies(partner);
|
||
ih.APMSession.saveCapturePolicies(owner);
|
||
ih.updateAPM();
|
||
}
|
||
getPoliciesCapture().add(policies);
|
||
}
|
||
|
||
private synchronized void createAdminPolicies(String sessionId, String partner) {
|
||
OwnerPolicies ownerPolicies = MapSessions.getAPMSession(sessionId, partner).APMSession.getAdminPolicy(partner);
|
||
private synchronized void createAdminPolicies(String sessionId, String owner) {
|
||
OwnerPolicies ownerPolicies = MapSessions.getAPMSession(sessionId, owner).APMSession.getAdminPolicy(owner);
|
||
Node policies = new Node("", NodeType.policiesNode, null, Module.adminModule, null);
|
||
|
||
if (ownerPolicies != null) {
|
||
... | ... | |
}
|
||
}
|
||
} else {
|
||
InterfaceHelper ih = MapSessions.getAPMSession(sessionId, partner);
|
||
ownerPolicies = new OwnerPolicies(partner, fr.unicaen.iota.xacml.policy.Module.administrationModule);
|
||
InterfaceHelper ih = MapSessions.getAPMSession(sessionId, owner);
|
||
ownerPolicies = new OwnerPolicies(owner, fr.unicaen.iota.xacml.policy.Module.administrationModule);
|
||
ih.APMSession.addAdminPolicy(ownerPolicies);
|
||
ih.APMSession.saveAdminPolicies(partner);
|
||
ih.APMSession.saveAdminPolicies(owner);
|
||
ih.updateAPM();
|
||
}
|
||
getPoliciesAdmin().add(policies);
|
||
... | ... | |
}
|
||
filters.addChild(bizStepRuleTreeNode);
|
||
|
||
EpcClassRuleTreeNode epcClassRuleTreeNode = new EpcClassRuleTreeNode(gp.getEpcClassesFilterFunction(), gp.getId().toString(), module);
|
||
EventTypeRuleTreeNode eventTypeRuleTreeNode = new EventTypeRuleTreeNode(gp.getEventTypesFilterFunction(), gp.getId().toString(), module);
|
||
|
||
for (Object ob : gp.getEpcClasses()) {
|
||
for (Object ob : gp.getEventTypes()) {
|
||
String value = (String) ob;
|
||
EpcClassTreeNode treeNode = new EpcClassTreeNode(value, value, gp.getId().toString(), module);
|
||
epcClassRuleTreeNode.addChild(treeNode);
|
||
EventTypeTreeNode treeNode = new EventTypeTreeNode(value, value, gp.getId().toString(), module);
|
||
eventTypeRuleTreeNode.addChild(treeNode);
|
||
}
|
||
|
||
filters.addChild(epcClassRuleTreeNode);
|
||
filters.addChild(eventTypeRuleTreeNode);
|
||
|
||
EpcsRuleTreeNode epcRuleTreeNode = new EpcsRuleTreeNode(gp.getEpcsFilterFunction(), gp.getId().toString(), module);
|
||
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/xacml/ihm/factory/EpcClassRuleTreeNode.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2008-2012 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.xacml.ihm.factory;
|
||
|
||
import fr.unicaen.iota.xacml.cond.OneOrGlobalFunction;
|
||
import fr.unicaen.iota.xacml.ihm.Module;
|
||
import fr.unicaen.iota.xacml.policy.SCEPCClassRule;
|
||
|
||
/**
|
||
*
|
||
*/
|
||
public class EpcClassRuleTreeNode extends RuleTreeNode {
|
||
|
||
public EpcClassRuleTreeNode(OneOrGlobalFunction f, String gID, Module m) {
|
||
super(f, gID, m);
|
||
id = SCEPCClassRule.RULEFILTER;
|
||
}
|
||
}
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/xacml/ihm/factory/EpcClassTreeNode.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2008-2012 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.xacml.ihm.factory;
|
||
|
||
import fr.unicaen.iota.xacml.ihm.Module;
|
||
import fr.unicaen.iota.xacml.ihm.NodeType;
|
||
import fr.unicaen.iota.xacml.ihm.TreeNode;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
|
||
/**
|
||
*
|
||
*/
|
||
public class EpcClassTreeNode implements TreeNode {
|
||
|
||
private String value;
|
||
private String id;
|
||
private String groupID;
|
||
private Module module;
|
||
private List<TreeNode> children;
|
||
|
||
public EpcClassTreeNode(String v, String id, String gID, Module module) {
|
||
value = v;
|
||
this.id = id;
|
||
this.groupID = gID;
|
||
this.module = module;
|
||
this.children = new ArrayList<TreeNode>();
|
||
}
|
||
|
||
public String getValue() {
|
||
return value;
|
||
}
|
||
|
||
public void setValue(String value) {
|
||
this.value = value;
|
||
}
|
||
|
||
@Override
|
||
public String getLabel() {
|
||
return value;
|
||
}
|
||
|
||
@Override
|
||
public NodeType getNodeType() {
|
||
return NodeType.epcClassFilterNode;
|
||
}
|
||
|
||
@Override
|
||
public List<TreeNode> getChildren() {
|
||
return children;
|
||
}
|
||
|
||
@Override
|
||
public String getObjectID() {
|
||
return id;
|
||
}
|
||
|
||
@Override
|
||
public Module getModule() {
|
||
return module;
|
||
}
|
||
|
||
@Override
|
||
public String getGroupID() {
|
||
return groupID;
|
||
}
|
||
|
||
@Override
|
||
public void addChild(TreeNode child) {
|
||
children.add(child);
|
||
}
|
||
}
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/xacml/ihm/factory/EventTypeRuleTreeNode.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2008-2012 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.xacml.ihm.factory;
|
||
|
||
import fr.unicaen.iota.xacml.cond.OneOrGlobalFunction;
|
||
import fr.unicaen.iota.xacml.ihm.Module;
|
||
import fr.unicaen.iota.xacml.policy.SCEventTypeRule;
|
||
|
||
/**
|
||
*
|
||
*/
|
||
public class EventTypeRuleTreeNode extends RuleTreeNode {
|
||
|
||
public EventTypeRuleTreeNode(OneOrGlobalFunction f, String gID, Module m) {
|
||
super(f, gID, m);
|
||
id = SCEventTypeRule.RULEFILTER;
|
||
}
|
||
}
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/xacml/ihm/factory/EventTypeTreeNode.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2008-2012 Université de Caen Basse-Normandie, GREYC
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU 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 General Public License for more details.
|
||
* <http://www.gnu.org/licenses/>
|
||
*
|
||
* See AUTHORS for a list of contributors.
|
||
*/
|
||
package fr.unicaen.iota.xacml.ihm.factory;
|
||
|
||
import fr.unicaen.iota.xacml.ihm.Module;
|
||
import fr.unicaen.iota.xacml.ihm.NodeType;
|
||
import fr.unicaen.iota.xacml.ihm.TreeNode;
|
||
import java.util.ArrayList;
|
||
import java.util.List;
|
||
|
||
/**
|
||
*
|
||
*/
|
||
public class EventTypeTreeNode implements TreeNode {
|
||
|
||
private String value;
|
||
private String id;
|
||
private String groupID;
|
||
private Module module;
|
||
private List<TreeNode> children;
|
||
|
||
public EventTypeTreeNode(String v, String id, String gID, Module module) {
|
||
value = v;
|
||
this.id = id;
|
||
this.groupID = gID;
|
||
this.module = module;
|
||
this.children = new ArrayList<TreeNode>();
|
||
}
|
||
|
||
public String getValue() {
|
||
return value;
|
||
}
|
||
|
||
public void setValue(String value) {
|
||
this.value = value;
|
||
}
|
||
|
||
@Override
|
||
public String getLabel() {
|
||
return value;
|
||
}
|
||
|
||
@Override
|
||
public NodeType getNodeType() {
|
||
return NodeType.eventTypeFilterNode;
|
||
}
|
||
|
||
@Override
|
||
public List<TreeNode> getChildren() {
|
||
return children;
|
||
}
|
||
|
||
@Override
|
||
public String getObjectID() {
|
||
return id;
|
||
}
|
||
|
||
@Override
|
||
public Module getModule() {
|
||
return module;
|
||
}
|
||
|
||
@Override
|
||
public String getGroupID() {
|
||
return groupID;
|
||
}
|
||
|
||
@Override
|
||
public void addChild(TreeNode child) {
|
||
children.add(child);
|
||
}
|
||
}
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/xacml/ihm/factory/Policies.java | ||
---|---|---|
rule2.addChild(filter21);
|
||
rule2.addChild(filter22);
|
||
|
||
Node rule3 = new Node("DROP", NodeType.epcClassFilterGroupNode, null, Module.queryModule, "id_group_query_1");
|
||
Node rule3 = new Node("DROP", NodeType.eventTypeFilterGroupNode, null, Module.queryModule, "id_group_query_1");
|
||
Node rule4 = new Node("DROP", NodeType.eventTimeFilterGroupNode, null, Module.queryModule, "id_group_query_1");
|
||
|
||
filters.addChild(rule1);
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/xacml/ihm/factory/RuleTreeNode.java | ||
---|---|---|
public NodeType getNodeType() {
|
||
if (SCBizStepRule.RULEFILTER.equals(id)) {
|
||
return NodeType.bizStepFilterGroupNode;
|
||
} else if (SCEPCClassRule.RULEFILTER.equals(id)) {
|
||
return NodeType.epcClassFilterGroupNode;
|
||
} else if (SCEventTypeRule.RULEFILTER.equals(id)) {
|
||
return NodeType.eventTypeFilterGroupNode;
|
||
} else if (SCEPCsRule.RULEFILTER.equals(id)) {
|
||
return NodeType.epcFilterGroupNode;
|
||
} else if (SCEventTimeRule.RULEFILTER.equals(id)) {
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/xacml/ihm/test/AdminModuleClient.java | ||
---|---|---|
public class AdminModuleClient extends javax.swing.JFrame {
|
||
|
||
private static final Log log = LogFactory.getLog(AdminModuleClient.class);
|
||
private String partnerName;
|
||
private String ownerName;
|
||
|
||
/**
|
||
* Creates new form CaptureModule
|
||
*/
|
||
public AdminModuleClient(String partnerName) {
|
||
this.partnerName = partnerName;
|
||
public AdminModuleClient(String ownerName) {
|
||
this.ownerName = ownerName;
|
||
initComponents();
|
||
this.setLocationRelativeTo(null);
|
||
}
|
||
... | ... | |
sendButton = new javax.swing.JButton();
|
||
actionComboBox = new javax.swing.JComboBox();
|
||
userField = new javax.swing.JTextField();
|
||
partnerField = new javax.swing.JTextField();
|
||
ownerField = new javax.swing.JTextField();
|
||
|
||
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
|
||
jLabel1.setText("Admin Module");
|
||
jLabel2.setText("User: ");
|
||
jLabel3.setText("Partner: ");
|
||
jLabel3.setText("Owner: ");
|
||
jLabel8.setText("Action: ");
|
||
sendButton.setText("Send");
|
||
sendButton.addActionListener(new java.awt.event.ActionListener() {
|
||
|
||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||
InterfaceHelper IH = new InterfaceHelper(partnerName);
|
||
InterfaceHelper IH = new InterfaceHelper(ownerName);
|
||
IH.reload();
|
||
sendButtonActionPerformed(evt);
|
||
}
|
||
... | ... | |
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||
getContentPane().setLayout(layout);
|
||
layout.setHorizontalGroup(
|
||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jLabel3)).addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jLabel2)).addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jLabel8))).addGap(20, 20, 20).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(userField, javax.swing.GroupLayout.DEFAULT_SIZE, 231, Short.MAX_VALUE).addComponent(partnerField, javax.swing.GroupLayout.DEFAULT_SIZE, 231, Short.MAX_VALUE).addComponent(actionComboBox, 0, 231, Short.MAX_VALUE).addComponent(jLabel1))).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap(273, Short.MAX_VALUE).addComponent(sendButton))).addContainerGap()));
|
||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jLabel3)).addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jLabel2)).addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jLabel8))).addGap(20, 20, 20).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(userField, javax.swing.GroupLayout.DEFAULT_SIZE, 231, Short.MAX_VALUE).addComponent(ownerField, javax.swing.GroupLayout.DEFAULT_SIZE, 231, Short.MAX_VALUE).addComponent(actionComboBox, 0, 231, Short.MAX_VALUE).addComponent(jLabel1))).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap(273, Short.MAX_VALUE).addComponent(sendButton))).addContainerGap()));
|
||
layout.setVerticalGroup(
|
||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addComponent(jLabel1).addGap(12, 12, 12).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(userField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel2)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(partnerField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel3)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(actionComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel8)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(sendButton).addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
|
||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addComponent(jLabel1).addGap(12, 12, 12).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(userField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel2)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(ownerField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel3)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(actionComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel8)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(sendButton).addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
|
||
|
||
pack();
|
||
}
|
||
... | ... | |
String action = (String) actionComboBox.getSelectedItem();
|
||
ArrayList args = new ArrayList();
|
||
args.add(userField.getText());
|
||
args.add(partnerField.getText());
|
||
args.add(ownerField.getText());
|
||
try {
|
||
DSPEP dspep = new DSPEP();
|
||
int response = (Integer) runMethod(dspep, args.toArray(), action);
|
||
... | ... | |
|
||
@Override
|
||
public void run() {
|
||
String partner = "anonymous";
|
||
new AdminModuleClient(partner).setVisible(true);
|
||
String owner = "anonymous";
|
||
new AdminModuleClient(owner).setVisible(true);
|
||
}
|
||
});
|
||
}
|
||
... | ... | |
private javax.swing.JLabel jLabel2;
|
||
private javax.swing.JLabel jLabel3;
|
||
private javax.swing.JLabel jLabel8;
|
||
private javax.swing.JTextField partnerField;
|
||
private javax.swing.JTextField ownerField;
|
||
private javax.swing.JButton sendButton;
|
||
private javax.swing.JTextField userField;
|
||
}
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/xacml/ihm/test/CaptureModule.form | ||
---|---|---|
</Properties>
|
||
<SyntheticProperties>
|
||
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
||
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
|
||
</SyntheticProperties>
|
||
<AuxValues>
|
||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||
... | ... | |
</Group>
|
||
<EmptySpace min="-2" pref="20" max="-2" attributes="0"/>
|
||
<Group type="103" groupAlignment="0" attributes="0">
|
||
<Component id="userField" alignment="0" pref="231" max="32767" attributes="0"/>
|
||
<Component id="partnerField" alignment="0" pref="231" max="32767" attributes="0"/>
|
||
<Component id="actionComboBox" alignment="0" pref="231" max="32767" attributes="0"/>
|
||
<Component id="userField" alignment="0" pref="239" max="32767" attributes="0"/>
|
||
<Component id="ownerField" alignment="0" pref="239" max="32767" attributes="0"/>
|
||
<Component id="actionComboBox" alignment="0" pref="239" max="32767" attributes="0"/>
|
||
<Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||
</Group>
|
||
</Group>
|
||
... | ... | |
</Group>
|
||
<EmptySpace max="-2" attributes="0"/>
|
||
<Group type="103" groupAlignment="3" attributes="0">
|
||
<Component id="partnerField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||
<Component id="ownerField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
|
||
</Group>
|
||
<EmptySpace max="-2" attributes="0"/>
|
||
... | ... | |
</Component>
|
||
<Component class="javax.swing.JLabel" name="jLabel3">
|
||
<Properties>
|
||
<Property name="text" type="java.lang.String" value="Partner: "/>
|
||
<Property name="text" type="java.lang.String" value="Owner:"/>
|
||
</Properties>
|
||
</Component>
|
||
<Component class="javax.swing.JLabel" name="jLabel8">
|
||
... | ... | |
</Component>
|
||
<Component class="javax.swing.JTextField" name="userField">
|
||
</Component>
|
||
<Component class="javax.swing.JTextField" name="partnerField">
|
||
<Component class="javax.swing.JTextField" name="ownerField">
|
||
</Component>
|
||
</SubComponents>
|
||
</Form>
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/xacml/ihm/test/CaptureModule.java | ||
---|---|---|
sendButton = new javax.swing.JButton();
|
||
actionComboBox = new javax.swing.JComboBox();
|
||
userField = new javax.swing.JTextField();
|
||
partnerField = new javax.swing.JTextField();
|
||
ownerField = new javax.swing.JTextField();
|
||
|
||
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
|
||
|
||
... | ... | |
|
||
jLabel2.setText("User: ");
|
||
|
||
jLabel3.setText("Partner: ");
|
||
jLabel3.setText("Owner:");
|
||
|
||
jLabel8.setText("Action: ");
|
||
|
||
... | ... | |
layout.setHorizontalGroup(
|
||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||
.addGroup(layout.createSequentialGroup()
|
||
.addContainerGap()
|
||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||
.addGroup(layout.createSequentialGroup()
|
||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||
.addGroup(layout.createSequentialGroup()
|
||
.addContainerGap()
|
||
.addComponent(jLabel3))
|
||
.addGroup(layout.createSequentialGroup()
|
||
.addContainerGap()
|
||
.addComponent(jLabel2))
|
||
.addGroup(layout.createSequentialGroup()
|
||
.addContainerGap()
|
||
.addComponent(jLabel8)))
|
||
.addComponent(jLabel3)
|
||
.addComponent(jLabel2)
|
||
.addComponent(jLabel8))
|
||
.addGap(20, 20, 20)
|
||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||
.addComponent(userField, javax.swing.GroupLayout.DEFAULT_SIZE, 231, Short.MAX_VALUE)
|
||
.addComponent(partnerField, javax.swing.GroupLayout.DEFAULT_SIZE, 231, Short.MAX_VALUE)
|
||
.addComponent(actionComboBox, 0, 231, Short.MAX_VALUE)
|
||
.addComponent(userField, javax.swing.GroupLayout.DEFAULT_SIZE, 239, Short.MAX_VALUE)
|
||
.addComponent(ownerField, javax.swing.GroupLayout.DEFAULT_SIZE, 239, Short.MAX_VALUE)
|
||
.addComponent(actionComboBox, 0, 239, Short.MAX_VALUE)
|
||
.addComponent(jLabel1)))
|
||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||
.addContainerGap(273, Short.MAX_VALUE)
|
||
.addGap(0, 261, Short.MAX_VALUE)
|
||
.addComponent(sendButton)))
|
||
.addContainerGap())
|
||
);
|
||
... | ... | |
.addComponent(jLabel2))
|
||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||
.addComponent(partnerField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||
.addComponent(ownerField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||
.addComponent(jLabel3))
|
||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||
... | ... | |
private javax.swing.JLabel jLabel2;
|
||
private javax.swing.JLabel jLabel3;
|
||
private javax.swing.JLabel jLabel8;
|
||
private javax.swing.JTextField partnerField;
|
||
private javax.swing.JTextField ownerField;
|
||
private javax.swing.JButton sendButton;
|
||
private javax.swing.JTextField userField;
|
||
// End of variables declaration//GEN-END:variables
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/xacml/ihm/test/CaptureModuleClient.java | ||
---|---|---|
public class CaptureModuleClient extends javax.swing.JFrame {
|
||
|
||
private static final Log log = LogFactory.getLog(CaptureModuleClient.class);
|
||
private String partnerName;
|
||
private String ownerName;
|
||
|
||
public CaptureModuleClient(String partnerName) {
|
||
this.partnerName = partnerName;
|
||
public CaptureModuleClient(String ownerName) {
|
||
this.ownerName = ownerName;
|
||
initComponents();
|
||
this.setLocationRelativeTo(null);
|
||
}
|
||
... | ... | |
sendButton = new javax.swing.JButton();
|
||
actionComboBox = new javax.swing.JComboBox();
|
||
userField = new javax.swing.JTextField();
|
||
partnerField = new javax.swing.JTextField();
|
||
ownerField = new javax.swing.JTextField();
|
||
epcField = new javax.swing.JTextField();
|
||
epcClassField = new javax.swing.JTextField();
|
||
eventTypeField = new javax.swing.JTextField();
|
||
bizStepField = new javax.swing.JTextField();
|
||
eventTimeDayBox = new javax.swing.JComboBox();
|
||
eventTimeMonthBox = new javax.swing.JComboBox();
|
||
... | ... | |
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
|
||
jLabel1.setText("Capture Module");
|
||
jLabel2.setText("User: ");
|
||
jLabel3.setText("Partner: ");
|
||
jLabel3.setText("Owner: ");
|
||
jLabel4.setText("EPC: ");
|
||
jLabel5.setText("EPCClass: ");
|
||
jLabel5.setText("EventType: ");
|
||
jLabel6.setText("BizStep: ");
|
||
jLabel7.setText("EventTime: ");
|
||
jLabel8.setText("Action: ");
|
||
... | ... | |
|
||
@Override
|
||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||
InterfaceHelper IH = new InterfaceHelper(partnerName);
|
||
InterfaceHelper IH = new InterfaceHelper(ownerName);
|
||
IH.reload();
|
||
sendButtonActionPerformed(evt);
|
||
}
|
||
... | ... | |
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||
getContentPane().setLayout(layout);
|
||
layout.setHorizontalGroup(
|
||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jLabel2).addComponent(jLabel3).addComponent(jLabel8).addComponent(jLabel4).addComponent(jLabel5).addComponent(jLabel6).addComponent(jLabel7)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addComponent(eventTimeDayBox, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(eventTimeMonthBox, 0, 51, Short.MAX_VALUE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(eventTimeYearBox, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)).addComponent(userField, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE).addComponent(partnerField, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE).addComponent(actionComboBox, 0, 212, Short.MAX_VALUE).addComponent(epcField, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE).addComponent(epcClassField, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE).addComponent(bizStepField, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE).addComponent(jLabel1))).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap(254, Short.MAX_VALUE).addComponent(sendButton))).addContainerGap()));
|
||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jLabel2).addComponent(jLabel3).addComponent(jLabel8).addComponent(jLabel4).addComponent(jLabel5).addComponent(jLabel6).addComponent(jLabel7)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addComponent(eventTimeDayBox, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(eventTimeMonthBox, 0, 51, Short.MAX_VALUE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(eventTimeYearBox, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)).addComponent(userField, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE).addComponent(ownerField, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE).addComponent(actionComboBox, 0, 212, Short.MAX_VALUE).addComponent(epcField, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE).addComponent(eventTypeField, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE).addComponent(bizStepField, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE).addComponent(jLabel1))).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap(254, Short.MAX_VALUE).addComponent(sendButton))).addContainerGap()));
|
||
layout.setVerticalGroup(
|
||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addComponent(jLabel1).addGap(12, 12, 12).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel2).addComponent(userField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(partnerField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel3)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(actionComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel8)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(epcField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel4)).addGap(7, 7, 7).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(epcClassField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel5)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(bizStepField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel6)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel7).addComponent(eventTimeDayBox, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(eventTimeYearBox, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(eventTimeMonthBox, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(sendButton).addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
|
||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addComponent(jLabel1).addGap(12, 12, 12).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel2).addComponent(userField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(ownerField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel3)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(actionComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel8)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(epcField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel4)).addGap(7, 7, 7).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(eventTypeField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel5)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(bizStepField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel6)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel7).addComponent(eventTimeDayBox, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(eventTimeYearBox, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(eventTimeMonthBox, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(sendButton).addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
|
||
|
||
pack();
|
||
}
|
||
... | ... | |
ArrayList args = new ArrayList();
|
||
args.add(MapSessions.APM);
|
||
args.add(userField.getText());
|
||
args.add(partnerField.getText());
|
||
args.add(ownerField.getText());
|
||
if (!"hello".equals(action)) {
|
||
XACMLDSEvent xacmldse = new XACMLDSEvent(partnerField.getText(), bizStepField.getText(), epcField.getText(), epcClassField.getText(), eventTime);
|
||
XACMLDSEvent xacmldse = new XACMLDSEvent(ownerField.getText(), bizStepField.getText(), epcField.getText(), eventTypeField.getText(), eventTime);
|
||
args.add(xacmldse);
|
||
}
|
||
try {
|
||
... | ... | |
|
||
@Override
|
||
public void run() {
|
||
String partner = "partnerDeTest";
|
||
new CaptureModuleClient(partner).setVisible(true);
|
||
String owner = "ownerDeTest";
|
||
new CaptureModuleClient(owner).setVisible(true);
|
||
}
|
||
});
|
||
}
|
||
// Variables declaration - do not modify
|
||
private javax.swing.JComboBox actionComboBox;
|
||
private javax.swing.JTextField bizStepField;
|
||
private javax.swing.JTextField epcClassField;
|
||
private javax.swing.JTextField eventTypeField;
|
||
private javax.swing.JTextField epcField;
|
||
private javax.swing.JComboBox eventTimeDayBox;
|
||
private javax.swing.JComboBox eventTimeMonthBox;
|
||
... | ... | |
private javax.swing.JLabel jLabel6;
|
||
private javax.swing.JLabel jLabel7;
|
||
private javax.swing.JLabel jLabel8;
|
||
private javax.swing.JTextField partnerField;
|
||
private javax.swing.JTextField ownerField;
|
||
private javax.swing.JButton sendButton;
|
||
private javax.swing.JTextField userField;
|
||
// End of variables declaration
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/xacml/ihm/test/QueryModuleClient.java | ||
---|---|---|
public class QueryModuleClient extends javax.swing.JFrame {
|
||
|
||
private static final Log log = LogFactory.getLog(QueryModuleClient.class);
|
||
private String partnerName;
|
||
private String ownerName;
|
||
|
||
public QueryModuleClient(String partnerName) {
|
||
this.partnerName = partnerName;
|
||
public QueryModuleClient(String ownerName) {
|
||
this.ownerName = ownerName;
|
||
initComponents();
|
||
this.setLocationRelativeTo(null);
|
||
}
|
||
... | ... | |
sendButton = new javax.swing.JButton();
|
||
actionComboBox = new javax.swing.JComboBox();
|
||
userField = new javax.swing.JTextField();
|
||
partnerField = new javax.swing.JTextField();
|
||
ownerField = new javax.swing.JTextField();
|
||
epcField = new javax.swing.JTextField();
|
||
epcClassField = new javax.swing.JTextField();
|
||
eventTypeField = new javax.swing.JTextField();
|
||
bizStepField = new javax.swing.JTextField();
|
||
eventTimeDayBox = new javax.swing.JComboBox();
|
||
eventTimeMonthBox = new javax.swing.JComboBox();
|
||
... | ... | |
|
||
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
|
||
jLabel1.setText("Query Module");
|
||
jLabel2.setText("Partner: ");
|
||
jLabel2.setText("Owner: ");
|
||
jLabel3.setText("Owner Partner: ");
|
||
jLabel4.setText("EPC: ");
|
||
jLabel5.setText("EPCClass: ");
|
||
jLabel5.setText("EventType: ");
|
||
jLabel6.setText("BizStep: ");
|
||
jLabel7.setText("EventTime: ");
|
||
jLabel8.setText("Action: ");
|
||
... | ... | |
|
||
@Override
|
||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||
InterfaceHelper IH = new InterfaceHelper(partnerName);
|
||
InterfaceHelper IH = new InterfaceHelper(ownerName);
|
||
IH.reload();
|
||
sendButtonActionPerformed(evt);
|
||
}
|
||
... | ... | |
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||
getContentPane().setLayout(layout);
|
||
layout.setHorizontalGroup(
|
||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jLabel2).addComponent(jLabel3).addComponent(jLabel8).addComponent(jLabel4).addComponent(jLabel5).addComponent(jLabel6).addComponent(jLabel7)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addComponent(eventTimeDayBox, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(eventTimeMonthBox, 0, 51, Short.MAX_VALUE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(eventTimeYearBox, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)).addComponent(userField, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE).addComponent(partnerField, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE).addComponent(actionComboBox, 0, 212, Short.MAX_VALUE).addComponent(epcField, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE).addComponent(epcClassField, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE).addComponent(bizStepField, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE).addComponent(jLabel1))).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap(254, Short.MAX_VALUE).addComponent(sendButton))).addContainerGap()));
|
||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jLabel2).addComponent(jLabel3).addComponent(jLabel8).addComponent(jLabel4).addComponent(jLabel5).addComponent(jLabel6).addComponent(jLabel7)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addComponent(eventTimeDayBox, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(eventTimeMonthBox, 0, 51, Short.MAX_VALUE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(eventTimeYearBox, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)).addComponent(userField, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE).addComponent(ownerField, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE).addComponent(actionComboBox, 0, 212, Short.MAX_VALUE).addComponent(epcField, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE).addComponent(eventTypeField, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE).addComponent(bizStepField, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE).addComponent(jLabel1))).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap(254, Short.MAX_VALUE).addComponent(sendButton))).addContainerGap()));
|
||
layout.setVerticalGroup(
|
||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addComponent(jLabel1).addGap(12, 12, 12).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel2).addComponent(userField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(partnerField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel3)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(actionComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel8)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(epcField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel4)).addGap(7, 7, 7).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(epcClassField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel5)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(bizStepField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel6)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel7).addComponent(eventTimeDayBox, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(eventTimeYearBox, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(eventTimeMonthBox, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(sendButton).addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
|
||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addComponent(jLabel1).addGap(12, 12, 12).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel2).addComponent(userField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(ownerField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel3)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(actionComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel8)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(epcField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel4)).addGap(7, 7, 7).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(eventTypeField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel5)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(bizStepField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel6)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel7).addComponent(eventTimeDayBox, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(eventTimeYearBox, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(eventTimeMonthBox, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(sendButton).addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
|
||
|
||
pack();
|
||
}
|
||
... | ... | |
ArrayList args = new ArrayList();
|
||
args.add(MapSessions.APM);
|
||
args.add(userField.getText());
|
||
args.add(partnerField.getText());
|
||
if (!"hello".equals(action) && !"partnerInfo".equals(action)) {
|
||
XACMLDSEvent xacmldse = new XACMLDSEvent(partnerField.getText(), bizStepField.getText(), epcField.getText(), epcClassField.getText(), eventTime);
|
||
args.add(ownerField.getText());
|
||
if (!"hello".equals(action)) {
|
||
XACMLDSEvent xacmldse = new XACMLDSEvent(ownerField.getText(), bizStepField.getText(), epcField.getText(), eventTypeField.getText(), eventTime);
|
||
args.add(xacmldse);
|
||
}
|
||
try {
|
||
... | ... | |
|
||
@Override
|
||
public void run() {
|
||
String partner = "anonymous";
|
||
new QueryModuleClient(partner).setVisible(true);
|
||
String owner = "anonymous";
|
||
new QueryModuleClient(owner).setVisible(true);
|
||
}
|
||
});
|
||
}
|
||
// Variables declaration - do not modify
|
||
private javax.swing.JComboBox actionComboBox;
|
||
private javax.swing.JTextField bizStepField;
|
||
private javax.swing.JTextField epcClassField;
|
||
private javax.swing.JTextField eventTypeField;
|
||
private javax.swing.JTextField epcField;
|
||
private javax.swing.JComboBox eventTimeDayBox;
|
||
private javax.swing.JComboBox eventTimeMonthBox;
|
||
... | ... | |
private javax.swing.JLabel jLabel6;
|
||
private javax.swing.JLabel jLabel7;
|
||
private javax.swing.JLabel jLabel8;
|
||
private javax.swing.JTextField partnerField;
|
||
private javax.swing.JTextField ownerField;
|
||
private javax.swing.JButton sendButton;
|
||
private javax.swing.JTextField userField;
|
||
// End of variables declaration
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/xacml/ihm/test/TestPEP.java | ||
---|---|---|
|
||
public static void main(String[] args) {
|
||
// DSPEP dspep = InterfaceHelper.APM.getDspep();
|
||
// XACMLResponse res = dspep.hello(InterfaceHelper.APM, "partner2", "PartnerDeTest");
|
||
// XACMLResponse res = dspep.hello(InterfaceHelper.APM, "owner2", "OwnerDeTest");
|
||
// System.out.println(res.toString());
|
||
}
|
||
}
|
DSeTa/DiscoveryPHI/src/main/java/fr/unicaen/iota/xacml/pep/DSPEP.java | ||
---|---|---|
//################## Authentication ##################
|
||
//####################################################
|
||
@Override
|
||
public int hello(String user, String partner) {
|
||
EventRequest eventRequest = new EventRequest(user, "hello", partner, Module.administrationModule.getValue());
|
||
public int hello(String user, String owner) {
|
||
EventRequest eventRequest = new EventRequest(user, "hello", owner, Module.administrationModule.getValue());
|
||
RequestCtx request = eventRequest.createRequest();
|
||
ResponseCtx result = MapSessions.APM.evaluate(request);
|
||
return processResult(result);
|
||
}
|
||
|
||
@Override
|
||
public int userLookup(String user, String partner) {
|
||
EventRequest eventRequest = new EventRequest(user, "userLookup", partner, Module.administrationModule.getValue());
|
||
public int userLookup(String user, String owner) {
|
||
EventRequest eventRequest = new EventRequest(user, "userLookup", owner, Module.administrationModule.getValue());
|
||
RequestCtx request = eventRequest.createRequest();
|
||
ResponseCtx result = MapSessions.APM.evaluate(request);
|
||
return processResult(result);
|
||
}
|
||
|
||
@Override
|
||
public int userCreate(String user, String partner) {
|
||
EventRequest eventRequest = new EventRequest(user, "userCreate", partner, Module.administrationModule.getValue());
|
||
public int userCreate(String user, String owner) {
|
||
EventRequest eventRequest = new EventRequest(user, "userCreate", owner, Module.administrationModule.getValue());
|
||
RequestCtx request = eventRequest.createRequest();
|
||
ResponseCtx result = MapSessions.APM.evaluate(request);
|
||
return processResult(result);
|
||
}
|
||
|
||
@Override
|
||
public int userInfo(String user, String partner) {
|
||
EventRequest eventRequest = new EventRequest(user, "userInfo", partner, Module.administrationModule.getValue());
|
||
public int userInfo(String user, String owner) {
|
||
EventRequest eventRequest = new EventRequest(user, "userInfo", owner, Module.administrationModule.getValue());
|
||
RequestCtx request = eventRequest.createRequest();
|
||
ResponseCtx result = MapSessions.APM.evaluate(request);
|
||
return processResult(result);
|
||
}
|
||
|
||
@Override
|
||
public int userUpdate(String user, String partner) {
|
||
EventRequest eventRequest = new EventRequest(user, "userUpdate", partner, Module.administrationModule.getValue());
|
||
public int userUpdate(String user, String owner) {
|
||
EventRequest eventRequest = new EventRequest(user, "userUpdate", owner, Module.administrationModule.getValue());
|
||
RequestCtx request = eventRequest.createRequest();
|
||
ResponseCtx result = MapSessions.APM.evaluate(request);
|
||
return processResult(result);
|
||
}
|
Formats disponibles : Unified diff
Version 2.0
- upgrades Apache CXF to 2.7.5
- upgrades Apache ActiveMQ to 5.8.0
- license LGPL-3 for client libraries
- a few bugs fixed!
- use Apache CXF
- use JMS to store events to publish
- uses GaMMa for event mapping with OpenLayers
- "trace" and "DS" services are fully functionnal
- uses YPSilon
- access to the web interface of policy management is made by
certificate
- adds the MasterData to the web interface of policy management
- retrieves the owner of MasterData in the attributes if missing from
the extensions
- removes calls to old CXF classes to avoid compatibility problems
- installs and configures the new DS and DSeTa
- adds GaMMa to LaMBDa
- upgrades Apache Tomcat to 7.0.41 and mysql-connector to 5.1.25