Initializes fields with data from setup bean.

@param the webapp name (null for root webapp)
9862
public void initFromSetupBean(String webapp) {

        String db = m_setupBean.getDatabase();
        CmsSetupBean bean = m_setupBean;
        Map<String, String[]> params = new HashMap<>();
        m_setupPanel.setVisible(true);
        switch (db) {
            case "mysql":
            case "mssql":
                setVisible(
                    m_dbCreateUser,
                    m_dbCreatePwd,
                    m_dbWorkUser,
                    m_dbWorkPwd,
                    m_dbCreateConStr,
                    m_dbName,
                    m_createDb,
                    m_dropDatabase);
                m_dbCreateUser.setValue(bean.getDbCreateUser());
                m_dbCreatePwd.setValue(bean.getDbCreatePwd());
                m_dbWorkUser.setValue(bean.getDbWorkUser());
                m_dbWorkPwd.setValue(bean.getDbWorkPwd());
                m_dbCreateConStr.setValue(bean.getDbCreateConStr());
                m_dbName.setValue(webapp != null ? webapp : bean.getDb());
                m_createDb.setValue(true);
                m_createDb.setCaption("Create database and tables");
                m_dropDatabase.setValue(false);
                break;
            case "postgresql":
                setVisible(
                    m_dbCreateUser,
                    m_dbCreatePwd,
                    m_dbWorkUser,
                    m_dbWorkPwd,
                    m_dbCreateConStr,
                    m_dbName,
                    m_createDb,
                    m_createTables,
                    m_dropDatabase,
                    m_templateDb);
                m_dbCreateUser.setValue(bean.getDbCreateUser());
                m_dbCreatePwd.setValue(bean.getDbCreatePwd());
                m_dbWorkUser.setValue(bean.getDbWorkUser());
                m_dbWorkPwd.setValue(bean.getDbWorkPwd());
                m_dbCreateConStr.setValue(bean.getDbCreateConStr());
                m_dbName.setValue(webapp != null ? webapp : bean.getDb());
                m_createDb.setValue(true);
                m_createDb.setCaption("Create database and user");
                m_templateDb.setValue(dbProp("templateDb"));
                m_createTables.setValue(true);
                m_dropDatabase.setValue(false);
                break;
            case "hsqldb":
                setVisible(
                    m_dbCreateUser,
                    m_dbCreatePwd,
                    m_dbWorkUser,
                    m_dbWorkPwd,
                    m_dbCreateConStr,
                    m_createDb,
                    m_dropDatabase);

                m_dbCreateUser.setValue(bean.getDbCreateUser());
                m_dbCreatePwd.setValue(bean.getDbCreatePwd());
                m_dbWorkUser.setValue(bean.getDbWorkUser());
                m_dbWorkPwd.setValue(bean.getDbWorkPwd());
                m_createDb.setValue(true);
                m_createDb.setCaption("Create database and tables");
                m_dropDatabase.setValue(false);
                String origCreateConStr = bean.getDbProperty("hsqldb.constr");
                String createConStr = bean.getDbCreateConStr();
                if ((origCreateConStr != null) && origCreateConStr.equals(createConStr)) {
                    createConStr = "jdbc:hsqldb:file:"
                        + bean.getWebAppRfsPath()
                        + "WEB-INF"
                        + File.separatorChar
                        + "hsqldb"
                        + File.separatorChar
                        + "opencms;shutdown=false";
                }
                m_dbCreateConStr.setValue(createConStr);
                break;
            case "oracle":
                setVisible(
                    m_dbCreateUser,
                    m_dbCreatePwd,
                    m_dbWorkUser,
                    m_dbWorkPwd,
                    m_dbCreateConStr,
                    m_createDb,
                    m_createTables,
                    m_dropDatabase,
                    m_temporaryTablespace,
                    m_indexTablespace,
                    m_defaultTablespace);
                m_dbCreateUser.setValue(bean.getDbCreateUser());
                m_dbCreatePwd.setValue(bean.getDbCreatePwd());
                m_dbWorkUser.setValue(bean.getDbWorkUser());
                m_dbWorkPwd.setValue(bean.getDbWorkPwd());
                m_dbCreateConStr.setValue(bean.getDbCreateConStr());
                m_dbName.setValue(webapp != null ? webapp : bean.getDb());
                m_createDb.setValue(true);
                m_createDb.setCaption("Create user");
                m_createTables.setValue(true);
                m_dropDatabase.setValue(false);
                m_temporaryTablespace.setValue(dbProp("temporaryTablespace"));
                m_indexTablespace.setValue(dbProp("indexTablespace"));
                m_defaultTablespace.setValue(dbProp("defaultTablespace"));
                break;
            case "db2":
            case "as400":
                setVisible(m_dbWorkUser, m_dbWorkPwd, m_dbCreateConStr, m_dbName, m_createTables);
                m_setupPanel.setVisible(false);
                m_dbWorkUser.setValue(bean.getDbWorkUser());
                m_dbWorkPwd.setValue(bean.getDbWorkPwd());
                m_dbCreateConStr.setValue(bean.getDbCreateConStr());
                m_dbName.setValue(webapp != null ? webapp : bean.getDb());
                m_createDb.setValue(false);
                m_createTables.setValue(true);
                m_dropDatabase.setValue(true);
                break;
            default:
                break;
        }
    }
422253
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, CLASS_INFO_CLASS_NAME, 40, null, null);
        field = new FieldInfo(this, CLASS_INFO_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, CLASS_FIELD_CLASS, 60, null, null);
        field = new FieldInfo(this, CLASS_FIELD_SEQUENCE, 10, null, new Integer(0));
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, CLASS_FIELD_NAME, 40, null, null);
        field = new FieldInfo(this, CLASS_FIELD_DESC, 30, null, null);
        field = new FieldInfo(this, CLASS_FIELD_PROTECT, 30, null, null);
        field = new FieldInfo(this, CLASS_FIELD_INITIAL, 32000, null, null);
        field = new FieldInfo(this, CLASS_FIELD_INITIAL_VALUE, 32000, null, null);
        field = new FieldInfo(this, CLASS_FIELDS_TYPE, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, INCLUDE_SCOPE, 10, null, new Integer(0x004));
        field.setDataClass(Integer.class);
    }
527326
public void init(ServletConfig config) throws ServletException {
        /*
         * Never forget super.init()!
         */
        super.init(config);

        /*
         * Grab the servlet context.
         */
        this.servletContext = config.getServletContext();

        // Get verbosity hint.
        String value = config.getInitParameter("verbose");
        if (value != null) {
            this.verbose = Boolean.valueOf(value);
        }

        // get encoding
        value = config.getInitParameter("encoding");
        if (value != null) {
            this.encoding = value;
        }

        // And now the real init work...
        if (verbose) {
            log("Parsing init parameters...");
        }

        String regex = config.getInitParameter(INIT_PARAM_RESOURCE_NAME_REGEX);
        if (regex != null) {
            String replacement = config.getInitParameter("resource.name.replacement");
            if (replacement == null) {
                Exception npex = new NullPointerException("resource.name.replacement");
                String message = "Init-param 'resource.name.replacement' not specified!";
                log(message, npex);
                throw new ServletException(message, npex);
            } else if ("EMPTY_STRING".equals(replacement)) {//<param-value></param-value> is prohibited
                replacement = "";
            }
            int flags = 0; // TODO : Parse pattern compile flags (literal names).
            String flagsStr = config.getInitParameter(INIT_PARAM_RESOURCE_NAME_REGEX_FLAGS);
            if (flagsStr != null && flagsStr.length() > 0) {
              flags = Integer.decode(flagsStr.trim());//throws NumberFormatException
            }
            resourceNamePattern = Pattern.compile(regex, flags);
            this.resourceNameReplacement = replacement;
            String all = config.getInitParameter("resource.name.replace.all");
            if (all != null) {
                this.resourceNameReplaceAll = Boolean.valueOf(all.trim());
            }
        }

        value = config.getInitParameter("logGROOVY861");
        if (value != null) {
            this.logGROOVY861 = Boolean.valueOf(value);
            // nothing else to do here
        }

        /*
         * If verbose, log the parameter values.
         */
        if (verbose) {
            log("(Abstract) init done. Listing some parameter name/value pairs:");
            log("verbose = " + verbose); // this *is* verbose! ;)
            log("reflection = " + reflection);
            log("logGROOVY861 = " + logGROOVY861);
            log(INIT_PARAM_RESOURCE_NAME_REGEX + " = " + resourceNamePattern);//toString == pattern
            log("resource.name.replacement = " + resourceNameReplacement);
        }
    }
404954
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, SYSTEM_ID, 10, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, OBJECT_ID, 10, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, CLASS_NAME, 255, null, null);
        field = new FieldInfo(this, DATABASE_NAME, 255, null, null);
        field = new FieldInfo(this, INIT_TIME, 25, null, null);
        field.setDataClass(Date.class);
        field = new FieldInfo(this, FREE_TIME, 25, null, null);
        field.setDataClass(Date.class);
        field = new FieldInfo(this, RECORD_OWNER, 255, null, null);
        field = new FieldInfo(this, STACK_TRACE, 32000, null, null);
    }
