diff --git a/edexOsgi/com.raytheon.uf.common.localization/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/edexOsgi/com.raytheon.uf.common.localization/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject deleted file mode 100644 index 6af15198d8..0000000000 --- a/edexOsgi/com.raytheon.uf.common.localization/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ /dev/null @@ -1,14 +0,0 @@ -com.raytheon.uf.common.localization.msgs.GetUtilityCommand -com.raytheon.uf.common.localization.msgs.GetUtilityResponse -com.raytheon.uf.common.localization.msgs.ListContextCommand -com.raytheon.uf.common.localization.msgs.ListUtilityCommand -com.raytheon.uf.common.localization.msgs.ListUtilityResponse -com.raytheon.uf.common.localization.msgs.ProtectedFileCommand -com.raytheon.uf.common.localization.msgs.ProtectedFileResponse -com.raytheon.uf.common.localization.msgs.ListResponseEntry -com.raytheon.uf.common.localization.msgs.UtilityRequestMessage -com.raytheon.uf.common.localization.msgs.UtilityResponseMessage -com.raytheon.uf.common.localization.msgs.DeleteUtilityCommand -com.raytheon.uf.common.localization.msgs.DeleteUtilityResponse -com.raytheon.uf.common.localization.FileUpdatedMessage -com.raytheon.uf.common.localization.LocalizationContext \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/FileUpdatedMessage.java b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/FileUpdatedMessage.java index c64e510a82..393d4c1a15 100644 --- a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/FileUpdatedMessage.java +++ b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/FileUpdatedMessage.java @@ -19,13 +19,6 @@ **/ package com.raytheon.uf.common.localization; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -37,34 +30,30 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * May 12, 2008 randerso Initial creation + * Oct 01, 2013 2361 njensen Removed XML annotations * * * * @author randerso * @version 1.0 */ -@XmlRootElement -@XmlAccessorType(XmlAccessType.NONE) + @DynamicSerialize -public class FileUpdatedMessage implements ISerializableObject { +public class FileUpdatedMessage { public static enum FileChangeType { ADDED, UPDATED, DELETED }; @DynamicSerializeElement - @XmlElement private LocalizationContext context; @DynamicSerializeElement - @XmlAttribute private String fileName; @DynamicSerializeElement - @XmlElement private FileChangeType changeType; @DynamicSerializeElement - @XmlAttribute private long timeStamp; public FileUpdatedMessage() { diff --git a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/LocalizationContext.java b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/LocalizationContext.java index a50be45903..f8df750334 100644 --- a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/LocalizationContext.java +++ b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/LocalizationContext.java @@ -26,16 +26,9 @@ import java.util.HashMap; import java.util.Map; import java.util.regex.Pattern; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.adapters.XmlAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - import org.apache.commons.lang.Validate; import com.raytheon.uf.common.serialization.IDeserializationContext; -import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.ISerializationContext; import com.raytheon.uf.common.serialization.ISerializationTypeAdapter; import com.raytheon.uf.common.serialization.SerializationException; @@ -69,6 +62,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeTypeAdap * ------------ ---------- ----------- -------------------------- * Apr 19, 2007 chammack Initial Creation. * Jul 14, 2008 1250 jelkins EDEX LocalizationAdapter additions. + * Oct 01, 2013 2361 njensen Removed XML annotations and methods * * * @@ -76,8 +70,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeTypeAdap * @version 1.0 */ @DynamicSerialize -@XmlAccessorType(XmlAccessType.NONE) -public class LocalizationContext implements ISerializableObject, Cloneable { +public class LocalizationContext implements Cloneable { /** * NOTE: When making changes to LocalizationLevelSerializationAdapter, you @@ -86,14 +79,9 @@ public class LocalizationContext implements ISerializableObject, Cloneable { * LocalizationLevelSerializationAdapter.py * */ - public static class LocalizationLevelSerializationAdapter extends - XmlAdapter implements + public static class LocalizationLevelSerializationAdapter implements ISerializationTypeAdapter { - private static final String separator = "||"; - - private static final String split = "[|][|]"; - /* * (non-Javadoc) * @@ -127,37 +115,6 @@ public class LocalizationContext implements ISerializableObject, Cloneable { return level; } - /* - * (non-Javadoc) - * - * @see - * javax.xml.bind.annotation.adapters.XmlAdapter#marshal(java.lang.Object - * ) - */ - @Override - public String marshal(LocalizationLevel v) throws Exception { - String rval = v.text + separator + Integer.toString(v.order) - + separator + v.systemLevel + separator; - return rval; - } - - /* - * (non-Javadoc) - * - * @see - * javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang - * .Object) - */ - @Override - public LocalizationLevel unmarshal(String v) throws Exception { - String[] parts = v.split(split); - int i = 0; - LocalizationLevel level = LocalizationLevel.createLevel(parts[i++], - Integer.parseInt(parts[i++]), - Boolean.parseBoolean(parts[i++])); - return level; - } - } /** @@ -167,8 +124,7 @@ public class LocalizationContext implements ISerializableObject, Cloneable { * LocalizationTypeSerializationAdapter.py * */ - public static class LocalizationTypeSerializationAdapter extends - XmlAdapter implements + public static class LocalizationTypeSerializationAdapter implements ISerializationTypeAdapter { /* @@ -198,30 +154,6 @@ public class LocalizationContext implements ISerializableObject, Cloneable { return LocalizationType.valueOf(deserializer.readString()); } - /* - * (non-Javadoc) - * - * @see - * javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang - * .Object) - */ - @Override - public LocalizationType unmarshal(String v) throws Exception { - return LocalizationType.valueOf(v); - } - - /* - * (non-Javadoc) - * - * @see - * javax.xml.bind.annotation.adapters.XmlAdapter#marshal(java.lang.Object - * ) - */ - @Override - public String marshal(LocalizationType v) throws Exception { - return v.text; - } - } private static final char CONTEXT_SEPARATOR = '.'; @@ -237,7 +169,6 @@ public class LocalizationContext implements ISerializableObject, Cloneable { */ @DynamicSerialize @DynamicSerializeTypeAdapter(factory = LocalizationTypeSerializationAdapter.class) - @XmlJavaTypeAdapter(value = LocalizationTypeSerializationAdapter.class) public static class LocalizationType { private static Map typeMap = new HashMap(); @@ -324,7 +255,6 @@ public class LocalizationContext implements ISerializableObject, Cloneable { */ @DynamicSerialize @DynamicSerializeTypeAdapter(factory = LocalizationLevelSerializationAdapter.class) - @XmlJavaTypeAdapter(value = LocalizationLevelSerializationAdapter.class) public static class LocalizationLevel implements Comparable { @@ -486,15 +416,12 @@ public class LocalizationContext implements ISerializableObject, Cloneable { BUNDLE, PLUGIN, COLORMAPS, CONFIG, PYTHON, SMARTINIT, GRID, SHAPEFILES, TEXTPRODUCTS }; - @XmlAttribute @DynamicSerializeElement private LocalizationType localizationType; - @XmlAttribute @DynamicSerializeElement private LocalizationLevel localizationLevel; - @XmlAttribute @DynamicSerializeElement private String contextName; diff --git a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/AbstractCommand.java b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/AbstractCommand.java index 9900e3402e..0ab0b3e62b 100644 --- a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/AbstractCommand.java +++ b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/AbstractCommand.java @@ -1,11 +1,6 @@ package com.raytheon.uf.common.localization.msgs; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - import com.raytheon.uf.common.localization.LocalizationContext; -import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -17,17 +12,18 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Jun 4, 2010 rgeorge Initial creation + * Jun 4, 2010 rgeorge Initial creation + * Oct 1, 2013 2361 njensen Removed XML annotations * * * * @author rgeorge * @version 1.0 */ -@XmlAccessorType(XmlAccessType.NONE) + @DynamicSerialize -public abstract class AbstractCommand implements ISerializableObject { - @XmlElement +public abstract class AbstractCommand { + @DynamicSerializeElement protected LocalizationContext context; diff --git a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/AbstractPrivilegedUtilityCommand.java b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/AbstractPrivilegedUtilityCommand.java index 6be5cc9ca7..c2589372b0 100644 --- a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/AbstractPrivilegedUtilityCommand.java +++ b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/AbstractPrivilegedUtilityCommand.java @@ -1,10 +1,5 @@ package com.raytheon.uf.common.localization.msgs; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; - import com.raytheon.uf.common.localization.LocalizationContext; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -17,22 +12,21 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Jun 3, 2010 rgeorge Initial creation + * Jun 3, 2010 rgeorge Initial creation + * Oct 1, 2013 2361 njensen Removed XML annotations * * * * @author rgeorge * @version 1.0 */ -@XmlAccessorType(XmlAccessType.NONE) + @DynamicSerialize public class AbstractPrivilegedUtilityCommand extends AbstractCommand { - @XmlAttribute @DynamicSerializeElement protected String filename; - @XmlElement @DynamicSerializeElement protected String myContextName; diff --git a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/AbstractUtilityCommand.java b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/AbstractUtilityCommand.java index 2fceb42430..70795a4b9f 100644 --- a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/AbstractUtilityCommand.java +++ b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/AbstractUtilityCommand.java @@ -20,9 +20,6 @@ package com.raytheon.uf.common.localization.msgs; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; - import com.raytheon.uf.common.localization.LocalizationContext; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; @@ -39,13 +36,14 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; * ------------ ---------- ----------- -------------------------- * Apr 19, 2007 chammack Initial Creation. * Aug 22, 2008 #1502 bclement Added JAXB/Serializable annotations + * Oct 01, 2013 2361 njensen Removed XML annotations * * * * @author chammack * @version 1.0 */ -@XmlAccessorType(XmlAccessType.NONE) + @DynamicSerialize public abstract class AbstractUtilityCommand extends AbstractCommand { diff --git a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/AbstractUtilityResponse.java b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/AbstractUtilityResponse.java index 773eb0c53f..0b4dbb2232 100644 --- a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/AbstractUtilityResponse.java +++ b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/AbstractUtilityResponse.java @@ -20,13 +20,7 @@ package com.raytheon.uf.common.localization.msgs; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; - import com.raytheon.uf.common.localization.LocalizationContext; -import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -38,30 +32,28 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Apr 19, 2007 chammack Initial Creation. - * May 19, 2007 #1127 randerso Implemented error reporting + * May 19, 2007 #1127 randerso Implemented error reporting * Aug 22, 2008 #1502 bclement Added JAXB/Serializable annotations + * Oct 01, 2013 2361 njensen Removed XML annotations * * * * @author chammack * @version 1.0 */ -@XmlAccessorType(XmlAccessType.NONE) -@DynamicSerialize -public abstract class AbstractUtilityResponse implements ISerializableObject { - @XmlElement +@DynamicSerialize +public abstract class AbstractUtilityResponse { + @DynamicSerializeElement protected LocalizationContext context; - @XmlAttribute @DynamicSerializeElement protected String pathName; /** * Error message, null = no errors occurred */ - @XmlAttribute @DynamicSerializeElement protected String errorText; diff --git a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/DeleteUtilityCommand.java b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/DeleteUtilityCommand.java index 397b9baca8..db1bed5941 100644 --- a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/DeleteUtilityCommand.java +++ b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/DeleteUtilityCommand.java @@ -20,10 +20,6 @@ package com.raytheon.uf.common.localization.msgs; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlRootElement; - import com.raytheon.uf.common.localization.LocalizationContext; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; @@ -36,13 +32,13 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; * ------------ ---------- ----------- -------------------------- * Jul 30, 2007 njensen Initial creation * Aug 22, 2008 #1502 bclement Added JAXB/Serializable annotations + * Oct 01, 2013 2361 njensen Removed XML annotations * * * * @author njensen */ -@XmlRootElement -@XmlAccessorType(XmlAccessType.NONE) + @DynamicSerialize public class DeleteUtilityCommand extends AbstractPrivilegedUtilityCommand { diff --git a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/DeleteUtilityResponse.java b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/DeleteUtilityResponse.java index e4996125ba..3c2637aadc 100644 --- a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/DeleteUtilityResponse.java +++ b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/DeleteUtilityResponse.java @@ -20,11 +20,6 @@ package com.raytheon.uf.common.localization.msgs; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlRootElement; - import com.raytheon.uf.common.localization.LocalizationContext; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -37,19 +32,18 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Jul 30, 2007 njensen Initial creation - * May 19, 2007 #1127 randerso Implemented error reporting + * May 19, 2007 #1127 randerso Implemented error reporting * Aug 22, 2008 #1502 bclement Added JAXB/Serializable annotations + * Oct 01, 2013 2361 njensen Removed XML annotations * * * * @author njensen */ -@XmlRootElement -@XmlAccessorType(XmlAccessType.NONE) + @DynamicSerialize public class DeleteUtilityResponse extends AbstractUtilityResponse { - @XmlAttribute @DynamicSerializeElement private long timeStamp; diff --git a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/GetServersResponse.java b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/GetServersResponse.java index e78f3542cd..92e99807a0 100644 --- a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/GetServersResponse.java +++ b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/GetServersResponse.java @@ -21,7 +21,6 @@ package com.raytheon.uf.common.localization.msgs; import java.util.Map; -import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -44,7 +43,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * @version 1.0 */ @DynamicSerialize -public class GetServersResponse implements ISerializableObject { +public class GetServersResponse { @DynamicSerializeElement private String httpServer; diff --git a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/GetUtilityCommand.java b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/GetUtilityCommand.java index cc38984746..ed42f590eb 100644 --- a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/GetUtilityCommand.java +++ b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/GetUtilityCommand.java @@ -20,11 +20,6 @@ package com.raytheon.uf.common.localization.msgs; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlRootElement; - import com.raytheon.uf.common.localization.IPathManager; import com.raytheon.uf.common.localization.LocalizationContext; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; @@ -41,19 +36,18 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Apr 19, 2007 chammack Initial Creation. - * Aug 22, 2008 #1502 bclement Added JAXB/Serializable annotations + * Aug 22, 2008 1502 bclement Added JAXB/Serializable annotations + * Oct 01, 2013 2361 njensen Removed XML annotations * * * * @author chammack * @version 1.0 */ -@XmlRootElement -@XmlAccessorType(XmlAccessType.NONE) + @DynamicSerialize public class GetUtilityCommand extends AbstractUtilityCommand { - @XmlAttribute @DynamicSerializeElement protected String fileName; diff --git a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/GetUtilityResponse.java b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/GetUtilityResponse.java index 8fec31d9d9..9c94c1fa8a 100644 --- a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/GetUtilityResponse.java +++ b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/GetUtilityResponse.java @@ -20,12 +20,6 @@ package com.raytheon.uf.common.localization.msgs; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - import com.raytheon.uf.common.localization.LocalizationContext; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -39,24 +33,22 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Apr 19, 2007 chammack Initial Creation. - * May 19, 2007 #1127 randerso Implemented error reporting + * May 19, 2007 #1127 randerso Implemented error reporting * Aug 22, 2008 #1502 bclement Added JAXB/Serializable annotations + * Oct 01, 2013 2361 njensen Removed XML annotations * * * * @author chammack * @version 1.0 */ -@XmlRootElement -@XmlAccessorType(XmlAccessType.NONE) + @DynamicSerialize public class GetUtilityResponse extends AbstractUtilityResponse { - @XmlElement @DynamicSerializeElement protected byte[] data; - @XmlAttribute @DynamicSerializeElement protected String checksum; @@ -114,7 +106,8 @@ public class GetUtilityResponse extends AbstractUtilityResponse { /* * (non-Javadoc) * - * @see com.raytheon.edex.msg.utility.AbstractUtilityResponse#getFormattedErrorMessage() + * @see com.raytheon.edex.msg.utility.AbstractUtilityResponse# + * getFormattedErrorMessage() */ @Override public String getFormattedErrorMessage() { diff --git a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ListContextCommand.java b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ListContextCommand.java index 630309f244..95dd697932 100644 --- a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ListContextCommand.java +++ b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ListContextCommand.java @@ -19,11 +19,6 @@ **/ package com.raytheon.uf.common.localization.msgs; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlRootElement; - import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -38,7 +33,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Nov 2, 2010 mpduff Initial creation + * Nov 2, 2010 mpduff Initial creation + * Oct 1, 2013 2361 njensen Removed XML annotations * * * @@ -46,12 +42,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * @version 1.0 */ -@XmlRootElement -@XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class ListContextCommand extends AbstractUtilityCommand { - @XmlAttribute @DynamicSerializeElement private LocalizationLevel requestLevel; diff --git a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ListResponseEntry.java b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ListResponseEntry.java index 1a0130d2a3..8ab2b95c6c 100644 --- a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ListResponseEntry.java +++ b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ListResponseEntry.java @@ -22,15 +22,8 @@ package com.raytheon.uf.common.localization.msgs; import java.util.Date; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - import com.raytheon.uf.common.localization.LocalizationContext; import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel; -import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -44,42 +37,35 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * ------------ ---------- ----------- -------------------------- * Apr 19, 2007 chammack Initial Creation. * Aug 22, 2008 #1502 bclement Added JAXB/Serializable annotations + * Oct 01, 2013 2361 njensen Removed XML annotations * * * * @author chammack * @version 1.0 */ -@XmlRootElement -@XmlAccessorType(XmlAccessType.NONE) -@DynamicSerialize -public class ListResponseEntry implements ISerializableObject { - @XmlAttribute +@DynamicSerialize +public class ListResponseEntry { + @DynamicSerializeElement protected String fileName; - @XmlElement @DynamicSerializeElement protected LocalizationContext context; - @XmlAttribute @DynamicSerializeElement protected Date date; - @XmlAttribute @DynamicSerializeElement protected String checksum; - @XmlAttribute @DynamicSerializeElement protected boolean directory; - @XmlAttribute @DynamicSerializeElement protected LocalizationLevel protectedLevel; - @XmlAttribute @DynamicSerializeElement protected boolean existsOnServer; diff --git a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ListUtilityCommand.java b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ListUtilityCommand.java index db5794843f..c024b3164e 100644 --- a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ListUtilityCommand.java +++ b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ListUtilityCommand.java @@ -20,11 +20,6 @@ package com.raytheon.uf.common.localization.msgs; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlRootElement; - import com.raytheon.uf.common.localization.IPathManager; import com.raytheon.uf.common.localization.LocalizationContext; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; @@ -40,32 +35,28 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Apr 19, 2007 chammack Initial Creation. + * Apr 19, 2007 chammack Initial Creation. * Aug 22, 2008 #1502 bclement Added JAXB/Serializable annotations + * Oct 01, 2013 2361 njensen Removed XML annotations * * * * @author chammack * @version 1.0 */ -@XmlRootElement -@XmlAccessorType(XmlAccessType.NONE) + @DynamicSerialize public class ListUtilityCommand extends AbstractUtilityCommand { - @XmlAttribute @DynamicSerializeElement String subDirectory; - @XmlAttribute @DynamicSerializeElement boolean recursive; - @XmlAttribute @DynamicSerializeElement private boolean filesOnly; - @XmlAttribute @DynamicSerializeElement private String localizedSite; diff --git a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ListUtilityResponse.java b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ListUtilityResponse.java index 4d3912bfa3..10d52eb7ec 100644 --- a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ListUtilityResponse.java +++ b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ListUtilityResponse.java @@ -20,11 +20,6 @@ package com.raytheon.uf.common.localization.msgs; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - import com.raytheon.uf.common.localization.LocalizationContext; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -37,20 +32,19 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Apr 19, 2007 chammack Initial Creation. - * May 19, 2007 #1127 randerso Implemented error reporting + * May 19, 2007 #1127 randerso Implemented error reporting * Aug 22, 2008 #1502 bclement Added JAXB/Serializable annotations + * Oct 01, 2013 2361 njensen Removed XML annotations * * * * @author chammack * @version 1.0 */ -@XmlRootElement -@XmlAccessorType(XmlAccessType.NONE) + @DynamicSerialize public class ListUtilityResponse extends AbstractUtilityResponse { - @XmlElement @DynamicSerializeElement protected ListResponseEntry[] entries; @@ -60,7 +54,7 @@ public class ListUtilityResponse extends AbstractUtilityResponse { public ListUtilityResponse() { } - + public ListUtilityResponse(ListResponseEntry[] entries) { this.entries = entries; } @@ -95,7 +89,8 @@ public class ListUtilityResponse extends AbstractUtilityResponse { /* * (non-Javadoc) * - * @see com.raytheon.edex.msg.utility.AbstractUtilityResponse#getFormattedErrorMessage() + * @see com.raytheon.edex.msg.utility.AbstractUtilityResponse# + * getFormattedErrorMessage() */ @Override public String getFormattedErrorMessage() { diff --git a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ProtectedFileCommand.java b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ProtectedFileCommand.java index 27fa92d689..4ec8b7faad 100644 --- a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ProtectedFileCommand.java +++ b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ProtectedFileCommand.java @@ -19,16 +19,12 @@ **/ package com.raytheon.uf.common.localization.msgs; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; - import com.raytheon.uf.common.localization.IPathManager; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; /** - * TODO Add Description + * A request for protected files. * *
  * 
@@ -36,21 +32,20 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Aug 26, 2010            mschenke     Initial creation
+ * Oct 01, 2013  2361       njensen     Removed XML annotations
  * 
  * 
* * @author mschenke * @version 1.0 */ -@XmlAccessorType(XmlAccessType.NONE) + @DynamicSerialize public class ProtectedFileCommand extends AbstractUtilityCommand { - @XmlAttribute @DynamicSerializeElement private String subPath; - @XmlAttribute @DynamicSerializeElement private String localizedSite; diff --git a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ProtectedFileResponse.java b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ProtectedFileResponse.java index 139a2bcc60..46cf21d58a 100644 --- a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ProtectedFileResponse.java +++ b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/ProtectedFileResponse.java @@ -19,34 +19,30 @@ **/ package com.raytheon.uf.common.localization.msgs; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; - import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; /** - * TODO Add Description + * A response for protected files. * *
  * 
  * SOFTWARE HISTORY
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
- * Aug 26, 2010            mschenke     Initial creation
+ * Aug 26, 2010            mschenke    Initial creation
+ * Oct 01, 2013  2361      njensen     Removed XML annotations
  * 
  * 
* * @author mschenke * @version 1.0 */ -@XmlAccessorType(XmlAccessType.NONE) + @DynamicSerialize public class ProtectedFileResponse extends AbstractUtilityResponse { - @XmlAttribute @DynamicSerializeElement private LocalizationLevel protectedLevel; diff --git a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/UtilityMessageMarshaller.java b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/UtilityMessageMarshaller.java deleted file mode 100644 index 75f1282a33..0000000000 --- a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/UtilityMessageMarshaller.java +++ /dev/null @@ -1,204 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ - -package com.raytheon.uf.common.localization.msgs; - -import javax.xml.bind.JAXBException; - -import com.raytheon.uf.common.localization.exception.LocalizationException; -import com.raytheon.uf.common.serialization.DynamicSerializationManager; -import com.raytheon.uf.common.serialization.DynamicSerializationManager.SerializationType; -import com.raytheon.uf.common.serialization.SerializationException; -import com.raytheon.uf.common.serialization.SerializationUtil; - -/** - * Utility class for converting and constructing localization messages - * - *
- * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Apr 19, 2007            chammack    Initial Creation.
- * Aug 22, 2008 1448       chammack    Added Thrift Binary Support
- * 
- * 
- * - * @author chammack - * @version 1.0 - */ - -public class UtilityMessageMarshaller { - - /** - * Hide constructor for utility class - */ - private UtilityMessageMarshaller() { - - } - - /** - * Convert localization xml response to the value object - * - * @param message - * the xml message - * @return the value object - * @throws EdexException - */ - public static UtilityResponseMessage deserializeResponse(String message) - throws LocalizationException { - return (UtilityResponseMessage) deserialize(message, - UtilityResponseMessage.class); - } - - /** - * Convert localization binary response to the value object - * - * @param message - * the binary message - * @return the value object - * @throws EdexException - */ - public static UtilityResponseMessage deserializeResponseBinary( - byte[] message) throws LocalizationException { - return (UtilityResponseMessage) deserializeBinary(message, - UtilityResponseMessage.class); - } - - /** - * Convert localization xml request to the value object - * - * @param message - * the xml message - * @return the value object - * @throws EdexException - */ - public static UtilityRequestMessage deserializeRequest(String message) - throws LocalizationException { - return (UtilityRequestMessage) deserialize(message, - UtilityRequestMessage.class); - } - - /** - * Convert localization binary message request to the value object - * - * @param message - * the binary message - * @return the value object - * @throws EdexException - */ - public static UtilityRequestMessage deserializeRequest(byte[] message) - throws LocalizationException { - return (UtilityRequestMessage) deserializeBinary(message, - UtilityRequestMessage.class); - } - - /** - * Convert a request value object to XML - * - * @param message - * the value object message - * @return xml string - * @throws EdexException - */ - public static String serializeRequest(UtilityRequestMessage message) - throws LocalizationException { - return serialize(message, UtilityRequestMessage.class); - } - - /** - * Convert a request value object to Binary - * - * @param message - * the value object message - * @return binary message - * @throws EdexException - */ - public static byte[] serializeRequestBinary(UtilityRequestMessage message) - throws LocalizationException { - return serializeBinary(message, UtilityRequestMessage.class); - } - - /** - * Convert a response value object to XML - * - * @param message - * the value object message - * @return xml string - * @throws EdexException - */ - public static String serializeResponse(UtilityResponseMessage message) - throws LocalizationException { - return serialize(message, UtilityResponseMessage.class); - } - - /** - * Convert a response value object to binary - * - * @param message - * the value object message - * @return binary message - * @throws EdexException - */ - public static byte[] serializeResponseBinary(UtilityResponseMessage message) - throws LocalizationException { - return serializeBinary(message, UtilityResponseMessage.class); - } - - private static Object deserialize(String message, Class c) - throws LocalizationException { - try { - return SerializationUtil.unmarshalFromXml(message); - } catch (JAXBException e) { - throw new LocalizationException("Unable to deserialize: ", e); - } - } - - private static String serialize(Object o, Class c) - throws LocalizationException { - try { - return SerializationUtil.marshalToXml(o); - } catch (JAXBException e) { - throw new LocalizationException("Unable to serialize: ", e); - } - } - - private static Object deserializeBinary(byte[] message, Class c) - throws LocalizationException { - try { - DynamicSerializationManager mgr = DynamicSerializationManager - .getManager(SerializationType.Thrift); - return mgr.deserialize(message); - } catch (SerializationException e) { - throw new LocalizationException("Unable to deserialize: ", e); - } - } - - private static byte[] serializeBinary(Object o, Class c) - throws LocalizationException { - try { - DynamicSerializationManager mgr = DynamicSerializationManager - .getManager(SerializationType.Thrift); - return mgr.serialize(o); - } catch (SerializationException e) { - throw new LocalizationException("Unable to serialize: ", e); - } - } - -} diff --git a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/UtilityRequestMessage.java b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/UtilityRequestMessage.java index d440adffbd..59af551325 100644 --- a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/UtilityRequestMessage.java +++ b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/UtilityRequestMessage.java @@ -22,11 +22,6 @@ package com.raytheon.uf.common.localization.msgs; import java.util.Arrays; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.serialization.comm.IServerRequest; @@ -41,18 +36,17 @@ import com.raytheon.uf.common.serialization.comm.IServerRequest; * ------------ ---------- ----------- -------------------------- * Apr 19, 2007 chammack Initial Creation. * Aug 22, 2008 #1502 bclement Added JAXB/Serializable annotations + * Oct 01, 2013 2361 njensen Removed XML annotations * * * * @author chammack * @version 1.0 */ -@XmlRootElement -@XmlAccessorType(XmlAccessType.NONE) + @DynamicSerialize public class UtilityRequestMessage implements IServerRequest { - @XmlElement @DynamicSerializeElement protected AbstractUtilityCommand[] commands; diff --git a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/UtilityResponseMessage.java b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/UtilityResponseMessage.java index ab7913725b..f0a1a1428c 100644 --- a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/UtilityResponseMessage.java +++ b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/UtilityResponseMessage.java @@ -20,12 +20,6 @@ package com.raytheon.uf.common.localization.msgs; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -38,18 +32,17 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * ------------ ---------- ----------- -------------------------- * Apr 19, 2007 chammack Initial Creation. * Aug 22, 2008 #1502 bclement Added JAXB/Serializable annotations + * Oct 01, 2013 2361 njensen Removed XML annotations * * * * @author chammack * @version 1.0 */ -@XmlRootElement -@XmlAccessorType(XmlAccessType.NONE) -@DynamicSerialize -public class UtilityResponseMessage implements ISerializableObject { - @XmlElement +@DynamicSerialize +public class UtilityResponseMessage { + @DynamicSerializeElement protected AbstractUtilityResponse[] responses;