Issue #2361 remove XML annotations from localization requests/responses
Change-Id: Ia2aa791f7e68524d19f24522c7824a977d25d58f Former-commit-id:8e17babd91
[formerlydd75847b7b
] [formerly8e17babd91
[formerlydd75847b7b
] [formerly396e69180d
[formerly ef569f59ca91c73cfbfad4b062fb0110d33533d3]]] Former-commit-id:396e69180d
Former-commit-id:28ce7782fe
[formerly3b92de5abc
] Former-commit-id:38edfa0d07
This commit is contained in:
parent
580f3be05d
commit
c18e9ee060
21 changed files with 64 additions and 467 deletions
|
@ -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
|
|
|
@ -19,13 +19,6 @@
|
||||||
**/
|
**/
|
||||||
package com.raytheon.uf.common.localization;
|
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.DynamicSerialize;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
|
|
||||||
|
@ -37,34 +30,30 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* May 12, 2008 randerso Initial creation
|
* May 12, 2008 randerso Initial creation
|
||||||
|
* Oct 01, 2013 2361 njensen Removed XML annotations
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author randerso
|
* @author randerso
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
@XmlRootElement
|
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
|
||||||
@DynamicSerialize
|
@DynamicSerialize
|
||||||
public class FileUpdatedMessage implements ISerializableObject {
|
public class FileUpdatedMessage {
|
||||||
public static enum FileChangeType {
|
public static enum FileChangeType {
|
||||||
ADDED, UPDATED, DELETED
|
ADDED, UPDATED, DELETED
|
||||||
};
|
};
|
||||||
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
@XmlElement
|
|
||||||
private LocalizationContext context;
|
private LocalizationContext context;
|
||||||
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
@XmlAttribute
|
|
||||||
private String fileName;
|
private String fileName;
|
||||||
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
@XmlElement
|
|
||||||
private FileChangeType changeType;
|
private FileChangeType changeType;
|
||||||
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
@XmlAttribute
|
|
||||||
private long timeStamp;
|
private long timeStamp;
|
||||||
|
|
||||||
public FileUpdatedMessage() {
|
public FileUpdatedMessage() {
|
||||||
|
|
|
@ -26,16 +26,9 @@ import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.regex.Pattern;
|
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 org.apache.commons.lang.Validate;
|
||||||
|
|
||||||
import com.raytheon.uf.common.serialization.IDeserializationContext;
|
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.ISerializationContext;
|
||||||
import com.raytheon.uf.common.serialization.ISerializationTypeAdapter;
|
import com.raytheon.uf.common.serialization.ISerializationTypeAdapter;
|
||||||
import com.raytheon.uf.common.serialization.SerializationException;
|
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.
|
* Apr 19, 2007 chammack Initial Creation.
|
||||||
* Jul 14, 2008 1250 jelkins EDEX LocalizationAdapter additions.
|
* Jul 14, 2008 1250 jelkins EDEX LocalizationAdapter additions.
|
||||||
|
* Oct 01, 2013 2361 njensen Removed XML annotations and methods
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -76,8 +70,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeTypeAdap
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
@DynamicSerialize
|
@DynamicSerialize
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
public class LocalizationContext implements Cloneable {
|
||||||
public class LocalizationContext implements ISerializableObject, Cloneable {
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NOTE: When making changes to LocalizationLevelSerializationAdapter, you
|
* NOTE: When making changes to LocalizationLevelSerializationAdapter, you
|
||||||
|
@ -86,14 +79,9 @@ public class LocalizationContext implements ISerializableObject, Cloneable {
|
||||||
* LocalizationLevelSerializationAdapter.py
|
* LocalizationLevelSerializationAdapter.py
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static class LocalizationLevelSerializationAdapter extends
|
public static class LocalizationLevelSerializationAdapter implements
|
||||||
XmlAdapter<String, LocalizationLevel> implements
|
|
||||||
ISerializationTypeAdapter<LocalizationLevel> {
|
ISerializationTypeAdapter<LocalizationLevel> {
|
||||||
|
|
||||||
private static final String separator = "||";
|
|
||||||
|
|
||||||
private static final String split = "[|][|]";
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
|
@ -127,37 +115,6 @@ public class LocalizationContext implements ISerializableObject, Cloneable {
|
||||||
return level;
|
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
|
* LocalizationTypeSerializationAdapter.py
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static class LocalizationTypeSerializationAdapter extends
|
public static class LocalizationTypeSerializationAdapter implements
|
||||||
XmlAdapter<String, LocalizationType> implements
|
|
||||||
ISerializationTypeAdapter<LocalizationType> {
|
ISerializationTypeAdapter<LocalizationType> {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -198,30 +154,6 @@ public class LocalizationContext implements ISerializableObject, Cloneable {
|
||||||
return LocalizationType.valueOf(deserializer.readString());
|
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 = '.';
|
private static final char CONTEXT_SEPARATOR = '.';
|
||||||
|
@ -237,7 +169,6 @@ public class LocalizationContext implements ISerializableObject, Cloneable {
|
||||||
*/
|
*/
|
||||||
@DynamicSerialize
|
@DynamicSerialize
|
||||||
@DynamicSerializeTypeAdapter(factory = LocalizationTypeSerializationAdapter.class)
|
@DynamicSerializeTypeAdapter(factory = LocalizationTypeSerializationAdapter.class)
|
||||||
@XmlJavaTypeAdapter(value = LocalizationTypeSerializationAdapter.class)
|
|
||||||
public static class LocalizationType {
|
public static class LocalizationType {
|
||||||
|
|
||||||
private static Map<String, LocalizationType> typeMap = new HashMap<String, LocalizationType>();
|
private static Map<String, LocalizationType> typeMap = new HashMap<String, LocalizationType>();
|
||||||
|
@ -324,7 +255,6 @@ public class LocalizationContext implements ISerializableObject, Cloneable {
|
||||||
*/
|
*/
|
||||||
@DynamicSerialize
|
@DynamicSerialize
|
||||||
@DynamicSerializeTypeAdapter(factory = LocalizationLevelSerializationAdapter.class)
|
@DynamicSerializeTypeAdapter(factory = LocalizationLevelSerializationAdapter.class)
|
||||||
@XmlJavaTypeAdapter(value = LocalizationLevelSerializationAdapter.class)
|
|
||||||
public static class LocalizationLevel implements
|
public static class LocalizationLevel implements
|
||||||
Comparable<LocalizationLevel> {
|
Comparable<LocalizationLevel> {
|
||||||
|
|
||||||
|
@ -486,15 +416,12 @@ public class LocalizationContext implements ISerializableObject, Cloneable {
|
||||||
BUNDLE, PLUGIN, COLORMAPS, CONFIG, PYTHON, SMARTINIT, GRID, SHAPEFILES, TEXTPRODUCTS
|
BUNDLE, PLUGIN, COLORMAPS, CONFIG, PYTHON, SMARTINIT, GRID, SHAPEFILES, TEXTPRODUCTS
|
||||||
};
|
};
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
private LocalizationType localizationType;
|
private LocalizationType localizationType;
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
private LocalizationLevel localizationLevel;
|
private LocalizationLevel localizationLevel;
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
private String contextName;
|
private String contextName;
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
package com.raytheon.uf.common.localization.msgs;
|
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.localization.LocalizationContext;
|
||||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
|
|
||||||
|
@ -17,17 +12,18 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Jun 4, 2010 rgeorge Initial creation
|
* Jun 4, 2010 rgeorge Initial creation
|
||||||
|
* Oct 1, 2013 2361 njensen Removed XML annotations
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author rgeorge
|
* @author rgeorge
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
|
||||||
@DynamicSerialize
|
@DynamicSerialize
|
||||||
public abstract class AbstractCommand implements ISerializableObject {
|
public abstract class AbstractCommand {
|
||||||
@XmlElement
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
protected LocalizationContext context;
|
protected LocalizationContext context;
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
package com.raytheon.uf.common.localization.msgs;
|
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.localization.LocalizationContext;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
|
@ -17,22 +12,21 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Jun 3, 2010 rgeorge Initial creation
|
* Jun 3, 2010 rgeorge Initial creation
|
||||||
|
* Oct 1, 2013 2361 njensen Removed XML annotations
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author rgeorge
|
* @author rgeorge
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
|
||||||
@DynamicSerialize
|
@DynamicSerialize
|
||||||
public class AbstractPrivilegedUtilityCommand extends AbstractCommand {
|
public class AbstractPrivilegedUtilityCommand extends AbstractCommand {
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
protected String filename;
|
protected String filename;
|
||||||
|
|
||||||
@XmlElement
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
protected String myContextName;
|
protected String myContextName;
|
||||||
|
|
||||||
|
|
|
@ -20,9 +20,6 @@
|
||||||
|
|
||||||
package com.raytheon.uf.common.localization.msgs;
|
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.localization.LocalizationContext;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
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.
|
* 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
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author chammack
|
* @author chammack
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
|
||||||
@DynamicSerialize
|
@DynamicSerialize
|
||||||
public abstract class AbstractUtilityCommand extends AbstractCommand {
|
public abstract class AbstractUtilityCommand extends AbstractCommand {
|
||||||
|
|
||||||
|
|
|
@ -20,13 +20,7 @@
|
||||||
|
|
||||||
package com.raytheon.uf.common.localization.msgs;
|
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.localization.LocalizationContext;
|
||||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
|
|
||||||
|
@ -38,30 +32,28 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Apr 19, 2007 chammack Initial Creation.
|
* 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
|
* Aug 22, 2008 #1502 bclement Added JAXB/Serializable annotations
|
||||||
|
* Oct 01, 2013 2361 njensen Removed XML annotations
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author chammack
|
* @author chammack
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
|
||||||
@DynamicSerialize
|
|
||||||
public abstract class AbstractUtilityResponse implements ISerializableObject {
|
|
||||||
|
|
||||||
@XmlElement
|
@DynamicSerialize
|
||||||
|
public abstract class AbstractUtilityResponse {
|
||||||
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
protected LocalizationContext context;
|
protected LocalizationContext context;
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
protected String pathName;
|
protected String pathName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Error message, null = no errors occurred
|
* Error message, null = no errors occurred
|
||||||
*/
|
*/
|
||||||
@XmlAttribute
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
protected String errorText;
|
protected String errorText;
|
||||||
|
|
||||||
|
|
|
@ -20,10 +20,6 @@
|
||||||
|
|
||||||
package com.raytheon.uf.common.localization.msgs;
|
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.localization.LocalizationContext;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
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
|
* Jul 30, 2007 njensen 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
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author njensen
|
* @author njensen
|
||||||
*/
|
*/
|
||||||
@XmlRootElement
|
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
|
||||||
@DynamicSerialize
|
@DynamicSerialize
|
||||||
public class DeleteUtilityCommand extends AbstractPrivilegedUtilityCommand {
|
public class DeleteUtilityCommand extends AbstractPrivilegedUtilityCommand {
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,6 @@
|
||||||
|
|
||||||
package com.raytheon.uf.common.localization.msgs;
|
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.localization.LocalizationContext;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
|
@ -37,19 +32,18 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Jul 30, 2007 njensen Initial creation
|
* 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
|
* Aug 22, 2008 #1502 bclement Added JAXB/Serializable annotations
|
||||||
|
* Oct 01, 2013 2361 njensen Removed XML annotations
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author njensen
|
* @author njensen
|
||||||
*/
|
*/
|
||||||
@XmlRootElement
|
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
|
||||||
@DynamicSerialize
|
@DynamicSerialize
|
||||||
public class DeleteUtilityResponse extends AbstractUtilityResponse {
|
public class DeleteUtilityResponse extends AbstractUtilityResponse {
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
private long timeStamp;
|
private long timeStamp;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@ package com.raytheon.uf.common.localization.msgs;
|
||||||
|
|
||||||
import java.util.Map;
|
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.DynamicSerialize;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
|
|
||||||
|
@ -44,7 +43,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
@DynamicSerialize
|
@DynamicSerialize
|
||||||
public class GetServersResponse implements ISerializableObject {
|
public class GetServersResponse {
|
||||||
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
private String httpServer;
|
private String httpServer;
|
||||||
|
|
|
@ -20,11 +20,6 @@
|
||||||
|
|
||||||
package com.raytheon.uf.common.localization.msgs;
|
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.IPathManager;
|
||||||
import com.raytheon.uf.common.localization.LocalizationContext;
|
import com.raytheon.uf.common.localization.LocalizationContext;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
|
@ -41,19 +36,18 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
* Date Ticket# Engineer Description
|
* 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
|
* Aug 22, 2008 1502 bclement Added JAXB/Serializable annotations
|
||||||
|
* Oct 01, 2013 2361 njensen Removed XML annotations
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author chammack
|
* @author chammack
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
@XmlRootElement
|
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
|
||||||
@DynamicSerialize
|
@DynamicSerialize
|
||||||
public class GetUtilityCommand extends AbstractUtilityCommand {
|
public class GetUtilityCommand extends AbstractUtilityCommand {
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
protected String fileName;
|
protected String fileName;
|
||||||
|
|
||||||
|
|
|
@ -20,12 +20,6 @@
|
||||||
|
|
||||||
package com.raytheon.uf.common.localization.msgs;
|
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.localization.LocalizationContext;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
|
@ -39,24 +33,22 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Apr 19, 2007 chammack Initial Creation.
|
* 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
|
* Aug 22, 2008 #1502 bclement Added JAXB/Serializable annotations
|
||||||
|
* Oct 01, 2013 2361 njensen Removed XML annotations
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author chammack
|
* @author chammack
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
@XmlRootElement
|
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
|
||||||
@DynamicSerialize
|
@DynamicSerialize
|
||||||
public class GetUtilityResponse extends AbstractUtilityResponse {
|
public class GetUtilityResponse extends AbstractUtilityResponse {
|
||||||
|
|
||||||
@XmlElement
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
protected byte[] data;
|
protected byte[] data;
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
protected String checksum;
|
protected String checksum;
|
||||||
|
|
||||||
|
@ -114,7 +106,8 @@ public class GetUtilityResponse extends AbstractUtilityResponse {
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
* @see com.raytheon.edex.msg.utility.AbstractUtilityResponse#getFormattedErrorMessage()
|
* @see com.raytheon.edex.msg.utility.AbstractUtilityResponse#
|
||||||
|
* getFormattedErrorMessage()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getFormattedErrorMessage() {
|
public String getFormattedErrorMessage() {
|
||||||
|
|
|
@ -19,11 +19,6 @@
|
||||||
**/
|
**/
|
||||||
package com.raytheon.uf.common.localization.msgs;
|
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.localization.LocalizationContext.LocalizationLevel;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
|
@ -38,7 +33,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Nov 2, 2010 mpduff Initial creation
|
* Nov 2, 2010 mpduff Initial creation
|
||||||
|
* Oct 1, 2013 2361 njensen Removed XML annotations
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -46,12 +42,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@XmlRootElement
|
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
|
||||||
@DynamicSerialize
|
@DynamicSerialize
|
||||||
public class ListContextCommand extends AbstractUtilityCommand {
|
public class ListContextCommand extends AbstractUtilityCommand {
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
private LocalizationLevel requestLevel;
|
private LocalizationLevel requestLevel;
|
||||||
|
|
||||||
|
|
|
@ -22,15 +22,8 @@ package com.raytheon.uf.common.localization.msgs;
|
||||||
|
|
||||||
import java.util.Date;
|
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;
|
||||||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
|
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.DynamicSerialize;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
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.
|
* 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
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author chammack
|
* @author chammack
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
@XmlRootElement
|
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
|
||||||
@DynamicSerialize
|
|
||||||
public class ListResponseEntry implements ISerializableObject {
|
|
||||||
|
|
||||||
@XmlAttribute
|
@DynamicSerialize
|
||||||
|
public class ListResponseEntry {
|
||||||
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
protected String fileName;
|
protected String fileName;
|
||||||
|
|
||||||
@XmlElement
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
protected LocalizationContext context;
|
protected LocalizationContext context;
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
protected Date date;
|
protected Date date;
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
protected String checksum;
|
protected String checksum;
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
protected boolean directory;
|
protected boolean directory;
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
protected LocalizationLevel protectedLevel;
|
protected LocalizationLevel protectedLevel;
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
protected boolean existsOnServer;
|
protected boolean existsOnServer;
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,6 @@
|
||||||
|
|
||||||
package com.raytheon.uf.common.localization.msgs;
|
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.IPathManager;
|
||||||
import com.raytheon.uf.common.localization.LocalizationContext;
|
import com.raytheon.uf.common.localization.LocalizationContext;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
|
@ -40,32 +35,28 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* 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
|
* Aug 22, 2008 #1502 bclement Added JAXB/Serializable annotations
|
||||||
|
* Oct 01, 2013 2361 njensen Removed XML annotations
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author chammack
|
* @author chammack
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
@XmlRootElement
|
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
|
||||||
@DynamicSerialize
|
@DynamicSerialize
|
||||||
public class ListUtilityCommand extends AbstractUtilityCommand {
|
public class ListUtilityCommand extends AbstractUtilityCommand {
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
String subDirectory;
|
String subDirectory;
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
boolean recursive;
|
boolean recursive;
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
private boolean filesOnly;
|
private boolean filesOnly;
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
private String localizedSite;
|
private String localizedSite;
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,6 @@
|
||||||
|
|
||||||
package com.raytheon.uf.common.localization.msgs;
|
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.localization.LocalizationContext;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
|
@ -37,20 +32,19 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Apr 19, 2007 chammack Initial Creation.
|
* 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
|
* Aug 22, 2008 #1502 bclement Added JAXB/Serializable annotations
|
||||||
|
* Oct 01, 2013 2361 njensen Removed XML annotations
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author chammack
|
* @author chammack
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
@XmlRootElement
|
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
|
||||||
@DynamicSerialize
|
@DynamicSerialize
|
||||||
public class ListUtilityResponse extends AbstractUtilityResponse {
|
public class ListUtilityResponse extends AbstractUtilityResponse {
|
||||||
|
|
||||||
@XmlElement
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
protected ListResponseEntry[] entries;
|
protected ListResponseEntry[] entries;
|
||||||
|
|
||||||
|
@ -60,7 +54,7 @@ public class ListUtilityResponse extends AbstractUtilityResponse {
|
||||||
public ListUtilityResponse() {
|
public ListUtilityResponse() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ListUtilityResponse(ListResponseEntry[] entries) {
|
public ListUtilityResponse(ListResponseEntry[] entries) {
|
||||||
this.entries = entries;
|
this.entries = entries;
|
||||||
}
|
}
|
||||||
|
@ -95,7 +89,8 @@ public class ListUtilityResponse extends AbstractUtilityResponse {
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
* @see com.raytheon.edex.msg.utility.AbstractUtilityResponse#getFormattedErrorMessage()
|
* @see com.raytheon.edex.msg.utility.AbstractUtilityResponse#
|
||||||
|
* getFormattedErrorMessage()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getFormattedErrorMessage() {
|
public String getFormattedErrorMessage() {
|
||||||
|
|
|
@ -19,16 +19,12 @@
|
||||||
**/
|
**/
|
||||||
package com.raytheon.uf.common.localization.msgs;
|
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.localization.IPathManager;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO Add Description
|
* A request for protected files.
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
*
|
*
|
||||||
|
@ -36,21 +32,20 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Aug 26, 2010 mschenke Initial creation
|
* Aug 26, 2010 mschenke Initial creation
|
||||||
|
* Oct 01, 2013 2361 njensen Removed XML annotations
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author mschenke
|
* @author mschenke
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
|
||||||
@DynamicSerialize
|
@DynamicSerialize
|
||||||
public class ProtectedFileCommand extends AbstractUtilityCommand {
|
public class ProtectedFileCommand extends AbstractUtilityCommand {
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
private String subPath;
|
private String subPath;
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
private String localizedSite;
|
private String localizedSite;
|
||||||
|
|
||||||
|
|
|
@ -19,34 +19,30 @@
|
||||||
**/
|
**/
|
||||||
package com.raytheon.uf.common.localization.msgs;
|
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.localization.LocalizationContext.LocalizationLevel;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO Add Description
|
* A response for protected files.
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
*
|
*
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Aug 26, 2010 mschenke Initial creation
|
* Aug 26, 2010 mschenke Initial creation
|
||||||
|
* Oct 01, 2013 2361 njensen Removed XML annotations
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author mschenke
|
* @author mschenke
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
|
||||||
@DynamicSerialize
|
@DynamicSerialize
|
||||||
public class ProtectedFileResponse extends AbstractUtilityResponse {
|
public class ProtectedFileResponse extends AbstractUtilityResponse {
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
private LocalizationLevel protectedLevel;
|
private LocalizationLevel protectedLevel;
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* SOFTWARE HISTORY
|
|
||||||
* Date Ticket# Engineer Description
|
|
||||||
* ------------ ---------- ----------- --------------------------
|
|
||||||
* Apr 19, 2007 chammack Initial Creation.
|
|
||||||
* Aug 22, 2008 1448 chammack Added Thrift Binary Support
|
|
||||||
*
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* @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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -22,11 +22,6 @@ package com.raytheon.uf.common.localization.msgs;
|
||||||
|
|
||||||
import java.util.Arrays;
|
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.DynamicSerialize;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
import com.raytheon.uf.common.serialization.comm.IServerRequest;
|
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.
|
* 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
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author chammack
|
* @author chammack
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
@XmlRootElement
|
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
|
||||||
@DynamicSerialize
|
@DynamicSerialize
|
||||||
public class UtilityRequestMessage implements IServerRequest {
|
public class UtilityRequestMessage implements IServerRequest {
|
||||||
|
|
||||||
@XmlElement
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
protected AbstractUtilityCommand[] commands;
|
protected AbstractUtilityCommand[] commands;
|
||||||
|
|
||||||
|
|
|
@ -20,12 +20,6 @@
|
||||||
|
|
||||||
package com.raytheon.uf.common.localization.msgs;
|
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.DynamicSerialize;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
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.
|
* 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
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author chammack
|
* @author chammack
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
@XmlRootElement
|
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
|
||||||
@DynamicSerialize
|
|
||||||
public class UtilityResponseMessage implements ISerializableObject {
|
|
||||||
|
|
||||||
@XmlElement
|
@DynamicSerialize
|
||||||
|
public class UtilityResponseMessage {
|
||||||
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
protected AbstractUtilityResponse[] responses;
|
protected AbstractUtilityResponse[] responses;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue