Logs a module action.<p>

@param moduleName the module name
@param action the action
@param ok true if the action was successful
164445
public synchronized void log(String moduleName, Action action, boolean ok) {

        if (moduleName == null) {
            return;
        }
        SimpleDateFormat format = new SimpleDateFormat(DATE_FORMAT_STRING);
        String now = format.format(new Date());
        String message = now + " " + action.getPrintName() + " " + (ok ? "0" : "1");
        log(moduleName, message);
    }
409407
public void doLog(String clientID, String name, long time, Level level,
			Object message, Throwable t) {
		if (logOpen && formatter != null) {
			sendMessage(syslogMessage.createMessageData(formatter.format(clientID, name, time, level, message, t)));
		}
	}
1229058
function ReportTemplateAction($moduleType, $template, Enums\Action $action)
    {
        $logItem = $this->CreateLogItem(Enums\ObjectType::Template(), $action);
        $logTemplate = new LogTemplate;
        $logTemplate->SetLogItem($logItem);
        $logTemplate->SetModuleType($moduleType);
        $logTemplate->SetTemplate($template);
        $logTemplate->Save();
    }
927007
void addActionReleased(int click, EventAction action)
    {
        final Integer key = Integer.valueOf(click);
        final List<EventAction> list;
        if (actionsReleased.get(key) == null)
        {
            list = new ArrayList<>();
            actionsReleased.put(key, list);
        }
        else
        {
            list = actionsReleased.get(key);
        }
        list.add(action);
    }
25892
protected void executeAction(Action action) {
        ProcessContext context = new ProcessContext(getProcessInstance().getKnowledgeRuntime());
        context.setNodeInstance(this);
        try {
            action.execute(context);
        } catch (Exception e) {
            String exceptionName = e.getClass().getName();
            ExceptionScopeInstance exceptionScopeInstance = (ExceptionScopeInstance)
                resolveContextInstance(ExceptionScope.EXCEPTION_SCOPE, exceptionName);
            if (exceptionScopeInstance == null) {
                throw new WorkflowRuntimeException(this, getProcessInstance(), "Unable to execute Action: " + e.getMessage(), e);
            }
            
            exceptionScopeInstance.handleException(exceptionName, e);
            cancel();
        }
    }
114273
@Override
    public void actionCommit() {

        try {
            int action = -1;
            if (isOnline() && isOffline()) {
                if (getMode().equals(MODE_ALL)) {
                    action = CmsFlexCache.CLEAR_ALL;
                } else {
                    action = CmsFlexCache.CLEAR_ENTRIES;
                }
            } else if (isOnline()) {
                if (getMode().equals(MODE_ALL)) {
                    action = CmsFlexCache.CLEAR_ONLINE_ALL;
                } else {
                    action = CmsFlexCache.CLEAR_ONLINE_ENTRIES;
                }
            } else if (isOffline()) {
                if (getMode().equals(MODE_ALL)) {
                    action = CmsFlexCache.CLEAR_OFFLINE_ALL;
                } else {
                    action = CmsFlexCache.CLEAR_OFFLINE_ENTRIES;
                }
            } else {
                if (getMode().equals(MODE_ALL)) {
                    action = CmsFlexCache.CLEAR_ALL;
                } else {
                    action = CmsFlexCache.CLEAR_ENTRIES;
                }
            }
            OpenCms.fireCmsEvent(
                new CmsEvent(
                    I_CmsEventListener.EVENT_FLEX_CACHE_CLEAR,
                    Collections.<String, Object> singletonMap(CmsFlexCache.CACHE_ACTION, new Integer(action))));
        } catch (Exception e) {
            setCommitErrors(Collections.singletonList((Throwable)e));
        }
    }
1259375
public void logStackTrace (int level, String moduleName, Throwable t)
    {
        getLogger(moduleName).log(getLevel(level), "", t);
    }
362162
@UiHandler("m_okButton")
    protected void onClickOk(ClickEvent e) {

        changeState(State.validationRunning);
        final String newName = getValue();
        CmsRpcAction<String> validate = new CmsRpcAction<String>() {

            @Override
            public void execute() {

                start(200, false);
                CmsCoreProvider.getVfsService().renameResource(m_structureId, newName, this);
            }

            @Override
            public void onFailure(Throwable t) {

                super.onFailure(t);
                changeState(State.validationUnknown);
            }

            @Override
            protected void onResponse(String result) {

                stop(false);
                if (result == null) {
                    close();
                    if (m_renameCallback != null) {
                        m_renameCallback.onSuccess(newName);
                    }
                } else {
                    changeState(State.validationFailed);
                    setValidationError(result);
                }
            }

        };
        validate.execute();

    }
651241
public void setAction(MethodBinding action) {
        MethodExpressionMethodBindingAdapter adapter;
        if (null != action) {
            adapter = new MethodExpressionMethodBindingAdapter(action);
            setActionExpression(adapter);
        } else {
            setActionExpression(null);
        }
    }
