Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
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>
|
|
|
|
Created an exclusion strategy that will prevent gson from serializing
any fields within a class. The strategy must be registered to take
effect.
Uses lists to identify classes to be excluded when using gson with
the jackson default behavior.
Change-Id: I747fb1159846ad3000f69603f9b5d3f03bc8764f
Issue-ID: POLICY-1428
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
init() is currently called outside of synhronized block.
This is may lead to race condition as init() creates new bus consumer
(this.consumer) which is the copied and nulled in stop() synchronized
block. This may lead to race condition if:
Thread #1 Thread #2
this.alive = true;
this.alive = false
consumerCopy = this.consumer;
this.consumer = new Consumer();
// false
if(consumerCopy != null) {
consumerCopy.close();
} else {
log.warn();
}
As a result, new BusConsumers are being created but they are never
close().
Issue-ID: POLICY-1387
Change-Id: I2eadb12ef1c4b07b9e47dc6ebc096acc713299a0
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Most of parameters used to initialize consumers are repeated in
every branch. Instead of having 3 copies of the same code let's
extract all common values and then add only those which are
specific to given consumer type.
Change-Id: I5884f6dd77a7e2f1a7f7614c909c1cad4826d4f1
Issue-ID: POLICY-1387
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
allowselfsignedcerts field is defined and initialized in BusTopicBase
so there is need to overwrite it once agin with the same value.
Change-Id: Id0a389921954606392eb2cb3c23cd0d8ee3dc4ae
Issue-ID: POLICY-1387
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Fix sonar issue:
Move constants to a class or enum
Issue-ID: POLICY-1486
Depends-On: I453a14c3dda337f2a4d08914ead32b37adc17353
Change-Id: I6baac1fe6e692074bca971f3c35bb2a29cb49205
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Instead of abusing constant from Topic interface use new dedicated
helper class to retrive network logger.
Issue-ID: POLICY-1486
Change-Id: Ia715aafb578aeb2842566de2623e8d22e42652fc
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
Instead of defining static string variable inside Topic class let's
create helper class for getting specific loggers.
Issue-ID: POLICY-1486
Change-Id: Ic1f07466e1ab6abcc00098e617f0e82da19e852d
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
|
|
|