Issue-ID: AAF-509
Change-Id: Ib109ba404f158bbffb6dc60c96850fd7e56871fd
Signed-off-by: Instrumental <jonathan.gathman@att.com>
return Result.ok(nsd);
} else {
int dot = str.lastIndexOf('.');
return Result.ok(nsd);
} else {
int dot = str.lastIndexOf('.');
-
- if (dot < 0) {
- return Result.err(Status.ERR_NsNotFound, "No Namespace for [%s]", str);
- } else {
- return deriveFirstNsForType(trans, str.substring(0, dot),type);
- }
+
+ if (dot < 0) {
+ return Result.err(Status.ERR_NsNotFound, "No Namespace for [%s]", str);
+ } else {
+ return deriveFirstNsForType(trans, str.substring(0, dot),type);
+ }
}
} else {
return Result.err(Status.ERR_NsNotFound,"There is no valid Company Namespace for %s",str);
}
} else {
return Result.err(Status.ERR_NsNotFound,"There is no valid Company Namespace for %s",str);
Future<Void> fp;
String resp;
if(option == 0) {
Future<Void> fp;
String resp;
if(option == 0) {
- fp = client.create(path, Void.class);
+ fp = client.create(path, Void.class);
resp = " added";
} else {
resp = " added";
} else {
- fp = client.delete(path, Void.class);
+ fp = client.delete(path, Void.class);
resp = " deleted";
}
if (fp.get(AAFcli.timeout())) {
resp = " deleted";
}
if (fp.get(AAFcli.timeout())) {
rv=fp.code();
} else {
if (rv==409) {
rv=fp.code();
} else {
if (rv==409) {
rv=200;
} else {
if (rv==409) {
rv=200;
} else {
if (rv==409) {
rv=200;
} else {
if (rv==409) {
rv=200;
} else {
if (rv==409) {
@RunWith(MockitoJUnitRunner.class)
public class JU_Mapper_2_0 {
@RunWith(MockitoJUnitRunner.class)
public class JU_Mapper_2_0 {
- private static final String USER = "John";
+ private static final String USER = "John";
private Mapper_2_0 mapper;
@Mock
private Mapper_2_0 mapper;
@Mock
*
*/
public static class ImmutableMap {
*
*/
public static class ImmutableMap {
- public static <T,U> Map<T,U> of(Object ... tag_value) {
- Map<T,U> rv = new HashMap<>();
- for(int i=0;i<tag_value.length-1;i+=2) {
- rv.put((T)tag_value[i],(U)tag_value[i+1]);
- }
- return rv;
- }
+ public static <T,U> Map<T,U> of(Object ... tag_value) {
+ Map<T,U> rv = new HashMap<>();
+ for(int i=0;i<tag_value.length-1;i+=2) {
+ rv.put((T)tag_value[i],(U)tag_value[i+1]);
+ }
+ return rv;
+ }
*
*/
public static class Iterables {
*
*/
public static class Iterables {
- public static <T> T getOnlyElement(List<T> lt) {
- if(lt.isEmpty()) {
- return null;
- } else {
- return lt.get(0);
- }
- }
+ public static <T> T getOnlyElement(List<T> lt) {
+ if(lt.isEmpty()) {
+ return null;
+ } else {
+ return lt.get(0);
+ }
+ }
*
*/
public static class Lists {
*
*/
public static class Lists {
- @SuppressWarnings("unchecked")
- public static <T> List<T> newArrayList(Collection<T> ... init ) {
- List<T> rv = new ArrayList<>();
- for(Collection<T> o : init) {
- for(T t : o) {
- rv.add(t);
- }
- }
- return rv;
- }
-
- @SuppressWarnings("unchecked")
- public static <T> List<T> newArrayList(Object ... init ) {
- List<T> rv = new ArrayList<>();
- for(Object o : init) {
- rv.add((T)o);
- }
- return rv;
- }
+ @SuppressWarnings("unchecked")
+ public static <T> List<T> newArrayList(Collection<T> ... init ) {
+ List<T> rv = new ArrayList<>();
+ for(Collection<T> o : init) {
+ for(T t : o) {
+ rv.add(t);
+ }
+ }
+ return rv;
+ }
+
+ @SuppressWarnings("unchecked")
+ public static <T> List<T> newArrayList(Object ... init ) {
+ List<T> rv = new ArrayList<>();
+ for(Object o : init) {
+ rv.add((T)o);
+ }
+ return rv;
+ }
*
*/
public static class Sets {
*
*/
public static class Sets {
- @SuppressWarnings("unchecked")
- public static <T> Set<T> newHashSet(Object ... init ) {
- Set<T> rv = new HashSet<>();
- for(Object o : init) {
- rv.add((T)o);
- }
- return rv;
- }
+ @SuppressWarnings("unchecked")
+ public static <T> Set<T> newHashSet(Object ... init ) {
+ Set<T> rv = new HashSet<>();
+ for(Object o : init) {
+ rv.add((T)o);
+ }
+ return rv;
+ }
// CPFSF-431 Group needed help with Wild Card
// They tried
assertTrue(PermEval.evalInstance(
// CPFSF-431 Group needed help with Wild Card
// They tried
assertTrue(PermEval.evalInstance(
- ":topic.com.att.ecomp_test.crm.pre*",
- ":topic.com.att.ecomp_test.crm.predemo100"
+ ":topic.org.onap.sample_test.crm.pre*",
+ ":topic.org.onap.sample_test.crm.predemo100"
));
// Also can be
assertTrue(PermEval.evalInstance(
));
// Also can be
assertTrue(PermEval.evalInstance(
- ":!topic.com.att.ecomp_test.crm.pre.*",
- ":topic.com.att.ecomp_test.crm.predemo100"
+ ":!topic.org.onap.sample_test.crm.pre.*",
+ ":topic.org.onap.sample_test.crm.predemo100"
/**
* This class will pick out the best default SS for Clients per Client type
*
/**
* This class will pick out the best default SS for Clients per Client type
*
*
*/
public class HSecurityInfoInit implements SecurityInfoInit<HttpURLConnection> {
*
*/
public class HSecurityInfoInit implements SecurityInfoInit<HttpURLConnection> {
/**
* Single Threaded Class for building up content
/**
* Single Threaded Class for building up content
*
*/
public static class Input {
*
*/
public static class Input {