Omaha #4515 Removal of no longer needed xmit field.
Change-Id: I73580d7776702c56c656db769f64e2eaa5a03eed Former-commit-id: 3c26b3056dd8ff2c4937386d7046df41b7d6b02f
This commit is contained in:
parent
921761af36
commit
3ec2a46074
3 changed files with 55 additions and 24 deletions
|
@ -33,6 +33,7 @@ import javax.xml.bind.annotation.XmlElement;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* 2/6/2008 817 grichard Initial creation
|
||||
* 5/20/2015 4510 rferrel Added {@link #getFormattedId()}.
|
||||
* 06/09/2015 4515 rferrel Remove no longer needed xmit field.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -53,12 +54,6 @@ public class ForecasterConfig {
|
|||
@XmlElement(name = "name")
|
||||
private String forecasterName;
|
||||
|
||||
/**
|
||||
* The forecaster's transmit privilege
|
||||
*/
|
||||
@XmlElement(name = "xmit")
|
||||
private String xmitPrivilege;
|
||||
|
||||
/**
|
||||
* Getters and setters
|
||||
*/
|
||||
|
@ -67,10 +62,6 @@ public class ForecasterConfig {
|
|||
return forecasterName;
|
||||
}
|
||||
|
||||
public boolean getXmitPrivilege() {
|
||||
return Boolean.parseBoolean(xmitPrivilege);
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return forecasterId;
|
||||
}
|
||||
|
@ -89,10 +80,6 @@ public class ForecasterConfig {
|
|||
this.forecasterName = name;
|
||||
}
|
||||
|
||||
public void setXmit(boolean privilege) {
|
||||
this.xmitPrivilege = Boolean.toString(privilege);
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.forecasterId = id;
|
||||
}
|
||||
|
|
52
deltaScripts/16.1.1/DR4515/updateAviationForecasterConfig.sh
Executable file
52
deltaScripts/16.1.1/DR4515/updateAviationForecasterConfig.sh
Executable file
|
@ -0,0 +1,52 @@
|
|||
#!/bin/bash
|
||||
# DR #4515 - remove the <xmit> tags from aviationForecasterConfig.xml files.
|
||||
|
||||
cave_static=/awips2/edex/data/utility/cave_static
|
||||
|
||||
file_name=aviation/avnwatch/aviationForecasterConfig.xml
|
||||
|
||||
function updateFile {
|
||||
grep -sq '<xmit>' $1
|
||||
if [ $? == 0 ] ; then
|
||||
echo "Updating $1"
|
||||
# this sed script combines all lines in order to pick up
|
||||
# <xmit>...</xmit> pair placed on multiple lines.
|
||||
sed -i-old -e ':loop
|
||||
$!{
|
||||
N
|
||||
/\n$/!b loop
|
||||
}
|
||||
s/<xmit>[^<]*<\/xmit>//g
|
||||
s/\n\s*\n/\n/g' ${1}
|
||||
fi
|
||||
}
|
||||
|
||||
function renameFile {
|
||||
echo "Renaming $1"
|
||||
rm -f ${1}-bad
|
||||
mv $1 ${1}-bad
|
||||
}
|
||||
|
||||
echo "INFO: removing <xmit> tags from aviationForecasterConfig.xml files."
|
||||
|
||||
for d in region site ;
|
||||
do
|
||||
echo Checking $d
|
||||
for f in `ls ${cave_static}/${d}/*/$file_name 2> /dev/null` ;
|
||||
do
|
||||
updateFile $f
|
||||
done
|
||||
echo "Done $d"
|
||||
done
|
||||
|
||||
for d in user workstation ;
|
||||
do
|
||||
echo "Checking $d"
|
||||
for f in `ls ${cave_static}/${d}/*/$file_name 2> /dev/null` ;
|
||||
do
|
||||
renameFile $f
|
||||
done
|
||||
echo "Done $d"
|
||||
done
|
||||
|
||||
echo "INFO: Done."
|
|
@ -1,42 +1,34 @@
|
|||
<!--
|
||||
The xmit tag is no longer used and can be removed. Permissions are now determined using CAVE's
|
||||
AWIPS User Administration under Component "Official User Product in the Official User Product Users Tab
|
||||
assigning the Defined Roles/Permissions "awips.oup". Note if user ALL is defined then everyone has the permission.
|
||||
This associates a user's login name to the desired forecaster id used when issuing forecasts (TAFs).
|
||||
Note id 0 should not be used since that is reserved for creating VFT products.
|
||||
-->
|
||||
<aviationForecasterConfig>
|
||||
<forecaster>
|
||||
<id>001</id>
|
||||
<name>Amanda</name>
|
||||
<xmit>true</xmit>
|
||||
</forecaster>
|
||||
<forecaster>
|
||||
<id>002</id>
|
||||
<name>Bailing</name>
|
||||
<xmit>true</xmit>
|
||||
</forecaster>
|
||||
<forecaster>
|
||||
<id>003</id>
|
||||
<name>Belinda</name>
|
||||
<xmit>true</xmit>
|
||||
</forecaster>
|
||||
<forecaster>
|
||||
<id>004</id>
|
||||
<name>George</name>
|
||||
<xmit>true</xmit>
|
||||
</forecaster>
|
||||
<forecaster>
|
||||
<id>005</id>
|
||||
<name>Mark</name>
|
||||
<xmit>true</xmit>
|
||||
</forecaster>
|
||||
<forecaster>
|
||||
<id>006</id>
|
||||
<name>Matt</name>
|
||||
<xmit>true</xmit>
|
||||
</forecaster>
|
||||
<forecaster>
|
||||
<id>007</id>
|
||||
<name>Mike</name>
|
||||
<xmit>true</xmit>
|
||||
</forecaster>
|
||||
</aviationForecasterConfig>
|
Loading…
Add table
Reference in a new issue