949937
public void init()
    {
        ServletContext config=getServletContext();
        _servletHandler=((ServletHandler.Context)config).getServletHandler();

        Enumeration e = getInitParameterNames();
        while(e.hasMoreElements())
        {
            String param=(String)e.nextElement();
            String value=getInitParameter(param);
            String lvalue=value.toLowerCase();
            if ("nonContextServlets".equals(param))
            {
                _nonContextServlets=value.length()>0 && lvalue.startsWith("t");
            }
            if ("verbose".equals(param))
            {
                _verbose=value.length()>0 && lvalue.startsWith("t");
            }
            else
            {
                if (_parameters==null)
                    _parameters=new HashMap();
                _parameters.put(param,value);
            }
        }
    }
616488
public void init(ServletContext context) {
        if (profiles != null) {
            for (IDiagramProfile profile : profiles) {
                profile.init(context);
                _registry.put(profile.getName(),
                              profile);
            }
        }
    }
784809
public void init(ServletConfig servletConfig) throws ServletException
    {
        super.init(servletConfig);
        ServletTask.initServlet(this, BasicServlet.SERVLET_TYPE.XML);
        Enumeration<?> paramNames = this.getInitParameterNames();
        while (paramNames.hasMoreElements())
        {
            String strProperty = (String)paramNames.nextElement();
            String strValue = this.getInitParameter(strProperty);
            m_initProperties.put(strProperty, strValue);
        }
    }
1113232
private void initialize() {
		if (selection != null && selection.isEmpty() == false
				&& selection instanceof IStructuredSelection) {
			IStructuredSelection iStructuredSelection = (IStructuredSelection) selection;
			
			if (iStructuredSelection.size() > 0) {
				Object selectedObject = iStructuredSelection.getFirstElement();
				IProject project = null;
				
				if (selectedObject instanceof IJavaProject) {
					project = ((IJavaProject)selectedObject).getProject();
				} else if (selectedObject instanceof IJavaElement) {
					IJavaProject jProject= ((IJavaElement)selectedObject).getJavaProject();
					project = jProject.getProject();
				} else if (selectedObject instanceof IResource) {
					project = ((IResource)selectedObject).getProject();
				} 
				
				if (project != null) {
					projectText.setText(project.getName());
				}
			}
		}
		serviceText.setText("mySample");
	}
1022668
private void init()
	{
		
		faultErrorMap = new HashMap<String,FaultError>();
		
		faultErrorMap.put(SetupException.class.getName(), new FaultError(SetupException.DEFAULT_ERROR_CODE,SetupException.DEFAULT_ERROR_CATEGORY));
		faultErrorMap.put(ConnectionException.class.getName(), new FaultError(SetupException.DEFAULT_ERROR_CODE,SetupException.DEFAULT_ERROR_CATEGORY));
		faultErrorMap.put(ConfigException.class.getName(), new FaultError(SetupException.DEFAULT_ERROR_CODE,SetupException.DEFAULT_ERROR_CATEGORY));
		
	}
222151
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, MESSAGE_INFO_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, MESSAGE_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, MESSAGE_STATUS_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, MESSAGE_TRANSPORT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, MESSAGE_PROCESS_INFO_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, CONTACT_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, CONTACT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, DESCRIPTION, 60, null, null);
        field = new FieldInfo(this, MESSAGE_TIME, 25, null, null);
        field.setDataClass(Date.class);
        field = new FieldInfo(this, TIMEOUT_SECONDS, 10, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, TIMEOUT_TIME, 25, null, null);
        field.setDataClass(Date.class);
        field = new FieldInfo(this, USER_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, REFERENCE_TYPE, 60, null, null);
        field = new FieldInfo(this, REFERENCE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, RESPONSE_MESSAGE_LOG_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, MESSAGE_HEADER_PROPERTIES, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, MESSAGE_INFO_PROPERTIES, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, MESSAGE_TRANSPORT_PROPERTIES, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, MESSAGE_CLASS_NAME, 128, null, null);
        field = new FieldInfo(this, MESSAGE_HEADER_CLASS_NAME, 128, null, null);
        field = new FieldInfo(this, MESSAGE_DATA_CLASS_NAME, 128, null, null);
        field = new FieldInfo(this, EXTERNAL_MESSAGE_CLASS_NAME, 128, null, null);
        field = new FieldInfo(this, MESSAGE_QUEUE_NAME, 60, null, null);
        field = new FieldInfo(this, MESSAGE_QUEUE_TYPE, 60, null, null);
        field = new FieldInfo(this, MESSAGE_DATA_TYPE, 30, null, null);
        field = new FieldInfo(this, XML_MESSAGE_DATA, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, MESSAGE_DATA, 32000, null, null);
        field = new FieldInfo(this, ERROR_TEXT, 127, null, null);
    }
