@Override public long getEntityOwnerId() { return CallContext.current().getCallingAccountId(); }
@Override public long getEntityOwnerId() { return CallContext.current().getCallingAccountId(); }
@Override public long getEntityOwnerId() { return CallContext.current().getCallingAccountId(); }
@Override public long getEntityOwnerId() { return CallContext.current().getCallingAccountId(); }
@Override public long getEntityOwnerId() { return CallContext.current().getCallingAccountId(); }
@Override public long getEntityOwnerId() { return CallContext.current().getCallingAccountId(); }
@Override public long getEntityOwnerId() { return CallContext.current().getCallingAccountId(); }
@Override final public long getEntityOwnerId() { return CallContext.current().getCallingAccountId(); }
@Override public long getEntityOwnerId() { return CallContext.current().getCallingAccountId(); }
@Override public long getEntityOwnerId() { return CallContext.current().getCallingAccountId(); }
@Override public String toString() { return new StringBuilder("CCtxt[acct=").append(getCallingAccountId()) .append("; user=") .append(getCallingUserId()) .append("; id=") .append(contextId) .append("]") .toString(); } }
@Override public long getEntityOwnerId() { return CallContext.current().getCallingAccountId(); }
@Override final public long getEntityOwnerId() { return CallContext.current().getCallingAccountId(); }
@Override final public long getEntityOwnerId() { return CallContext.current().getCallingAccountId(); }
@Override public long getEntityOwnerId() { return CallContext.current().getCallingAccountId(); }
@Override public long getEntityOwnerId() { return CallContext.current().getCallingAccountId(); }
@Override final public long getEntityOwnerId() { return CallContext.current().getCallingAccountId(); }
/** * Safely transit host into Maintenance mode */ protected boolean setHostIntoMaintenance(HostVO host) throws NoTransitionException { s_logger.debug("Host " + host.getUuid() + " entering in Maintenance"); resourceStateTransitTo(host, ResourceState.Event.InternalEnterMaintenance, _nodeId); ActionEventUtils.onCompletedActionEvent(CallContext.current().getCallingUserId(), CallContext.current().getCallingAccountId(), EventVO.LEVEL_INFO, EventTypes.EVENT_MAINTENANCE_PREPARE, "completed maintenance for host " + host.getId(), 0); return true; }
public static void onStartedActionEventFromContext(String eventType, String eventDescription, boolean eventDisplayEnabled) { CallContext ctx = CallContext.current(); long userId = ctx.getCallingUserId(); long accountId = ctx.getProject() != null ? ctx.getProject().getProjectAccountId() : ctx.getCallingAccountId(); //This should be the entity owner id rather than the Calling User Account Id. long startEventId = ctx.getStartEventId(); if (!eventType.equals("")) ActionEventUtils.onStartedActionEvent(userId, accountId, eventType, eventDescription, eventDisplayEnabled, startEventId); }
public static AsyncJobExecutionContext getCurrentExecutionContext() { AsyncJobExecutionContext context = s_currentExectionContext.get(); if (context == null) { // TODO, this has security implications, operations carried from API layer should always // set its context, otherwise, the fall-back here will use system security context // s_logger.warn("Job is executed without a context, setup psudo job for the executing thread"); if (CallContext.current() != null) context = registerPseudoExecutionContext(CallContext.current().getCallingAccountId(), CallContext.current().getCallingUserId()); else context = registerPseudoExecutionContext(Account.ACCOUNT_ID_SYSTEM, User.UID_SYSTEM); } return context; }