当前位置: 首页>>代码示例>>Java>>正文


Java Strings.areStringsEqual方法代码示例

本文整理汇总了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);
    }
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:37,代码来源:ServiceProvisioningServiceBean.java

示例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());
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:9,代码来源:LdapSetting.java

示例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;
    }
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:30,代码来源:ManageUsersCtrl.java

示例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;
    }
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:10,代码来源:ManageUsersCtrl.java

示例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;
    }
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:10,代码来源:ManageUsersCtrl.java

示例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");
    }

}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:65,代码来源:UserModificationCheck.java

示例7: isResetPwdDisabled

import org.oscm.string.Strings; //导入方法依赖的package包/类
public boolean isResetPwdDisabled() {
    return Strings.areStringsEqual(ui.getMyUserId(), model.getUser()
            .getUserId())
            || model.isErrorOnRead();
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:6,代码来源:UpdateUserCtrl.java

示例8: isDeleteDisabled

import org.oscm.string.Strings; //导入方法依赖的package包/类
public boolean isDeleteDisabled() {
    return Strings.areStringsEqual(ui.getMyUserId(), model.getUser()
            .getUserId())
            || model.isErrorOnRead();
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:6,代码来源:UpdateUserCtrl.java


注:本文中的org.oscm.string.Strings.areStringsEqual方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。