743025
private void write(ContentResult contentResult) throws IOException {
        if (contentResult.getName() != null) {
            openCurlyBracket();
            writeName(contentResult.getName());
        }
        if (contentResult.isEmpty()) {
            writeNull();
        } else if (contentResult.size() == 1) {
            ActionResult actionResult = contentResult.get(0);
            if (actionResult.getActionId() != null) {
                openCurlyBracket();
                writeName(actionResult.getActionId());
                write(actionResult.getResultValue());
                closeCurlyBracket();
            } else {
                write(actionResult.getResultValue());
            }
        } else {
            openCurlyBracket();
            int cnt = 0;
            for (String actionId : contentResult.getActionIds()) {
                if (cnt++ > 0) {
                    writeComma();
                }
                ActionResult actionResult = contentResult.getActionResult(actionId);
                writeName(actionResult.getActionId());
                write(actionResult.getResultValue());
            }
            closeCurlyBracket();
        }
        if (contentResult.getName() != null) {
            closeCurlyBracket();
        }
    }
715696
@Override
	public Action getAction(String name, String nodeID) {
		Strategy<ActionEndpoint> strategy = null;
		long stamp = lock.tryOptimisticRead();
		if (stamp != 0) {
			try {
				strategy = strategies.get(name);
			} catch (Exception modified) {
				stamp = 0;
			}
		}
		if (!lock.validate(stamp) || stamp == 0) {
			stamp = lock.readLock();
			try {
				strategy = strategies.get(name);
			} finally {
				lock.unlockRead(stamp);
			}
		}
		if (strategy == null) {
			throw new ServiceNotFoundError(nodeID, name);
		}
		ActionEndpoint endpoint = strategy.getEndpoint(nodeID);
		if (endpoint == null) {
			throw new ServiceNotAvailableError(nodeID, name);
		}
		return endpoint;
	}
951185
public void setAction(String action) throws ApplicationException {
	action = action.toLowerCase().trim();
	if (action.equals("get")) this.action = GET;
	else if (action.equals("put")) this.action = PUT;

	else if (action.equals("cache")) this.action = CACHE;
	else if (action.equals("clientcache")) this.action = CACHE_CLIENT;
	else if (action.equals("servercache")) this.action = CACHE_SERVER;
	else if (action.equals("flush")) this.action = FLUSH;
	else if (action.equals("optimal")) this.action = CACHE;

	else if (action.equals("client-cache")) this.action = CACHE_CLIENT;
	else if (action.equals("client_cache")) this.action = CACHE_CLIENT;

	else if (action.equals("server-cache")) this.action = CACHE_SERVER;
	else if (action.equals("server_cache")) this.action = CACHE_SERVER;

	else if (action.equals("content")) this.action = CONTENT;
	else if (action.equals("content_cache")) this.action = CONTENT;
	else if (action.equals("contentcache")) this.action = CONTENT;
	else if (action.equals("content-cache")) this.action = CONTENT;
	else throw new ApplicationException("invalid value for attribute action for tag cache [" + action + "], "
		+ "valid actions are [get,put,cache, clientcache, servercache, flush, optimal, contentcache]");

	// get: get an object from the cache.
	// put: Add an object to the cache.

    }
936377
public static CmsConfirmationDialog show(String title, String message, final Runnable okAction) {

        return show(title, message, okAction, null);
    }
242705
@Override
    public void actionCommit() {

        List errors = new ArrayList();

        try {
            // get the correct module
            String moduleName = getParamModule();
            CmsModule module = (CmsModule)OpenCms.getModuleManager().getModule(moduleName).clone();
            // get the current exportpoints from the module
            List oldExportpoints = module.getExportPoints();
            // now loop through the exportpoints and create the new list of exportpoints
            List newExportpoints = new ArrayList();
            Iterator i = oldExportpoints.iterator();
            while (i.hasNext()) {
                CmsExportPoint exp = (CmsExportPoint)i.next();
                if (!exp.getUri().equals(m_exportpoint.getUri())) {
                    newExportpoints.add(exp);
                }
            }
            // update the exportpoints
            newExportpoints.add(m_exportpoint);
            module.setExportPoints(newExportpoints);
            // update the module
            OpenCms.getModuleManager().updateModule(getCms(), module);
            // refresh the list
            Map objects = (Map)getSettings().getListObject();
            if (objects != null) {
                objects.remove(CmsModulesList.class.getName());
                objects.remove(CmsExportpointsList.class.getName());
            }
        } catch (CmsConfigurationException ce) {
            errors.add(ce);
        } catch (CmsSecurityException se) {
            errors.add(se);
        }

        // set the list of errors to display when saving failed
        setCommitErrors(errors);
    }
737895
public static void logMethod(@Nullable final Object... args) {
        if (shouldLog(DEBUG)) {
            Log.println(DEBUG, TAG, getMethodLog(args));
        }
    }
137166
static void log(Task action, String msg) {
        log(action.event.getKey(), action.method, msg);
    }
822688
public void actionPerformed(ActionEvent ev) {

        String s = ev.getActionCommand();

        //  System.out.println("Action performed " + s);
        if (s.equals("ConnectOk")) {
            finishCreate();
        } else if (s.equals("ConnectCancel")) {
            dispose();
        }
    }