Tries to restore the active field data.<p>

@param fieldDataToBeRestored the field data which should be restored (may be null, in which case this method does nothing)
438654
public void tryToRestoreFieldData(CmsActiveFieldData fieldDataToBeRestored) {

        if (fieldDataToBeRestored == null) {
            return;
        }
        m_markedProperty = null;
        final String propName = fieldDataToBeRestored.getProperty();
        final String tabName = fieldDataToBeRestored.getTab();
        m_markedProperty = propName;
        final int tabIndex;
        if (TAB_INDIVIDUAL.equals(tabName)) {
            tabIndex = 1;
        } else if (TAB_SHARED.equals(tabName)) {
            tabIndex = 2;
        } else {
            tabIndex = 0;
        }

        Timer timer = new Timer() {

            @Override
            public void run() {

                if ((tabIndex >= 0) && (tabIndex < m_tabPanel.getTabCount())) {
                    I_CmsFormField markedField = null;
                    m_tabPanel.selectTab(tabIndex);
                    @SuppressWarnings("synthetic-access")
                    Collection<I_CmsFormField> fieldsForTab = m_fieldsByGroup.get(tabName);
                    if ((fieldsForTab != null) && !fieldsForTab.isEmpty()) {
                        for (I_CmsFormField currentField : fieldsForTab) {
                            if (currentField.getLayoutData().get(LD_PROPERTY).equals(propName)) {
                                markedField = currentField;
                                break;
                            }
                        }
                    }
                    if (markedField != null) {
                        final I_CmsFormField constMarkedField = markedField;
                        Timer timer2 = new Timer() {

                            @Override
                            @SuppressWarnings("synthetic-access")
                            public void run() {

                                focusField(constMarkedField);
                            }

                        };
                        timer2.schedule(1);
                    }
                }

            }

            private void focusField(final I_CmsFormField constMarkedField) {

                I_CmsFormWidget widget = constMarkedField.getWidget();
                if (widget instanceof CmsTextBox) {
                    CmsTextBox box = (CmsTextBox)widget;
                    box.selectAll();
                    box.setFocus(true);
                } else if (widget instanceof CmsTextArea) {
                    CmsTextArea textarea = ((CmsTextArea)widget);
                    textarea.selectAll();
                    textarea.setFocus(true);
                }
            }
        };
        timer.schedule(1);

    }
716263
private void restoreBackup() {

        if (incBackup) {
            restoreBackupIncremental();

            return;
        }

        // in case data file cannot be deleted, reset it
        DataFileCache.deleteOrResetFreePos(database, fileName + ".data");

        try {
            FileArchiver.unarchive(fileName + ".backup", fileName + ".data",
                                   database.getFileAccess(),
                                   FileArchiver.COMPRESSION_ZIP);
        } catch (Exception e) {
            throw Error.error(ErrorCode.FILE_IO_ERROR,
                              ErrorCode.M_Message_Pair, new Object[] {
                fileName + ".backup", e.toString()
            });
        }
    }
206057
@Override public void onRestoreInstanceState(Parcelable state) {
    if (isInEditMode) return;

    if (!(state instanceof MosbyViewStateSavedState)) {
      delegateCallback.superOnRestoreInstanceState(state);
      return;
    }

    MosbyViewStateSavedState savedState = (MosbyViewStateSavedState) state;
    mosbyViewId = savedState.getMosbyViewId();
    restoreableParcelableViewState = (VS) savedState.getRestoreableViewState();
    delegateCallback.superOnRestoreInstanceState(savedState.getSuperState());
  }
1259076
void resetFields() {

        if (m_bundleComponentKeyMap != null) {
            Set<TextField> setBundles = m_bundleComponentKeyMap.keySet();

            for (TextField field : setBundles) {
                m_bundleValues.removeComponent(field);
            }
            m_bundleComponentKeyMap.clear();
        }
        m_fieldKeepTemplate.setVisible(!CmsStringUtil.isEmptyOrWhitespaceOnly(m_fieldLoadSiteTemplate.getValue()));
        m_fieldKeepTemplate.setValue(
            Boolean.valueOf(!CmsStringUtil.isEmptyOrWhitespaceOnly(m_fieldLoadSiteTemplate.getValue())));
    }
294070
@Override
    public void recover() {
        try {
            this.messages.clear();
            this.dataLogger.prepareForRead();
            this.dataLogger.recover(this);
        } catch (Exception e) {
            throw new DelegatedRuntimeException(e);
        }
    }
187830
@Override
    public void restore(final List<DataSlice> dataSlices)
                    throws SevereMessageStoreException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "restore", dataSlices);

        restoreInternal(dataSlices, true);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "restore");
    }
310435
@Override
    public void restore(final List<DataSlice> dataSlices)
                    throws SevereMessageStoreException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "restore", dataSlices);

        stream = (MessageReferenceStream) getReferenceStream();
        //we can only register the listeners if we are fully initialized
        if (stream instanceof DurableSubscriptionItemStream)
        {
            if (!stream.hasInDoubtItems())
            {
                stream.registerListeners(this);
                failedInitInRestore = false; //Set to false so we don't call it again
            }
            else
            {
                //we are not yet restored due to an indoubt tran.
                //We have to mark that we failed to initialise and do
                //it later when we get a callback
                failedInitInRestore = true;
            }
        }

        // If in-doubt remove, set current active transaction for ordered messaging
        if (isRemoving())
            stream.setCurrentTransaction(this, false);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "restore");
    }
