本文整理汇总了Java中org.pentaho.platform.api.usersettings.pojo.IUserSetting类的典型用法代码示例。如果您正苦于以下问题:Java IUserSetting类的具体用法?Java IUserSetting怎么用?Java IUserSetting使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IUserSetting类属于org.pentaho.platform.api.usersettings.pojo包,在下文中一共展示了IUserSetting类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSetting
import org.pentaho.platform.api.usersettings.pojo.IUserSetting; //导入依赖的package包/类
private IUserSetting getSetting( Map<String, String> settingsMap, String settingName, String defaultValue ) {
String value = settingsMap.get( settingName );
UserSetting setting = new UserSetting();
setting.setSettingName( settingName );
setting.setSettingValue( value != null ? value : defaultValue );
return setting;
}
示例2: getSettingsList
import org.pentaho.platform.api.usersettings.pojo.IUserSetting; //导入依赖的package包/类
private List<IUserSetting> getSettingsList( Map<String, String> settingsMap ) {
List<IUserSetting> settingsList = new ArrayList<IUserSetting>();
if ( settingsMap != null ) {
for ( Map.Entry<String, String> me : settingsMap.entrySet() ) {
IUserSetting userSetting = new UserSetting();
userSetting.setSettingName( me.getKey() );
userSetting.setSettingValue( me.getValue() );
settingsList.add( userSetting );
}
}
return settingsList;
}
示例3: equals
import org.pentaho.platform.api.usersettings.pojo.IUserSetting; //导入依赖的package包/类
public boolean equals(Object anotherSetting) {
// we define equality to mean that the settingName's are the same, not the values
if (anotherSetting == null || !(anotherSetting instanceof IUserSetting)) {
return false;
}
if (settingName.equals(((IUserSetting)anotherSetting).getSettingName())) {
return true;
}
return false;
}
示例4: getGlobalUserSetting
import org.pentaho.platform.api.usersettings.pojo.IUserSetting; //导入依赖的package包/类
@Override
public IUserSetting getGlobalUserSetting( String settingName, String defaultValue ) {
return getSetting( globalUserSettings, settingName, defaultValue );
}
示例5: getGlobalUserSettings
import org.pentaho.platform.api.usersettings.pojo.IUserSetting; //导入依赖的package包/类
@Override
public List<IUserSetting> getGlobalUserSettings() {
return getSettingsList( globalUserSettings );
}
示例6: getUserSetting
import org.pentaho.platform.api.usersettings.pojo.IUserSetting; //导入依赖的package包/类
@Override
public IUserSetting getUserSetting( String settingName, String defaultValue ) {
return getSetting( userSettings, settingName, defaultValue );
}
示例7: getUserSettings
import org.pentaho.platform.api.usersettings.pojo.IUserSetting; //导入依赖的package包/类
@Override
public List<IUserSetting> getUserSettings() {
return getSettingsList( userSettings );
}