Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
Added code to find available server ports.
Also added a trust manager that always trusts certificates.
Made trust manager private so we can allocate new ones in the future,
if we decide it isn't safe to re-use the same one over and over.
Modified test code to allocate a port rather than assuming 8180 was
not in use. Also modified retry parameters in other tests.
Added another allocPort() that takes an IP address and then modified
the other two to use that so the code does not have to be duplicated,
while providing more functionality.
Change-Id: I08cf18d923af46b1310d8496498bb1d4a0690b6e
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Classes that implement ParameterGroup all have to add their own
name and validate() fields and methods. Added an "impl" class that
provides the standard functionality and modified subclasses to use
it.
Change-Id: Ic6ee1607fb4fe7164a4e1eeebc480ea7d1e7e4d7
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
Modified the ParameterValidator to support new NotNull and NotBlank
annotations indicating that a field should not be null or blank.
These annotations can be made at class level or individual field level.
Moved annotations to their own subdirectory.
Added a comment to a method.
Extracted constant strings.
Moved one annotation to the subclass level.
Added support for "Min" annotation.
Propagate validation errors up from nested items. Apply
field-level validations, even when field is a ParameterGroup.
Change-Id: Ic90df55487dc5db7b7b0be5397624d1957904a81
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
Removed PropertyConfiguration class, as it has been replaced by the
BeanConfigurator class.
Change-Id: If97a74fe81875d3eb85d7775ce78a7f2b1fb1f70
Issue-ID: POLICY-1444
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
1) Adding TopicSinkClient class for sending messages to topic. The same
class will be used for PAP->PDP & PDP->PAP communication.
2) Once this review is through, will raise another one to remove
PdpClient from policy/pap.
Change-Id: I7253683d9e88885cfbe2ac9041d01da239b9321b
Issue-ID: POLICY-1443
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
|
|
|
|
Refactored PropertyConfiguration, but left the original class alone
until references to it have been removed from other policy repos.
Split the Property annotation out into its own file. Cloned the
remaining code into BeanConfigurator, modifying its behavior so that,
instead of operating on its own subclass, it operates on a provided bean.
Also added an ability to copy the bean's fields to a Properties object.
Updated license dates.
Removed unneeded argument from functional interface.
Added comment about always checking default values.
Updated a few comments.
Change-Id: Iff36fd0524032d7630f9ee08f0eef7b05de100d1
Issue-ID: POLICY-1444
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Change-Id: I0d718ace3099bfa33508b11beece58447c0943ff
Issue-ID: POLICY-1444
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
1) Adding pdp-common module to policy/common. So that all common code
across various pdps will be at one place.
2) Adding java classes for PDP_STATUS, PDP_UPDATE, PDP_STATE_CHANGE &
PDP_HEALTH_CHECK messages.
3) Adding enums for PDPHeathStatus, PDPResponseStatus & PdpState.
4) Adding relevant test cases.
Change-Id: I13e62f393fbd1c261696783cfe4b7dfff72625ba
Issue-ID: POLICY-1443
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
|
|
Added various listener classes to support dispatch by message type
and request id. The listeners are intended to form a pipeline:
TopicSource =>
MessageTypeDispatcher =>
RequestIdDispatcher =>
TypedMessageListener
Removed "PAP" from license.
Changed "handler" to "listener" in most places.
Simplified a test case.
Verified that no error message logged on success cases.
Removed println from test.
Updated some comments.
Change-Id: Ife265d14a6c5c8531601d9ce1343b88c1f8986a8
Issue-ID: POLICY-1444
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
Added StandardCoderObject to hide GSON's JsonElement so that classes
are not dependent on the use of JsonElement, making it easier to switch
out serialization mechanisms in the future.
Added a test for field-not-found.
Converted tabs to spaces in json test file.
Simplified StandardCoderObject and added methods to Coder for
translating to and from StandardCoderObject.
Removed a test for a method that no longer exists.
Added more tests to a test case.
Change-Id: I5123dc3f17c940ded431ef7f9ccd8c4bff6b1c5f
Issue-ID: POLICY-1444
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
The logger appender that's used in junit tests was getting the
raw message, which still had "{}" place-holders in it. Fixed that.
Split a test method to avoid checkstyle error.
Change-Id: I57571d8717aaee4adb7df186fe156501e9cc669e
Issue-ID: POLICY-1444
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
est.tech
Issue-ID: POLICY-1556
Change-Id: If83637b547d84b4caac6ad9b2b117d0051735c8c
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Also:
Updated some comments and renamed a few parameters.
Removed a "throws" for a RuntimeException.
Short-circuit some calls.
Typo in comment.
Let gson create the JsonWriter.
Renamed a few more parameters.
Change-Id: I22e48c2191820c2a3d0743200edca79bd74353e7
Issue-ID: POLICY-1444
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
Added coder classes as a common utility that can be used to encode
and decode json data. Currently, it uses gson, but that can be
changed.
Separated the Coder interface from implementation.
Used assertSame to compare references.
Used numbers instead of strings so don't have to deal with escaping quotes
in the test cases.
Change-Id: Iea9001d2adc5a3150b3367619b5f43e96b5f8b41
Issue-ID: POLICY-1444
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
This class is used by the DAO model code being moved from
the APEX PDP to policy-models for generic DAO handling in the
Policy Framework
Issue-ID: POLICY-1264
Change-Id: I67cca540d9357f9ab16532090cb2edf397b332be
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Different gson providers may be used for REST APIs. Updated the code
to identify which was being used.
Change-Id: I8ffbda7409142ec728e217a87c9bcba3c34b814b
Issue-ID: POLICY-1428
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
This work allows a drools application, with its drl
template to refer to the topic name by its invariable
canonical name, ie. POLICY-CL-MGT. Since the drl
is a design time artifact, it is desired to know topics
by its canonical non-changeable name.
The actual per lab environment topic name may change
on a per deployment basis, for example POLICY-CL-MGT-WINDRIVER
or POLICY-CL-MGT-TLAB. The template can still use
POLICY-CL-MGT without modification but the actual installation
configuration would use the "effectiveTopic" property to
point to the right topic on a per lab basis.
This also helps with installation (long story) since
the canonical topics will be known ahead of time.
Change-Id: I8322bf7e427569c37a76eea5ce6d5b9547cb2ff3
Issue-ID: POLICY-1534
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
|
|
Removed most jackson dependencies from the policy-endpoints pom,
leaving jackson-annotations.
Moved jersey.version to top-level pom.
Change-Id: I73c6fef79d104ef62c7632ad3e02bc52865351cd
Issue-ID: POLICY-1531
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Added code to log a message when gson is used instead of jackson.
Change-Id: I8cbb8ad8461cc364c3419aaa174cef2680c5a672
Issue-ID: POLICY-1428
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
|
|
Removed some jackson references that are no longer needed.
Others remain; those must remain in place until they are no longer
needed by other policy repos.
Change-Id: Ica6624baf17be118714bb566c8db3ffce2c3587c
Issue-ID: POLICY-1428
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Some comments still said that including the maven artifact,
jersey-media-json-jackson, could override gson behavior, but
that is no longer true. The comments have been removed.
Change-Id: I9b6477b76f835b96c52ccb9777b80791fc6b1d77
Issue-ID: POLICY-1428
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Fixed issues with GsonTestUtils:
- don't set static from within a non-static method
- don't throw generic RuntimeException
Resolved checkstyle issue.
Removed trailing spaces.
Change-Id: If0c85733f62a24b56088dc90aadd4b95b3a6c91a
Issue-ID: POLICY-1428
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Added test for Serializer to increase junit coverage.
Added tests for TestTimeMulti to increase junit coverage.
Sonar fixes for PropertyConfiguration:
- use equalsIgnoreCase
- use the exception
Updated license dates.
Some fixes for LoggerFactoryWrapper to address sonar issue - utility
classes should typically have a private constructor.
Change-Id: I8957e9673fe8371ecca7abbb7ece87b0d6f46c1a
Issue-ID: POLICY-1519
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
The TypeAdapters in the gson-jackson code were nearly identical,
so a common class was factored out. This also enabled junit tests
to attain 100% coverage on that code, whereas there were a couple
of branches that could not be tested previously.
Addressed new sonar issues.
Removed unused import.
Change-Id: Id8e6460c881c6ce0239768f182e4e652cd10645f
Issue-ID: POLICY-1428
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Added JacksonHandler which provides jackson behavior in gson.
Also added classes to facilitate testing of gson serializations.
Added compareGson(xxx, Class).
Removed trailing spaces from some files.
Updated license dates.
Replaced incorrect constant with ${xxx} in json test file.
Fixed typo in test method name.
Change-Id: If05b654d76a4ffc88646f03334be82b32506f28f
Issue-ID: POLICY-1428
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
|
|
|
|
|
|
Added classes to make gson treat methods as jackson does.
Remove unneeded "forGetter" parameter from constructors.
Fixed sonar issue with too long "if" test.
Corrected comment about annotation names.
Adjusted error message.
Removed unused constant.
Removed trailing spaces.
Change-Id: I3a4fc92193737a0dc89f1218e70f093aedbdb152
Issue-ID: POLICY-1428
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Added classes to make gson treat fields as jackson does.
Added check for input OR output fields.
Corrected comment about annotation names.
Removed trailing spaces.
Extracted some string constants.
Fixed checkstyle issue.
Change-Id: I665b31774086d72a5a95bee6cf3486a019b72402
Issue-ID: POLICY-1428
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Fixing some of the issues necessitated the use of generic/raw types.
Removed version from assertj in pom.
Removed trailing spaces.
Change-Id: I76e0a05ca06c103ccc876675be04a4ab5e4de5ea
Issue-ID: POLICY-1428
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Added missing Serializer interface, needed by other gson classes.
Change-Id: I4c37dea89011a833d71c11e2d2c4d74ad768e750
Issue-ID: POLICY-1428
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
|
|
Added common classes needed by other gson-jackson code.
Modified some logic to make it more maintainable or perform better.
Updated comments and spacing.
Fix another comment.
Moved gson classes from utils to a separate gson project.
Added GsonXxx annotations to mirror jackson annotations.
Removed unneeded dependencies from gson pom.
Removed old GsonMessage class from policy-endpoints.
Removed trailing spaces.
Updated licenses.
Removed more trailing spaces.
Removed unneeded checkstyle suppression file from utils.
Change-Id: I1a285500faeb0a0b6a1467d09b92ecd3cded713e
Issue-ID: POLICY-1428
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Removed PolicyAssert from utils-test, as its functionality is
superseded by assertj.
Change-Id: Ie7620fea98cd368a8ce4f8511e8e88f291013cff
Issue-ID: POLICY-1392
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Accortding to doc start() should return true if start operation was
successful. Unfortunately value of this.alive may change between end
of synchronized block and return for example when other thread
executes stop() in parallel.
Change-Id: I4103f0f4c65620c47b4acf2d276f104937b91187
Issue-ID: POLICY-1387
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|