1325416
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, SEQUENCE, 10, null, new Integer(1000));
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, METHOD_NAME, 40, null, null);
        field = new FieldInfo(this, LOGIC_DESCRIPTION, 32000, null, null);
        field = new FieldInfo(this, METHOD_RETURNS, 255, null, null);
        field = new FieldInfo(this, METHOD_INTERFACE, 255, null, null);
        field = new FieldInfo(this, METHOD_CLASS_NAME, 40, null, null);
        field = new FieldInfo(this, LOGIC_SOURCE, 32000, null, null);
        field = new FieldInfo(this, LOGIC_THROWS, 255, null, null);
        field = new FieldInfo(this, PROTECTION, 60, null, null);
        field = new FieldInfo(this, COPY_FROM, 40, null, null);
        field = new FieldInfo(this, INCLUDE_SCOPE, 10, null, new Integer(0x004));
        field.setDataClass(Integer.class);
    }
171836
protected void initUserObject() {

        if (m_fieldconfiguration == null) {
            try {
                m_fieldconfiguration = m_searchManager.getFieldConfiguration(
                    getParamFieldconfiguration());
                if (m_fieldconfiguration == null) {
                    m_fieldconfiguration = new CmsLuceneFieldConfiguration();
                }
            } catch (Exception e) {
                m_fieldconfiguration = new CmsLuceneFieldConfiguration();
            }
        }

        if (m_field == null) {
            try {
                Iterator<CmsSearchField> itFields = m_fieldconfiguration.getFields().iterator();
                while (itFields.hasNext()) {
                    CmsLuceneField curField = (CmsLuceneField)itFields.next();
                    if (curField.getName().equals(getParamField())) {
                        m_field = curField;
                        break;
                    }
                }
                if (m_field == null) {
                    m_field = new CmsLuceneField();
                }
            } catch (Exception e) {
                m_field = new CmsLuceneField();
            }
        }
    }
595519
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, DESCRIPTION, 30, null, null);
        field = new FieldInfo(this, CODE, 20, null, null);
        field = new FieldInfo(this, NAMESPACE, 128, null, null);
        field = new FieldInfo(this, SCHEMA_LOCATION, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, NUMERIC_VERSION, 20, null, null);
        field = new FieldInfo(this, VERSION_ID, 20, null, null);
        field = new FieldInfo(this, PROPERTIES, Constants.DEFAULT_FIELD_LENGTH, null, null);
    }
267727
protected void init() {

        // initialize OpenCms access objects
        CmsFlexController controller = CmsFlexController.getController(pageContext.getRequest());
        m_cms = controller.getCmsObject();

        int startLevel = m_startLevel == null ? Integer.MIN_VALUE : Integer.parseInt(m_startLevel);
        int endLevel = m_endLevel == null ? Integer.MIN_VALUE : Integer.parseInt(m_endLevel);

        // load navigation bean in the JSP context
        CmsJspNavigationBean bean = new CmsJspNavigationBean(
            m_cms,
            m_type,
            startLevel,
            endLevel,
            m_resource,
            m_param,
            m_locale);
        storeAttribute(getVar(), bean);
    }
256392
protected void init() {
        FormModel model = createFormModel();
        if(getId() == null)
            formId = model.getId();
        if (model instanceof ValidatingFormModel) {
            ValidatingFormModel validatingFormModel = (ValidatingFormModel) model;
            setFormModel(validatingFormModel);
        } else {
            throw new IllegalArgumentException("Unsupported form model implementation " + formModel);
        }
        getApplicationConfig().applicationObjectConfigurer().configure(this, getId());
	}
276532
public void init(App application, String strParams, Map<String, Object> properties)
    {
        super.init(application, strParams, properties);
        if (this.getProperty(Param.REMOTE_APP_NAME) == null)
            this.setProperty(Param.REMOTE_APP_NAME, "org.jbundle.base.remote.server.RemoteSessionServer"/*Param.REMOTE_MESSAGE_APP*/);
        m_messageMap = new Hashtable<String,BaseMessageQueue>();
    }
271739
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, NAME, 50, null, null);
        field = new FieldInfo(this, PARENT_FOLDER_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, SEQUENCE, 5, null, new Short((short)0));
        field.setDataClass(Short.class);
        field = new FieldInfo(this, COMMENT, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, CODE, 30, null, null);
        field = new FieldInfo(this, TYPE, 10, null, null);
        field = new FieldInfo(this, AUTO_DESC, 10, null, new Boolean(true));
        field.setDataClass(Boolean.class);
        field = new FieldInfo(this, PROGRAM, 255, null, null);
        field = new FieldInfo(this, PARAMS, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, ICON_RESOURCE, 255, null, null);
        field = new FieldInfo(this, KEYWORDS, 50, null, null);
        field = new FieldInfo(this, XML_DATA, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, MENUS_HELP, Constants.DEFAULT_FIELD_LENGTH, null, null);
    }