code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
private void preloadDynamicCaches() {
List<CacheService> dynamicCacheServices = CacheRegistry.getInstance().getDynamicCacheServices();
for (CacheService dynamicCacheService : dynamicCacheServices) {
if (dynamicCacheService instanceof PreloadableCache) {
try {
... | java |
public void onShutdown(){
CacheRegistry.getInstance().clearDynamicServices();// clear dynamic cache services
synchronized (allCaches) {
for (String cacheName : allCaches.keySet()) {
CacheService cachingObj= allCaches.get(cacheName);
cachingObj.clearCache();
... | java |
public void refreshCache(String cacheName, List<String> excludedFormats) {
CacheService cache = allCaches.get(cacheName);
if (cache != null) {
if (excludedFormats != null && cache instanceof ExcludableCache && excludedFormats.contains(((ExcludableCache)cache).getFormat())) {
... | java |
public static String getActivityImplementor(String className) throws IOException {
if (getActivityImplementors() != null) {
String newImpl = getActivityImplementors().get(className);
if (newImpl != null)
return newImpl;
}
return className;
} | java |
public static String getEventHandler(String className) throws IOException {
if (getEventHandlers() != null) {
String newHandler = getEventHandlers().get(className);
if (newHandler != null)
return newHandler;
}
return className;
} | java |
public static String getVariableTranslator(String className) throws IOException {
if (getVariableTranslators() != null) {
String newTranslator = getVariableTranslators().get(className);
if (newTranslator != null)
return newTranslator;
}
return className;
... | java |
public static String getVariableType(String type) throws IOException {
if (getVariableTypes() != null) {
String newType = getVariableTypes().get(type);
if (newType != null)
return newType;
}
return type;
} | java |
protected RoutesDefinition getRoutesDefinition(String name, String version) throws AdapterException {
String modifier = "";
Map<String,String> params = getHandlerParameters();
if (params != null) {
for (String paramName : params.keySet()) {
if (modifier.length() == 0)... | java |
ProcessInstance createProcessInstance(Long processId, String ownerType,
Long ownerId, String secondaryOwnerType, Long secondaryOwnerId,
String masterRequestId, Map<String,String> parameters, String label, String template)
throws ProcessException, DataAccessException
{
ProcessInst... | java |
void createTransitionInstances(ProcessInstance processInstanceVO,
List<Transition> transitions, Long fromActInstId)
throws ProcessException,DataAccessException {
TransitionInstance transInst;
for (Transition transition : transitions) {
try {
if (tooMany... | java |
void startProcessInstance(ProcessInstance processInstanceVO, int delay)
throws ProcessException {
try {
Process process = getProcessDefinition(processInstanceVO);
edao.setProcessInstanceStatus(processInstanceVO.getId(), WorkStatus.STATUS_PENDING_PROCESS);
// setProcess... | java |
void failActivityInstance(InternalEvent event,
ProcessInstance processInst, Long activityId, Long activityInstId,
BaseActivity activity, Throwable cause) throws DataAccessException, MdwException, SQLException {
String tag = logtag(processInst.getProcessId(), processInst.getId(), activit... | java |
private Transition findTaskActionWorkTransition(ProcessInstance parentInstance,
ActivityInstance activityInstance, String taskAction) {
if (taskAction == null)
return null;
Process processVO = getProcessDefinition(parentInstance);
Transition workTransVO = processVO.getTr... | java |
private void cancelProcessInstanceTree(ProcessInstance pi)
throws Exception {
if (pi.getStatusCode().equals(WorkStatus.STATUS_COMPLETED) ||
pi.getStatusCode().equals(WorkStatus.STATUS_CANCELLED)) {
throw new ProcessException("ProcessInstance is not in a cancellable state");
... | java |
private void cancelProcessInstance(ProcessInstance pProcessInst)
throws Exception {
edao.cancelTransitionInstances(pProcessInst.getId(),
"ProcessInstance has been cancelled.", null);
edao.setProcessInstanceStatus(pProcessInst.getId(), WorkStatus.STATUS_CANCELLED);
edao.re... | java |
private void resumeActivityInstance(ActivityInstance actInst, String pCompletionCode, Long documentId,
String message, int delay) throws MdwException, SQLException {
ProcessInstance pi = edao.getProcessInstance(actInst.getProcessInstanceId());
if (!this.isProcessInstanceResumable(pi)) {
... | java |
protected VelocityContext createVelocityContext() throws ActivityException {
try {
VelocityContext context = null;
String toolboxFile = getAttributeValueSmart(VELOCITY_TOOLBOX_FILE);
if (toolboxFile != null && FileHelper.fileExistsOnClasspath(toolboxFile)) {
t... | java |
protected Map<String,Object> getAdditionalScriptBindings() {
Map<String,Object> addlBindings = new HashMap<String,Object>(1);
addlBindings.put(VELOCITY_OUTPUT, velocityOutput);
return addlBindings;
} | java |
public String handleEventMessage(String message, Object messageObj, Map<String,String> metaInfo) throws EventHandlerException {
return null;
} | java |
public void scheduleInternalEvent(String name, Date time, String message, String reference) {
schedule(name, time, message, reference);
} | java |
@Override
@Path("/{dataType}")
public JSONObject get(String path, Map<String,String> headers) throws ServiceException, JSONException {
String dataType = getSegment(path, 1);
if (dataType == null)
throw new ServiceException("Missing path segment: {dataType}");
try {
... | java |
private ProcessInstance getProcInstFromDB(Long procInstId) throws DataAccessException {
TransactionWrapper transaction = null;
EngineDataAccessDB edao = new EngineDataAccessDB();
try {
transaction = edao.startTransaction();
return edao.getProcessInstance(procInstId);
... | java |
public List<String> getRecipients(String workgroupsAttr, String expressionAttr)
throws DataAccessException, ParseException {
List<String> recipients = new ArrayList<>();
if (workgroupsAttr != null) {
String workgroups = context.getAttribute(workgroupsAttr);
if (workgroups != ... | java |
@SuppressWarnings("unused")
private void printServerInfo() {
Context ctx;
try{
ctx = new InitialContext();
MBeanServer server = (MBeanServer)ctx.lookup("java:comp/env/jmx/runtime");
ObjectName service = new ObjectName("com.bea:Name=RuntimeService," +
... | java |
public List<Metric> getAverages(int span) {
Map<String,Metric> accum = new LinkedHashMap<>();
int count = span / period;
if (count > dataList.size())
count = dataList.size();
for (int i = dataList.size() - count; i < dataList.size(); i++) {
MetricData metricData =... | java |
public List<MetricData> getData(int span) {
int count = span / period;
if (dataList.size() < count) {
if (dataList.isEmpty()) {
return dataList;
}
else {
// left-pad
List<MetricData> padded = new ArrayList<>(dataList);
... | java |
public static String encrypt(String input) {
try {
return encrypt(input, null);
} catch (GeneralSecurityException e) {
e.printStackTrace();
return null;
}
} | java |
public static String encrypt(String input, String strkey)
throws GeneralSecurityException {
SecretKey key;
if (strkey != null) {
if (strkey.length() > 56)
strkey = strkey.substring(0, 55);
key = new SecretKeySpec(strkey.getBytes(), algorithm);
}
... | java |
public static String decrypt(String encrypted) {
try {
return decrypt(encrypted, null);
} catch (GeneralSecurityException e) {
e.printStackTrace();
return null;
}
} | java |
public File getHubOverride(String path) throws IOException {
if (getOverrideRoot() != null) {
File hubOverride = new File(getOverrideRoot() + path);
if (hubOverride.isFile())
return hubOverride;
}
if (getDevOverrideRoot() != null && isDev()) {
... | java |
protected String getRequestData() throws ActivityException {
Object request = null;
String requestVarName = getAttributeValue(REQUEST_VARIABLE);
if (requestVarName == null)
throw new ActivityException("Missing attribute: " + REQUEST_VARIABLE);
String requestVarType = getParam... | java |
@Override
public void onSuccess(String response)
throws ActivityException, ConnectionException, AdapterException {
try {
// set the variable value based on the unwrapped soap content
soapResponse = getSoapResponse(response);
Node childElem = unwrapSoapResponse(soapRes... | java |
protected String getSoapAction() {
String soapAction = null;
try {
soapAction = getAttributeValueSmart(SOAP_ACTION);
}
catch (PropertyException ex) {
logger.severeException(ex.getMessage(), ex);
}
if (soapAction == null) {
// required ... | java |
protected void processMessage(String message) throws ActivityException {
try {
String rcvdMsgDocVar = getAttributeValueSmart(RECEIVED_MESSAGE_DOC_VAR);
if (rcvdMsgDocVar != null && !rcvdMsgDocVar.isEmpty()) {
Process processVO = getProcessDefinition();
Var... | java |
protected void updateSLA(int seconds) throws ActivityException {
try {
ProcessExecutor engine = this.getEngine();
super.loginfo("Update activity timeout as " + seconds + " seconds");
InternalEvent delayMsg = InternalEvent.createActivityDelayMessage(this.getActivityInstance(),... | java |
@Override
@Path("/{ownerType}/{ownerId}")
@ApiOperation(value="Retrieve values for an ownerType and ownerId",
notes="Response is a generic JSON object with names/values.")
public JSONObject get(String path, Map<String,String> headers) throws ServiceException, JSONException {
Map<String,Strin... | java |
@Override
@Path("/{ownerType}/{ownerId}")
@ApiOperation(value="Create values for an ownerType and ownerId", response=StatusMessage.class)
@ApiImplicitParams({
@ApiImplicitParam(name="Values", paramType="body")})
public JSONObject post(String path, JSONObject content, Map<String,String> headers)
... | java |
@Override
@Path("/{ownerType}/{ownerId}")
@ApiOperation(value="Update values for an ownerType and ownerId", response=StatusMessage.class)
@ApiImplicitParams({
@ApiImplicitParam(name="Values", paramType="body")})
public JSONObject put(String path, JSONObject content, Map<String,String> headers)
... | java |
@Override
@Path("/{ownerType}/{ownerId}")
@ApiOperation(value="Delete values for an ownerType and ownerId", response=StatusMessage.class)
public JSONObject delete(String path, JSONObject content, Map<String,String> headers)
throws ServiceException, JSONException {
JSONObject empty = new JsonObje... | java |
private void authorize(HttpSession session, Action action, Entity entity, String location)
throws AuthorizationException, DataAccessException {
AuthenticatedUser user = (AuthenticatedUser)session.getAttribute("authenticatedUser");
if (user == null && ApplicationContext.getServiceUser() != n... | java |
public PackageAssets getAssets(String packageName, boolean withVcsInfo) throws ServiceException {
try {
PackageDir pkgDir = getPackageDir(packageName);
if (pkgDir == null) {
pkgDir = getGhostPackage(packageName);
if (pkgDir == null)
thr... | java |
private List<PackageDir> findPackageDirs(List<File> dirs, List<File> excludes) throws IOException, DataAccessException {
List<PackageDir> pkgSubDirs = new ArrayList<>();
List<File> allSubDirs = new ArrayList<>();
for (File dir : dirs) {
MdwIgnore mdwIgnore = new MdwIgnore(dir);
... | java |
private VersionControl getAssetVersionControl() throws IOException, DataAccessException {
VersionControl vc = getVersionControl();
if (vc == null)
vc = DataAccess.getAssetVersionControl(assetRoot);
return vc;
} | java |
public AssetInfo getImplAsset(String className) throws ServiceException {
int lastDot = className.lastIndexOf('.');
if (lastDot > 0 && lastDot < className.length() - 1) {
String assetRoot = className.substring(0, lastDot) + "/" + className.substring(lastDot + 1);
AssetInfo im... | java |
private String getValue(String name) {
for (YamlProperties yamlProp : yamlProps) {
String value = yamlProp.getString(name);
if (value != null)
return value;
}
if (javaProps != null) {
for (Properties javaProp : javaProps) {
Stri... | java |
public static void putScript(String name, KotlinCompiledScript script) {
getInstance().scripts.put(name, script);
} | java |
protected void handleConnectionException(int errorCode, Throwable originalCause)
throws ActivityException {
InternalEvent message = InternalEvent.createActivityStartMessage(getActivityId(),
getProcessInstanceId(), getWorkTransitionInstanceId(), getMasterRequestId(),
COMPCODE_... | java |
public Response directInvoke(String request, int timeout, Map<String,String> meta_data)
throws AdapterException, ConnectionException {
init();
if (logger == null)
logger = LoggerUtil.getStandardLogger();
Object connection = null;
try {
connection = ope... | java |
public TransitionInstance createTransitionInstance(Transition transition, Long pProcessInstId)
throws DataAccessException {
TransactionWrapper transaction=null;
try {
transaction = startTransaction();
return engineImpl.createTransitionInstance(transition, pProcessInstId);
... | java |
public Integer lockActivityInstance(Long actInstId)
throws DataAccessException {
try {
if (!isInTransaction()) throw
new DataAccessException("Cannot lock activity instance without a transaction");
return engineImpl.getDataAccess().lockActivityInstance(actInstId);
... | java |
public Integer lockProcessInstance(Long procInstId)
throws DataAccessException {
try {
if (!isInTransaction()) throw
new DataAccessException("Cannot lock activity instance without a transaction");
return engineImpl.getDataAccess().lockProcessInstance(procInstId);
... | java |
@Override
@Path("{package}/{asset}")
public JSONObject get(String assetPath, Map<String,String> headers)
throws ServiceException, JSONException {
AssetServices assetServices = ServiceLocator.getAssetServices();
AssetInfo asset = assetServices.getAsset(assetPath.substring(7), true);
... | java |
public long getDurationMicro() {
if (startNano != 0) {
if (running)
return ((long)(System.nanoTime() - startNano)) / 1000;
else if (stopNano != startNano)
return ((long)(stopNano - startNano)) / 1000;
}
return 0;
} | java |
public static TaskTemplate getTemplateForName(String taskName) {
for (int i = 0; i < taskVoCache.size(); i++) {
TaskTemplate task = taskVoCache.get(i);
if (task.getTaskName().equals(taskName)) {
return task;
}
}
return null;
} | java |
public static TaskTemplate getTaskTemplate(String logicalId) {
for (int i = 0; i < taskVoCache.size(); i++) {
TaskTemplate task = taskVoCache.get(i);
if (logicalId.equals(task.getLogicalId())) {
return task;
}
}
return null;
} | java |
public static TaskTemplate getTaskTemplate(AssetVersionSpec assetVersionSpec) throws Exception {
TaskTemplate taskTemplate = templateVersions.get(assetVersionSpec.toString());
if (taskTemplate == null) {
if (assetVersionSpec.getPackageName() != null) {
List<Package> pkgVOs = ... | java |
public static void read(Swagger swagger, Set<Class<?>> classes) {
final SwaggerAnnotationsReader reader = new SwaggerAnnotationsReader(swagger);
for (Class<?> cls : classes) {
final ReaderContext context = new ReaderContext(swagger, cls, "", null, false, new ArrayList<>(),
... | java |
@Override
public InputStream getResourceAsStream(String name) {
byte[] b = null;
try {
Asset resource = AssetCache.getAsset(mdwPackage.getName() + "/" + name);
if (resource != null)
b = resource.getRawContent();
if (b == null)
b = f... | java |
private EventParameters createEventParameters(Map<String,String> pParams){
EventParameters evParams = EventParameters.Factory.newInstance();
for (String name : pParams.keySet()) {
String val = pParams.get(name);
if(val == null){
continue;
}
... | java |
public static InternalEvent createActivityNotifyMessage(ActivityInstance ai,
Integer eventType, String masterRequestId, String compCode) {
InternalEvent event = new InternalEvent();
event.workId = ai.getActivityId();
event.transitionInstanceId = null;
event.eventType = eventT... | java |
public Transaction getTransaction() {
try {
return getTransactionManager().getTransaction();
}
catch (Exception ex) {
StandardLogger logger = LoggerUtil.getStandardLogger();
logger.severeException(ex.getMessage(), ex);
return null;
}
} | java |
public TransactionManager getTransactionManager() {
TransactionManager transMgr = null;
try {
String jndiName = ApplicationContext.getNamingProvider().getTransactionManagerName();
Object txMgr = ApplicationContext.getNamingProvider().lookup(null, jndiName, TransactionManager.clas... | java |
public boolean belongsToGroup(String groupName) {
if (workgroups == null || workgroups.length == 0) {
return false;
}
for (Workgroup g : workgroups) {
if (g.getName().equals(groupName)) return true;
}
return false;
} | java |
public void addRoleForGroup(String groupName, String roleName) {
if (workgroups==null) {
workgroups = new Workgroup[1];
workgroups[0] = new Workgroup(null, groupName, null);
}
List<String> roles = workgroups[0].getRoles();
if (roles==null) {
roles = ne... | java |
public void parseName() {
if (getName() != null) {
String name = getName().trim();
int firstSp = name.indexOf(' ');
if (firstSp > 0) {
setFirst(name.substring(0, firstSp));
int lastSp = name.lastIndexOf(' ');
setLast(name.substr... | java |
public void putreq(String msg)
throws SoccomException
{
byte msgbytes[] = SoccomMessage.makeMessage(msg, null);
logline("SEND: " + new String(msgbytes));
copy_msgid(_msgid, msgbytes);
try {
// _out.print(msg);
_out.write(msgbytes);
} catch (IOException e) {
throw new ... | java |
public void putreq_vheader(String endmark)
throws SoccomException
{
if (endmark.length()!=4)
throw new SoccomException(SoccomException.ENDM_LENGTH);
byte msgbytes[] = SoccomMessage.
makeMessageSpecial("ENDM" + endmark, null);
logline("SEND: " + new String(msgbytes));
copy_msgid(_... | java |
public void putreq_vline(String msg)
throws SoccomException
{
int length = msg.length();
if (msg.charAt(length-1) == '\n') {
logline("SEND: " + msg.substring(0,length-1));
} else {
logline("SEND: " + msg);
msg += "\n";
}
byte msgbytes[] = msg.getBytes();
try {
... | java |
public void putreq_vfooter(String endmark)
throws SoccomException
{
if (endmark.length()!=4)
throw new SoccomException(SoccomException.ENDM_LENGTH);
String msg = endmark + "\n";
byte msgbytes[] = msg.getBytes();
logline("SEND: " + endmark);
try {
_out.write(msgbytes);
} c... | java |
public String getresp(int timeout)
throws SoccomException
{
int size, n;
String sizestr;
try {
byte[] _header = new byte[SoccomMessage.HEADER_SIZE];
_socket.setSoTimeout(timeout*1000);
n = _in.read(_header, 0, SoccomMessage.HEADER_SIZE);
if (n!=SoccomMessage.HEADER_SI... | java |
public String getresp_first(int maxbytes, int timeout)
throws SoccomException
{
int n;
String sizestr, msg;
_resp_read = -1;
try {
byte[] _header = new byte[SoccomMessage.HEADER_SIZE];
_socket.setSoTimeout(timeout*1000);
n = _in.read(_header, 0, SoccomMessage.HEADER_SIZE)... | java |
public void close()
{
if (_socket!=null) {
try {
_socket.close();
_socket = null;
} catch (IOException e) {
System.err.println("Exception: " + e);
// throw new SoccomException(SoccomException.RECV_ERROR);
}
_in = null;
_out = null;
}
... | java |
protected TextService getServiceInstance(Map<String,String> headers) throws ServiceException {
try {
String requestPath = headers.get(Listener.METAINFO_REQUEST_PATH);
String[] pathSegments = requestPath != null ? requestPath.split("/") : null;
if (pathSegments == null)
... | java |
protected Format getFormat(Map<String,String> metaInfo) {
Format format = Format.json;
metaInfo.put(Listener.METAINFO_CONTENT_TYPE, Listener.CONTENT_TYPE_JSON);
String formatParam = (String) metaInfo.get("format");
if (formatParam != null) {
if (formatParam.equals("xml")) {
... | java |
@Override
@Path("/{ownerType}/{ownerId}")
@ApiOperation(value="Retrieve attributes for an ownerType and ownerId",
notes="Response is a generic JSON object with names/values.")
public JSONObject get(String path, Map<String,String> headers) throws ServiceException, JSONException {
Map<String,S... | java |
public void importAssetsFromGit(ProgressMonitor... monitors) throws IOException {
if (inProgress)
throw new IOException("Asset import already in progress...");
try {
inProgress = true;
getOut().println("Importing from Git into: " + getProjectDir() + "...(branch: " +... | java |
public void importGit(ProgressMonitor... monitors) throws IOException {
if (inProgress)
throw new IOException("Asset already in progress...");
try {
inProgress = true;
Props props = new Props(this);
VcInfo vcInfo = new VcInfo(getGitRoot(), props);
... | java |
public <T extends RegisteredService> T getDynamicService(Package pkg, Class<T> serviceInterface, String className) {
if (dynamicServices.containsKey(serviceInterface.getName())
&& dynamicServices.get(serviceInterface.getName()).contains(className)) {
try {
ClassLoader... | java |
public void addDynamicService(String serviceInterface, String className) {
if (dynamicServices.containsKey(serviceInterface)) {
dynamicServices.get(serviceInterface).add(className);
}
else {
Set<String> classNamesSet = new HashSet<String>();
classNamesSet.add(... | java |
public String[] getArrayFilter(String key) {
String value = filters.get(key);
if (value == null)
return null;
String[] array = new String[0];
if (value.startsWith("[")) {
if (value.length() > 2)
array = value.substring(1, value.length() - 1).split(... | java |
public Map<String,String> getMapFilter(String name) {
String value = filters.get(name);
if (value == null)
return null;
Map<String,String> map = new LinkedHashMap<>();
if (value.startsWith("{") && value.endsWith("}")) {
for (String entry : value.substring(1, value... | java |
public String getServiceSummaryVariableName(Process processDefinition) {
for (Activity activity : processDefinition.getActivities()) {
String attr = activity.getAttribute("serviceSummaryVariable");
if (attr != null)
return attr;
}
return null;
} | java |
public JSONObject getJson() throws JSONException {
JSONObject json = create();
json.put("id", getLogicalId());
json.put("to", "A" + toId);
if (completionCode != null)
json.put("resultCode", completionCode);
if (eventType != null)
json.put("event", EventTyp... | java |
private static void initializeJavaSourceArtifacts() throws DataAccessException, IOException, CachingException {
logger.info("Initializing Java source assets...");
long before = System.currentTimeMillis();
for (Asset javaSource : AssetCache.getAssets(Asset.JAVA)) {
Package pkg = Pack... | java |
private static void preCompileJavaSourceArtifacts() {
if (preCompiled != null) {
for (String preCompClass : preCompiled) {
logger.info("Precompiling dynamic Java asset class: " + preCompClass);
try {
Asset javaAsset = AssetCache.getAsset(preCompCla... | java |
public static int unitsToSeconds(String interval, String unit) {
if (interval == null || interval.isEmpty()) return 0;
else if (unit == null) return (int)(Double.parseDouble(interval));
else if (unit.equals(INTERVAL_DAYS)) return (int)(Double.parseDouble(interval)*86400);
else if (unit.equal... | java |
public static String secondsToUnits(int seconds, String unit) {
if (unit == null) return String.valueOf(seconds);
else if (unit.equals(INTERVAL_DAYS)) return String.valueOf(Math.round(seconds/86400));
else if (unit.equals(INTERVAL_HOURS)) return String.valueOf(Math.round(seconds/3600));
else... | java |
@SuppressWarnings("unused")
public String getAssetPath() {
String relPath = getRelPath();
return relPath.substring(0, relPath.length() - getAsset().getName().length() - 1).replace('/', '.')
+ "/" + getAsset().getName();
} | java |
@Override
@Path("/{documentId}")
public JSONObject get(String path, Map<String,String> headers)
throws ServiceException, JSONException {
WorkflowServices workflowServices = ServiceLocator.getWorkflowServices();
String docId = getSegment(path, 1);
if (docId == null) {
thro... | java |
protected URL getRequestUrl(Map<String,String> headers) throws ServiceException {
String requestUrl = headers.get(Listener.METAINFO_REQUEST_URL);
if (requestUrl == null)
throw new ServiceException("Missing header: " + Listener.METAINFO_REQUEST_URL);
String queryStr = "";
if (... | java |
protected UserAction getUserAction(User user, String path, Object content, Map<String,String> headers) {
Action action = getAction(path, content, headers);
Entity entity = getEntity(path, content, headers);
Long entityId = getEntityId(path, content, headers);
String descrip = getEntityDe... | java |
protected Long getEntityId(String path, Object content, Map<String,String> headers) {
return 0L;
} | java |
protected String getSub(String path) {
int slash = path.indexOf('/');
if (slash > 0 && slash < path.length() - 1) // the first part of the path is what got us here
return path.substring(slash + 1);
else
return null;
} | java |
protected Entity getEntity(String path, Object content, Map<String,String> headers) {
return Entity.Other;
} | java |
protected String getAuthUser(Map<String,String> headers) {
return headers.get(Listener.AUTHENTICATED_USER_HEADER);
} | java |
protected void authorizeExport(Map<String,String> headers) throws AuthorizationException {
String path = headers.get(Listener.METAINFO_REQUEST_PATH);
User user = authorize(path, new JsonObject(), headers);
Action action = Action.Export;
Entity entity = getEntity(path, null, headers);
... | java |
public Map<String,String> getRequestHeaders() {
// If we already set the headers when logging request metadata, use them
if (super.getRequestHeaders() != null)
return super.getRequestHeaders();
try {
Map<String,String> headers = null;
String headersVar = get... | java |
public static String getConfigLocation() {
if (configLocation == null) {
String configLoc = System.getProperty(MDW_CONFIG_LOCATION);
if (configLoc != null) {
if (!configLoc.endsWith("/"))
configLoc = configLoc + "/";
configLocation = co... | java |
public static PropertyManager getInstance() {
if (instance == null) {
try {
initializePropertyManager();
}
catch (StartupException e) {
// should not reach here, as the property manager should be
// initialized by now
... | java |
public static String locate(String className, ClassLoader classLoader) {
String resource = new String(className);
// format the file name into a valid resource name
if (!resource.startsWith("/")) {
resource = "/" + resource;
}
resource = resource.replace('.', '/');
... | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.