📄 mapprepostsethandler.java
字号:
package com.extension;
import com.weather.LocalWeatherDocumentXmlBean.LocalWeather;
import org.apache.xmlbeans.*;
import javax.xml.namespace.QName;
public class MapPrePostSetHandler {
/**
* Returns false, if Client application tries to modify map represented by contents of image element.
*/
public static boolean preSet(int operationType, XmlObject xo, QName propertyName, boolean isAttr, int indexOfItem) {
javax.xml.namespace.QName imageQName = new javax.xml.namespace.QName("http://www.helloWeather.com/weather","image");
// If xmlbeans object is an instance of com.weather.LocalWeatherDocumentXmlBean.LocalWeather, and
// property to be modified is image element belonging to "http://www.helloWeather.com/weather" namespace,
// then return false, else return true.
if( (xo instanceof LocalWeather) && ( propertyName.equals(imageQName) ) )
{
return false;
}
return true;
}
/**
* Empty
*/
public static void postSet(int operationType, XmlObject xo, QName propertyName, boolean isAttr, int indexOfItem) {
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -