Commit fbb2a21c authored by Raj Shah's avatar Raj Shah
Browse files

Release 3.2.51

parent 7f5e9d2c
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...@@ -85,7 +85,7 @@ public class PolicyIdUtil { ...@@ -85,7 +85,7 @@ public class PolicyIdUtil {
if (URN_POLICY_PATTERN.matcher(urn).matches()) { if (URN_POLICY_PATTERN.matcher(urn).matches()) {
setILPAttributesByUrn(urn, instance); setILPAttributesByUrn(urn, instance);
} else { } else {
throw new IllegalArgumentException("URN " + " " + urn + " does not match the pattern " + URN_POLICY_PATTERN); throw new IllegalArgumentException("URN " + urn + " does not match the pattern " + URN_POLICY_PATTERN);
} }
} }
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
......
...@@ -33,8 +33,8 @@ import java.lang.reflect.Type; ...@@ -33,8 +33,8 @@ import java.lang.reflect.Type;
/** /**
* A value of a certain {@link DataType} that is currently supported by IND2UCE. * A value of a certain {@link DataType} that is currently supported by IND2UCE.
* *
* @author Fraunhofer IESE
* @param <T> the type of the value. Must be one of {@link DataType}. * @param <T> the type of the value. Must be one of {@link DataType}.
* @author Fraunhofer IESE
*/ */
public class DataObject<T> extends Ind2uceEntity { public class DataObject<T> extends Ind2uceEntity {
...@@ -48,6 +48,11 @@ public class DataObject<T> extends Ind2uceEntity { ...@@ -48,6 +48,11 @@ public class DataObject<T> extends Ind2uceEntity {
*/ */
private static final Logger log = LoggerFactory.getLogger("DataObject<T>"); private static final Logger log = LoggerFactory.getLogger("DataObject<T>");
/**
* Indicates a complex type.
*/
boolean isComplex = false;
/** /**
* The value. * The value.
*/ */
...@@ -58,12 +63,18 @@ public class DataObject<T> extends Ind2uceEntity { ...@@ -58,12 +63,18 @@ public class DataObject<T> extends Ind2uceEntity {
*/ */
private String type; private String type;
/** Indicates a complex type. */ /**
boolean isComplex = false; * .
*/
/** *. */
private transient Type javaType; private transient Type javaType;
/**
* Used for JAXB
*/
public DataObject() {
}
/** /**
* Instantiates a new data object. * Instantiates a new data object.
* *
...@@ -148,13 +159,22 @@ public class DataObject<T> extends Ind2uceEntity { ...@@ -148,13 +159,22 @@ public class DataObject<T> extends Ind2uceEntity {
return true; return true;
} }
// /**
// * Gets the java type.
// *
// * @return the java type
// */
// public Type internJavaType() {
// return this.javaType;
// }
/** /**
* Gets the java type. * Sets the java type.
* *
* @return the java type * @param javaType the new java type
*/ */
public Type getJavaType() { public void setJavaType(Type javaType) {
return this.javaType; this.javaType = javaType;
} }
/** /**
...@@ -171,6 +191,15 @@ public class DataObject<T> extends Ind2uceEntity { ...@@ -171,6 +191,15 @@ public class DataObject<T> extends Ind2uceEntity {
} }
} }
/**
* Sets the type.
*
* @param type the type to set
*/
public void setType(String type) {
this.type = type;
}
/** /**
* Gets the type name. * Gets the type name.
* *
...@@ -189,6 +218,18 @@ public class DataObject<T> extends Ind2uceEntity { ...@@ -189,6 +218,18 @@ public class DataObject<T> extends Ind2uceEntity {
return this.value; return this.value;
} }
/**
* Sets the value.
*
* @param value the new value
*/
public void setValue(T value) {
this.value = value;
if (this.value != null) {
this.type = value.getClass().getCanonicalName();
}
}
/* /*
* (non-Javadoc) * (non-Javadoc)
* @see java.lang.Object#hashCode() * @see java.lang.Object#hashCode()
...@@ -210,54 +251,24 @@ public class DataObject<T> extends Ind2uceEntity { ...@@ -210,54 +251,24 @@ public class DataObject<T> extends Ind2uceEntity {
return this.isComplex; return this.isComplex;
} }
/**
* Primitive types matches.
*
* @param value the value
* @param clazz the clazz
* @return true, if successful
*/
private boolean primitiveTypesMatches(T value, Class<T> clazz) {
return Primitives.isWrapperType(value.getClass()) && Primitives.unwrap(value.getClass()) == clazz || Primitives.isWrapperType(clazz) && Primitives.unwrap(clazz) == value.getClass();
}
/** /**
* Sets the complex. * Sets the complex.
* *
* @param b the new complex * @param b the new complex
*/ */
public void setComplex(boolean b) { public void setComplex(boolean b) {
this.isComplex = true; this.isComplex = b;
} }
/** /**
* Sets the java type. * Primitive types matches.
*
* @param javaType the new java type
*/
public void setJavaType(Type javaType) {
this.javaType = javaType;
}
/**
* Sets the type.
*
* @param type the type to set
*/
public void setType(String type) {
this.type = type;
}
/**
* Sets the value.
* *
* @param value the new value * @param value the value
* @param clazz the clazz
* @return true, if successful
*/ */
public void setValue(T value) { private boolean primitiveTypesMatches(T value, Class<T> clazz) {
this.value = value; return Primitives.isWrapperType(value.getClass()) && Primitives.unwrap(value.getClass()) == clazz || Primitives.isWrapperType(clazz) && Primitives.unwrap(clazz) == value.getClass();
if (this.value != null) {
this.type = value.getClass().getCanonicalName();
}
} }
/* /*
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...@@ -126,8 +126,8 @@ public class ModifierList extends ArrayList<Modifier> { ...@@ -126,8 +126,8 @@ public class ModifierList extends ArrayList<Modifier> {
public void setParameters(ModifierList params) { public void setParameters(ModifierList params) {
if (params != null) { if (params != null) {
this.clear(); this.clear();
this.addAll(params);
} }
this.addAll(params);
} }
/* /*
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...@@ -143,14 +143,14 @@ public class Parameter<T> extends Ind2uceEntity { ...@@ -143,14 +143,14 @@ public class Parameter<T> extends Ind2uceEntity {
return true; return true;
} }
/** // /**
* Gets the data object java type. // * Gets the data object java type.
* // *
* @return the data object java type // * @return the data object java type
*/ // */
public Type getDataObjectJavaType() { // public Type getDataObjectJavaType() {
return this.value.getJavaType(); // return this.value.internJavaType();
} // }
/** /**
* Gets the name of the parameter. * Gets the name of the parameter.
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
......
/*-
* =================================LICENSE_START=================================
* IND2UCE
* %%
* Copyright (C) 2017 Fraunhofer IESE (www.iese.fraunhofer.de)
* %%
* 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.
* =================================LICENSE_END=================================
*/
package de.fraunhofer.iese.ind2uce.connectors;
/**
* Authentication Token
*/
public interface Authentication {
/**
* The identity of the principal being authenticated. In the case of an authentication
* request with username and password, this would be the username. Callers are
* expected to populate the principal for an authentication request.
* <p>
*
* @return the <code>Principal</code> being authenticated or the authenticated
* principal after authentication.
*/
Object getPrincipal();
/**
* The credentials that prove the principal is correct. This is usually a password,
* but could be anything relevant to authentication System. Callers
* are expected to populate the credentials.
*
* @return the credentials that prove the identity of the <code>Principal</code>
*/
Object getCredentials();
}
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...@@ -44,9 +44,4 @@ public @interface Connector { ...@@ -44,9 +44,4 @@ public @interface Connector {
*/ */
ComponentType type(); ComponentType type();
/**
* Connector version as a string.
*/
String version();
} }
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
*