734009
public void restore(BackupMetaData backup, File destinationFile) throws Exception
    {
        File tempFile = File.createTempFile("exhibitor-backup", ".tmp");
        OutputStream out = new FileOutputStream(tempFile);
        InputStream in = null;
        try {
            backupProvider.get().downloadBackup(exhibitor, backup, out, getBackupConfig());
            CloseableUtils.closeQuietly(out);
            out = null;

            out = new FileOutputStream(destinationFile);
            in = new GZIPInputStream(new FileInputStream(tempFile));

            ByteStreams.copy(in, out);
        }
        finally {
            CloseableUtils.closeQuietly(in);
            CloseableUtils.closeQuietly(out);
            if (!tempFile.delete()) {
                exhibitor.getLog().add(ActivityLog.Type.ERROR, "Could not delete temp file (for restore): " + tempFile);
            }
        }
    }
61317
public void setEnabled(boolean bEnable)
    {
        super.setEnabled(bEnable);
        if (m_recordReference != null)
        {
            Record recReference = this.getReferenceRecord();
            for (int iIndex = 0 + 1; iIndex < recReference.getKeyAreaCount(); iIndex++)
            {
                KeyArea keyArea = recReference.getKeyArea(iIndex);
                BaseField fieldKey = keyArea.getField(DBConstants.MAIN_KEY_FIELD);
                if (fieldKey.getListener(MainReadOnlyHandler.class.getName()) != null)
                    fieldKey.setEnabled(bEnable);
            }
        }
    }
490951
void restore(CallInfo callInfo) {
    // Note: this is a conservative implementation, it sets another save-point
    // after roll-back, some engines seem to implicitly release the save point on roll-back
    // (an issue with HSQLDB)
    access(callInfo, () -> {
      logSetup(callInfo);
      try {
        if (!savepointSupport) {
          throw new UnsupportedOperationException("Savepoints are not supported by the database driver.");
        }
        if (savepoint == null) {
          throw new InvalidOperationException("Save point is not set.");
        }
        Savepoint s = savepoint;
        savepoint = null;
        connection.rollback(s);
        return 0;
      }
      finally {
        clearSavePointIfSet();
      }
    });
  }
609893
private void restoreFieldsFromUserInfo() {

        String savedEmail = (String)(m_user.getAdditionalInfo().get(ADDINFO_EMAIL));
        String savedName = (String)(m_user.getAdditionalInfo().get(ADDINFO_USER));
        String savedMessage = (String)(m_user.getAdditionalInfo().get(ADDINFO_MESSAGE));

        if (savedEmail != null) {
            m_emailField.setValue(savedEmail);
        }

        if (savedName != null) {
            m_userField.setValue(savedName);
        }

        if (savedMessage != null) {
            m_commitMessage.setValue(savedMessage);
        }
    }
194889
protected void restoreFields(Collection<Field> fields, ActionBean actionBean, ActionBeanContext context) throws IllegalAccessException {
        HttpSession session = context.getRequest().getSession(false);
        if (session != null) {
	        Set<String> parameters = this.getParameters(context.getRequest());
	        for (Field field : fields) {
	            if (!field.isAccessible()) {
	                field.setAccessible(true);
	            }
	            if (!parameters.contains(field.getName())) {
	                // Replace value.
	                Object value = session.getAttribute(getFieldKey(field, actionBean.getClass()));
	                // If value is null and field is primitive, don't set value.
	                if (!(value == null && field.getType().isPrimitive())) {
	                    field.set(actionBean, value);
	                }
	            }
	        }
        }
    }
1129706
@Override
    protected void onRestoreInstanceState(@NonNull Bundle savedInstanceState) {
        super.onRestoreInstanceState(savedInstanceState);
        mExpandableAdapter.onRestoreInstanceState(savedInstanceState);
    }
799283
protected void restoreFromContinuationData(Map<String, Object> data) {
        //noinspection unchecked
        localProxyBuilder.set((FactoryBuilderSupport) data.get("proxyBuilder"));
        //noinspection unchecked
        contexts.set((LinkedList<Map<String, Object>>) data.get("contexts"));
    }
25076
public void restoreState(IMemento memento) {
		setMemberFilters(
			new int[] {FILTER_FIELDS, FILTER_STATIC, FILTER_NONPUBLIC, FILTER_LOCALTYPES},
			new boolean[] {
				Boolean.valueOf(memento.getString(TAG_HIDEFIELDS)).booleanValue(),
				Boolean.valueOf(memento.getString(TAG_HIDESTATIC)).booleanValue(),
				Boolean.valueOf(memento.getString(TAG_HIDENONPUBLIC)).booleanValue(),
				Boolean.valueOf(memento.getString(TAG_HIDELOCALTYPES)).booleanValue()
			}, false);
	}
202912
@Override
    public void onRestoreInstanceState(Parcelable state) {

        if (state instanceof Bundle) {
            Bundle bundle = (Bundle) state;
            //load everything
            PinViewSettings pinViewSettings = bundle.getParcelable("stateSettings");
            if (pinViewSettings != null) {
                setSettings(pinViewSettings);
            }
            String pinResults = bundle.getString("statePinResults");
            setPinResults(pinResults);
            state = bundle.getParcelable("instanceState");
        }
        super.onRestoreInstanceState(state);
    }
1127518
public void setPropertiesField(Field fldProperties)
    {
        if (fldProperties != null)
        {
            m_fldProperties = (PropertiesField)fldProperties;
            this.loadFieldProperties();
            this.addListener(new FileListener(null)
            {
                public void setOwner(ListenerOwner owner)
                {
                    if (owner == null)
                        if (this.getOwner() != null)
                            ((PropertiesInput)PropertiesInput.this).restoreFieldProperties();
                    super.setOwner(owner);
                }
            });
        }
    }