本文整理汇总了Java中org.oscm.string.Strings.areStringsEqual方法的典型用法代码示例。如果您正苦于以下问题:Java Strings.areStringsEqual方法的具体用法?Java Strings.areStringsEqual怎么用?Java Strings.areStringsEqual使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.oscm.string.Strings
的用法示例。
在下文中一共展示了Strings.areStringsEqual方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkLicenseConstrainsAndStore
import org.oscm.string.Strings; //导入方法依赖的package包/类
/**
* Checks if the new license of the technical product can be changed. Saving
* is done when the technical product doesn't have a license in the provided
* locale or if no marketing products exist based on the technical product.
* In case the new license isn't set or equals the existing one, it isn't
* saved.
*
* @param tp
* the technical product value object to get the new license from
* @param locale
* the locale that is used for saving the license
* @param license
* The license for the technical product.
*/
private void checkLicenseConstrainsAndStore(TechnicalProduct tp,
String locale, String license) {
if (license == null) {
return;
}
List<VOLocalizedText> localizedValues = localizer.getLocalizedValues(
tp.getKey(), LocalizedObjectTypes.PRODUCT_LICENSE_DESC);
String storedLicense = null;
for (VOLocalizedText text : localizedValues) {
if (text.getLocale().equals(locale)) {
storedLicense = text.getText();
}
}
ProductLicenseValidator.validate(tp, storedLicense, license);
// save in DB only if they are different
if (!Strings.areStringsEqual(storedLicense, license)) {
localizer.storeLocalizedResource(locale, tp.getKey(),
LocalizedObjectTypes.PRODUCT_LICENSE_DESC, license);
}
}
示例2: equals
import org.oscm.string.Strings; //导入方法依赖的package包/类
public boolean equals(Object setting) {
if (!(setting instanceof POLdapSetting)) {
return false;
}
POLdapSetting otherSetting = (POLdapSetting) setting;
return Strings
.areStringsEqual(settingKey, otherSetting.getSettingKey());
}
示例3: save
import org.oscm.string.Strings; //导入方法依赖的package包/类
public String save() throws SaaSApplicationException {
ManageUsersModel m = getModel();
if (!m.isTokenValid()) {
return null;
}
POUserDetails ud = toPOUserDetails(m);
try {
Response r = getUserService().saveUser(ud);
if (Strings
.areStringsEqual(ui.getMyUserId(), m.getSelectedUserId())) {
ui.handle(r, BaseBean.INFO_USER_SAVED_ITSELF, ud.getUserId());
refreshUser();
ui.updateAndVerifyViewLocale();
} else {
ui.handle(r, BaseBean.INFO_USER_SAVED, ud.getUserId());
}
m.resetToken();
m.setInitialized(false);
m.setSelectedUserId(ud.getUserId());
sessionBean.setSelectedUserId(ud.getUserId());
} catch (ConcurrentModificationException e) {
ui.handleException(e);
resetListOnly = true;
}
return null;
}
示例4: isResetPasswordDisabled
import org.oscm.string.Strings; //导入方法依赖的package包/类
public boolean isResetPasswordDisabled() {
ManageUsersModel m = getModel();
boolean result = Strings.isEmpty(m.getSelectedUserId())
|| Strings.areStringsEqual(ui.getMyUserId(),
m.getSelectedUserId());
return result;
}
示例5: isDeleteDisabled
import org.oscm.string.Strings; //导入方法依赖的package包/类
public boolean isDeleteDisabled() {
ManageUsersModel m = getModel();
boolean result = Strings.isEmpty(m.getSelectedUserId())
|| Strings.areStringsEqual(ui.getMyUserId(),
m.getSelectedUserId());
return result;
}
示例6: check
import org.oscm.string.Strings; //导入方法依赖的package包/类
/**
* <p>
* Checks whether the changes applied to the primitive type attributes of
* the user violate the configuration of existing LDAP mappings. If so, an
* exception of type UnsupportedOperationException is thrown. If any of the
* parameters is <code>null</code>, the operation will abort without an
* exception.
* </p>
* <p>
* <b>Note: </b>This method does not perform any validation of the defined
* values.
* </p>
*
* @param originalUser
* The unmodified user as e.g. currently stored in the database.
* @param modifiedUser
* The user object containing the changes to be checked.
*/
public void check(PlatformUser originalUser, PlatformUser modifiedUser) {
if (originalUser == null || modifiedUser == null) {
return;
}
boolean isAdditionalNameMapped = mappedLdapSettings
.contains(SettingType.LDAP_ATTR_ADDITIONAL_NAME);
if (isAdditionalNameMapped
&& !Strings.areStringsEqual(originalUser.getAdditionalName(),
modifiedUser.getAdditionalName())) {
handleViolation("additionalName");
}
boolean isFirstNameMapped = mappedLdapSettings
.contains(SettingType.LDAP_ATTR_FIRST_NAME);
if (isFirstNameMapped
&& !Strings.areStringsEqual(originalUser.getFirstName(),
modifiedUser.getFirstName())) {
handleViolation("firstName");
}
boolean isLastNameMapped = mappedLdapSettings
.contains(SettingType.LDAP_ATTR_LAST_NAME);
if (isLastNameMapped
&& !Strings.areStringsEqual(originalUser.getLastName(),
modifiedUser.getLastName())) {
handleViolation("lastName");
}
boolean isEmailMapped = mappedLdapSettings
.contains(SettingType.LDAP_ATTR_EMAIL);
if (isEmailMapped
&& !Strings.areStringsEqual(originalUser.getEmail(),
modifiedUser.getEmail())) {
handleViolation("email");
}
boolean isUserIdMapped = mappedLdapSettings
.contains(SettingType.LDAP_ATTR_UID);
if (isUserIdMapped
&& !Strings.areStringsEqual(originalUser.getUserId(),
modifiedUser.getUserId())) {
handleViolation("userId");
}
}
示例7: isResetPwdDisabled
import org.oscm.string.Strings; //导入方法依赖的package包/类
public boolean isResetPwdDisabled() {
return Strings.areStringsEqual(ui.getMyUserId(), model.getUser()
.getUserId())
|| model.isErrorOnRead();
}
示例8: isDeleteDisabled
import org.oscm.string.Strings; //导入方法依赖的package包/类
public boolean isDeleteDisabled() {
return Strings.areStringsEqual(ui.getMyUserId(), model.getUser()
.getUserId())
|| model.isErrorOnRead();
}