Skip to content

Commit

Permalink
Updating ConnId Base
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgrosso committed May 2, 2022
1 parent 87928b0 commit 985c7a8
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 66 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
<!--
Copyright (C) 2018 ConnId ([email protected])
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
ConnIdServiceNowBundle
==============

Expand Down
74 changes: 33 additions & 41 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>net.tirasa.connid</groupId>
<artifactId>connid</artifactId>
<version>1.4.1.0</version>
<version>1.5.1.0</version>
</parent>

<groupId>net.tirasa.connid.bundles</groupId>
Expand Down Expand Up @@ -76,12 +76,12 @@
</mailingLists>

<properties>
<connid.version>1.4.1.0</connid.version>
<connid.version>1.5.1.0</connid.version>

<jackson.version>2.12.6</jackson.version>
<cxf.version>3.3.13</cxf.version>

<java.version>1.7</java.version>
<java.version>1.8</java.version>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
Expand All @@ -98,11 +98,6 @@
<version>${connid.version}</version>
</dependency>

<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</artifactId>
Expand Down Expand Up @@ -154,13 +149,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -170,7 +161,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<version>3.10.1</version>
<inherited>false</inherited>
<configuration>
<source>${java.version}</source>
Expand All @@ -183,50 +174,51 @@
</plugin>

<plugin>
<groupId>com.mycila.maven-license-plugin</groupId>
<artifactId>maven-license-plugin</artifactId>
<version>1.10.b1</version>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<inherited>false</inherited>
<configuration>
<skip>true</skip>
</configuration>
</plugin>

<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>3.0</version>
<inherited>false</inherited>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>0.13</version>
<configuration>
<header>com/mycila/maven/plugin/license/templates/APACHE-2.txt</header>
<properties>
<owner>ConnId</owner>
<email>[email protected]</email>
</properties>
<excludes>
<exclude>**/LICENSE*</exclude>
<exclude>**/NOTICE*</exclude>
<exclude>**/*.pfx</exclude>
<exclude>**/*.dll</exclude>
<exclude>**/*.so</exclude>
<exclude>**/*.jnilib</exclude>
<exclude>nbactions.xml</exclude>
<exclude>nb-configuration.xml</exclude>
<exclude>**/nbactions.xml</exclude>
<exclude>**/nb-configuration.xml</exclude>
<exclude>**/META-INF/cxf/**</exclude>
<exclude>**/META-INF/services/**</exclude>
<exclude>**/*.css</exclude>
<exclude>**/*.js</exclude>
<exclude>**/META-INF/MANIFEST.MF</exclude>
<exclude>**/*.csv</exclude>
<exclude>**/archetype-resources/**</exclude>
<exclude>**/AdminLTE*/**</exclude>
<exclude>**/goal.txt</exclude>
<exclude>**/rat.txt</exclude>
<exclude>**/build-copy-javadoc-files.xml</exclude>
<exclude>**/maven-eclipse.xml</exclude>
<exclude>**/*.iml</exclude>
<exclude>**/*.log</exclude>
<exclude>.externalToolBuilders/**</exclude>
<exclude>**/.externalToolBuilders/**</exclude>
<exclude>.git/**</exclude>
<exclude>.idea/**</exclude>
<exclude>**/.settings/**</exclude>
<exclude>**/.*</exclude>
<exclude>**/deb/control/conffiles</exclude>
<exclude>**/deb/control/control</exclude>
<exclude>**/*.lst</exclude>
<exclude>**/*.json</exclude>
<exclude>**/banner.txt</exclude>
<exclude>**/target/**</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>rat-check</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
Expand Down Expand Up @@ -295,7 +287,7 @@
<artifactId>maven-assembly-plugin</artifactId>
<inherited>true</inherited>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<appendAssemblyId>true</appendAssemblyId>
<descriptors>
<descriptor>src/assemble/connector.xml</descriptor>
</descriptors>
Expand All @@ -307,7 +299,7 @@
<ConnectorBundle-Version>${project.version}</ConnectorBundle-Version>
</manifestEntries>
</archive>
</configuration>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
*/
package net.tirasa.connid.bundles.servicenow;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;

import java.io.IOException;
import java.util.ArrayList;
Expand Down Expand Up @@ -60,8 +60,8 @@
import org.identityconnectors.framework.common.objects.filter.EqualsFilter;
import org.identityconnectors.test.common.TestHelpers;
import org.identityconnectors.test.common.ToListResultsHandler;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

public class SNConnectorTests {

Expand All @@ -75,7 +75,7 @@ public class SNConnectorTests {

protected static ConnectorFacade connector;

@BeforeClass
@BeforeAll
public static void setUpConf() throws IOException {
PROPS.load(SNConnectorTests.class.getResourceAsStream(
"/net/tirasa/connid/bundles/servicenow/auth.properties"));
Expand Down Expand Up @@ -346,13 +346,8 @@ private Resource readUser(final String id, final SNClient client)
final List<ConnectorObject> found = new ArrayList<>();
connector.search(ObjectClass.ACCOUNT,
new EqualsFilter(new Name(user.getUserName())),
new ResultsHandler() {

@Override
public boolean handle(final ConnectorObject obj) {
return found.add(obj);
}
}, new OperationOptionsBuilder().setAttributesToGet(SNAttributes.USER_ATTRIBUTE_USERNAME).build());
found::add,
new OperationOptionsBuilder().setAttributesToGet(SNAttributes.USER_ATTRIBUTE_USERNAME).build());
assertEquals(found.size(), 1);
assertNotNull(found.get(0));
assertNotNull(found.get(0).getName());
Expand All @@ -364,13 +359,7 @@ public boolean handle(final ConnectorObject obj) {
@Test
public void pagedSearch() {
final List<ConnectorObject> results = new ArrayList<>();
final ResultsHandler handler = new ResultsHandler() {

@Override
public boolean handle(final ConnectorObject co) {
return results.add(co);
}
};
final ResultsHandler handler = results::add;

final OperationOptionsBuilder oob = new OperationOptionsBuilder();
oob.setAttributesToGet(SNAttributes.USER_ATTRIBUTE_USERNAME);
Expand Down Expand Up @@ -543,5 +532,4 @@ private boolean hasAttribute(final Set<Attribute> attrs, final String name) {
}
return false;
}

}

0 comments on commit 985c7a8

Please sign in to comment.