/** * @see org.opencms.main.CmsRuntimeException#createException(org.opencms.i18n.CmsMessageContainer, java.lang.Throwable) */ @Override public CmsRuntimeException createException(CmsMessageContainer container, Throwable cause) { return new CmsIllegalStateException(container, cause); } }
/** * @see org.opencms.main.CmsRuntimeException#createException(org.opencms.i18n.CmsMessageContainer, java.lang.Throwable) */ @Override public CmsRuntimeException createException(CmsMessageContainer container, Throwable cause) { return new CmsIllegalStateException(container, cause); } }
/** * @see org.opencms.workplace.list.A_CmsListDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { // test the needed parameters if (getParamIndexsource() == null) { throw new CmsIllegalStateException(Messages.get().container( Messages.ERR_SEARCHINDEX_EDIT_MISSING_PARAM_1, A_CmsEditIndexSourceDialog.PARAM_INDEXSOURCE)); } }
/** * @see org.opencms.workplace.list.A_CmsListDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { // test the needed parameters if (getParamIndexsource() == null) { throw new CmsIllegalStateException(Messages.get().container( Messages.ERR_SEARCHINDEX_EDIT_MISSING_PARAM_1, A_CmsEditIndexSourceDialog.PARAM_INDEXSOURCE)); } }
/** * Sets the fields parameter value.<p> * * @param fields the fields parameter value to set */ public void setFields(String fields) { if (CmsStringUtil.isEmptyOrWhitespaceOnly(fields)) { throw new CmsIllegalStateException(Messages.get().container(Messages.ERR_VALIDATE_SEARCH_PARAMS_0)); } m_fields = fields; }
/** * @see org.opencms.workplace.list.A_CmsListDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { // test the needed parameters if (getParamIndexName() == null) { throw new CmsIllegalStateException(Messages.get().container( Messages.ERR_SEARCHINDEX_EDIT_MISSING_PARAM_1, A_CmsEditSearchIndexDialog.PARAM_INDEXNAME)); } }
/** * @see org.opencms.workplace.list.A_CmsListDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { // test the needed parameters if (getParamIndexName() == null) { throw new CmsIllegalStateException(Messages.get().container( Messages.ERR_SEARCHINDEX_EDIT_MISSING_PARAM_1, A_CmsEditSearchIndexDialog.PARAM_INDEXNAME)); } }
/** * @see org.opencms.workplace.list.A_CmsListDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { // test the needed parameters if (getParamIndexsource() == null) { throw new CmsIllegalStateException(Messages.get().container( Messages.ERR_SEARCHINDEX_EDIT_MISSING_PARAM_1, A_CmsEditIndexSourceDialog.PARAM_INDEXSOURCE)); } }
/** * Sets the fields parameter value.<p> * * @param fields the fields parameter value to set */ public void setFields(String fields) { if (CmsStringUtil.isEmptyOrWhitespaceOnly(fields)) { throw new CmsIllegalStateException(Messages.get().container(Messages.ERR_VALIDATE_SEARCH_PARAMS_0)); } m_fields = fields; }
/** * @see org.opencms.workplace.list.A_CmsListDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { // test the needed parameters if (getParamIndexName() == null) { throw new CmsIllegalStateException(Messages.get().container( Messages.ERR_SEARCHINDEX_EDIT_MISSING_PARAM_1, A_CmsEditSearchIndexDialog.PARAM_INDEXNAME)); } }
/** * @see org.opencms.workplace.CmsWidgetDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { if (!isNewSearchIndex()) { // test the needed parameters: if initial we have "indexname", if from same widget we have name.0 if ((getParamIndexName() == null) && (getJsp().getRequest().getParameter("name.0") == null)) { throw new CmsIllegalStateException( Messages.get().container(Messages.ERR_SEARCHINDEX_EDIT_MISSING_PARAM_1, PARAM_INDEXNAME)); } } }
/** * @see org.opencms.workplace.CmsWidgetDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { if (!isNewFieldConfiguration()) { // test the needed parameters if ((getParamFieldconfiguration() == null) && (getJsp().getRequest().getParameter("name.0") == null)) { throw new CmsIllegalStateException( Messages.get().container(Messages.ERR_SEARCHINDEX_EDIT_MISSING_PARAM_1, PARAM_FIELDCONFIGURATION)); } } }
/** * @see org.opencms.workplace.CmsWidgetDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { if (!isNewField()) { // test the needed parameters if ((getParamField() == null) && (getJsp().getRequest().getParameter("name.0") == null)) { throw new CmsIllegalStateException( Messages.get().container(Messages.ERR_SEARCHINDEX_EDIT_MISSING_PARAM_1, PARAM_FIELD)); } } }
/** * @see org.opencms.workplace.CmsWidgetDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { if (!isNewIndexSource()) { // test the needed parameters if ((getParamIndexsource() == null) && (getJsp().getRequest().getParameter("name.0") == null)) { throw new CmsIllegalStateException( Messages.get().container(Messages.ERR_SEARCHINDEX_EDIT_MISSING_PARAM_1, PARAM_INDEXSOURCE)); } } } }
/** * @see org.opencms.workplace.CmsWidgetDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { if (!isNewMapping()) { // test the needed parameters if ((getParamField() == null) && (getJsp().getRequest().getParameter("name.0") == null)) { throw new CmsIllegalStateException( Messages.get().container(Messages.ERR_SEARCHINDEX_EDIT_MISSING_PARAM_1, PARAM_FIELD)); } } } }
/** * Sets the new password for the current logged in user.<p> * * @throws CmsException if something goes wrong */ public void applyChanges() throws CmsException { if (m_userName == null) { throw new CmsIllegalStateException(Messages.get().container(Messages.ERR_INVALID_USER_CONTEXT_0)); } validate(); m_cms.setPassword(m_userName, getCurrentPwd(), getNewPwd()); }
/** * Sets the new password for the current logged in user.<p> * * @throws CmsException if something goes wrong */ public void applyChanges() throws CmsException { if (m_userName == null) { throw new CmsIllegalStateException(Messages.get().container(Messages.ERR_INVALID_USER_CONTEXT_0)); } validate(); m_cms.setPassword(m_userName, getCurrentPwd(), getNewPwd()); }
/** * Sets the fields parameter value.<p> * * @param fields the fields parameter value to set */ public void setFields(String fields) { String searchPage = getJsp().getRequest().getParameter("searchPage"); if (CmsStringUtil.isEmptyOrWhitespaceOnly(searchPage) && CmsStringUtil.isEmptyOrWhitespaceOnly(fields)) { throw new CmsIllegalStateException( org.opencms.workplace.search.Messages.get().container( org.opencms.workplace.search.Messages.ERR_VALIDATE_SEARCH_PARAMS_0)); } m_searchParams.setFields(CmsStringUtil.splitAsList(fields, ",")); }
/** * Sets the current password.<p> * * @param currentPwd the current password to set */ public void setCurrentPwd(String currentPwd) { if (m_userName == null) { throw new CmsIllegalStateException(Messages.get().container(Messages.ERR_INVALID_USER_CONTEXT_0)); } try { m_cms.readUser(m_userName, currentPwd); } catch (CmsException e) { throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_INVALID_USER_PWD_1, m_userName)); } m_currentPwd = currentPwd; }
/** * Sets the current password.<p> * * @param currentPwd the current password to set */ public void setCurrentPwd(String currentPwd) { if (m_userName == null) { throw new CmsIllegalStateException(Messages.get().container(Messages.ERR_INVALID_USER_CONTEXT_0)); } try { m_cms.readUser(m_userName, currentPwd); } catch (CmsException e) { throw new CmsIllegalArgumentException( Messages.get().container(Messages.ERR_INVALID_USER_PWD_1, m_userName)); } m_currentPwd = currentPwd; }