當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。