/*
* Copyright 2006 Pentaho Corporation. All rights reserved.
* This software was developed by Pentaho Corporation and is provided under the terms
* of the Mozilla Public License, Version 1.1, or any later version. You may not use
* this file except in compliance with the license. If you need a copy of the license,
* please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
* BI Platform. The Initial Developer is Pentaho Corporation.
*
* Software distributed under the Mozilla Public License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
* the license for the specific language governing your rights and limitations.
*/
/*
* Created on Jun 17, 2005
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package org.pentaho.core.runtime;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.Reader;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.activation.DataSource;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.dom4j.Document;
import org.dom4j.Element;
import org.dom4j.Node;
import org.pentaho.core.audit.AuditHelper;
import org.pentaho.core.audit.MessageTypes;
import org.pentaho.core.component.IComponent;
import org.pentaho.core.connection.IPentahoResultSet;
import org.pentaho.core.output.IContentOutputHandler;
import org.pentaho.core.repository.IContentItem;
import org.pentaho.core.repository.IContentLocation;
import org.pentaho.core.repository.IContentRepository;
import org.pentaho.core.repository.IRuntimeElement;
import org.pentaho.core.repository.IRuntimeRepository;
import org.pentaho.core.repository.content.ContentRepositoryOutputHandler;
import org.pentaho.core.session.IPentahoSession;
import org.pentaho.core.solution.ActionParameterSource;
import org.pentaho.core.solution.ConditionalExecution;
import org.pentaho.core.solution.HttpRequestParameterProvider;
import org.pentaho.core.solution.HttpSessionParameterProvider;
import org.pentaho.core.solution.IActionCompleteListener;
import org.pentaho.core.solution.IActionDefinition;
import org.pentaho.core.solution.IActionResource;
import org.pentaho.core.solution.IActionSequence;
import org.pentaho.core.solution.IOutputHandler;
import org.pentaho.core.solution.IParameterProvider;
import org.pentaho.core.solution.ISolutionEngine;
import org.pentaho.core.system.PentahoMessenger;
import org.pentaho.core.system.PentahoSystem;
import org.pentaho.core.ui.IPentahoUrlFactory;
import org.pentaho.core.util.IParameterResolver;
import org.pentaho.core.util.TemplateUtil;
import org.pentaho.core.util.XForm;
import org.pentaho.core.util.XmlHelper;
import org.pentaho.messages.Messages;
import org.pentaho.messages.util.LocaleHelper;
import org.pentaho.util.logging.Logger;
/**
* @author James Dixon
*
* TODO To change the template for this generated type comment go to Window -
* Preferences - Java - Code Style - Code Templates
*/
public class RuntimeContextBase extends PentahoMessenger implements IRuntimeContext {
/**
*
*/
private static final long serialVersionUID = -1179016850860938879L;
private IRuntimeElement runtimeData;
// private int loggingLevel = UNKNOWN;
private static String LOG_NAME = "RUNTIME"; //$NON-NLS-1$
protected static String PARAMETER_FORM = "actionparam"; //$NON-NLS-1$
private String logId;
private IPentahoSession session;
protected ISolutionEngine solutionEngine;
private int errorLevel = RUNTIME_CONTEXT_RESOLVE_OK;
protected StringBuffer xformHeader;
protected StringBuffer xformBody;
protected Map xformFields;
private static final String DEFAULT_PARAMETER_XSL = "DefaultParameterForm.xsl"; //$NON-NLS-1$
protected String parameterXsl = DEFAULT_PARAMETER_XSL;
protected String parameterTemplate = null;
protected String parameterTarget;
private String instanceId;
private String processId;
private String handle;
private String solutionName;
protected IPentahoUrlFactory urlFactory;
protected Map parameterProviders;
protected static Map componentClassMap;
protected IActionSequence actionSequence;
public static final boolean debug = PentahoSystem.debug;
private boolean audit = true;
private int status;
protected IOutputHandler outputHandler;
protected ParameterManager paramManager;
private String currentComponent;
private IActionDefinition currentActionDef;
private int promptStatus = PROMPT_NO;
// Normally shouldn't need to synchronize. But, a bug in
// pattern compilation results in the need to synchronize
// a small block of code. If/when this problem is fixed, we
// can remove this synchronization lock.
private static final byte[] PATTERN_COMPILE_LOCK = new byte[0];
private static final Log logger = LogFactory.getLog(RuntimeContextBase.class);
static {
getComponentClassMap();
}
public Log getLogger() {
return logger;
}
/*
* public RuntimeContext( IApplicationContext applicationContext, String
* solutionName ) { this( null, solutionName, applicationContext, null,
* null, null, null ); }
*/
public RuntimeContextBase(String instanceId, ISolutionEngine solutionEngine, String solutionName, IRuntimeElement runtimeData, IPentahoSession session, IOutputHandler outputHandler, String processId, IPentahoUrlFactory urlFactory, Map parameterProviders,
List messages) {
this.instanceId = instanceId;
this.solutionEngine = solutionEngine;
this.session = session;
this.outputHandler = outputHandler;
this.processId = processId;
this.solutionName = solutionName;
this.urlFactory = urlFactory;
this.parameterProviders = parameterProviders;
setMessages(messages);
xformHeader = new StringBuffer();
xformBody = new StringBuffer();
xformFields = new HashMap();
// TODO - Throw invalid parameter error if these babies are null
this.currentComponent = ""; //$NON-NLS-1$
this.currentActionDef = null;
status = RUNTIME_STATUS_NOT_STARTED;
this.runtimeData = runtimeData;
if (runtimeData != null) {
this.instanceId = runtimeData.getInstanceId();
}
handle = "context-" + this.hashCode() + "-" + new Date().getTime(); //$NON-NLS-1$ //$NON-NLS-2$
logId = ((instanceId != null) ? instanceId : solutionName) + ":" + LOG_NAME + ":" + handle + " "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
paramManager = new ParameterManager();
// Set the default XSL for parameter forms
parameterXsl = DEFAULT_PARAMETER_XSL;
}
private IRuntimeElement createChild(boolean persisted) {
try {
IRuntimeRepository runtimeRepository = PentahoSystem.getRuntimeRepository( session );
// IRuntimeRepository runtimeRepository = RuntimeRepository.getInstance(session);
runtimeRepository.setLoggingLevel(loggingLevel);
IRuntimeElement childRuntimeData = runtimeRepository.newRuntimeElement(instanceId, "instance", !persisted); //$NON-NLS-1$
没有合适的资源?快使用搜索试试~ 我知道了~
CubeDesigner-0.7.2.0_Win32.zip
共557个文件
java:473个
properties:64个
xml:11个
1星 需积分: 10 31 下载量 66 浏览量
2007-11-23
14:49:51
上传
评论 3
收藏 1.39MB ZIP 举报
温馨提示
学习 cube 写法
资源推荐
资源详情
资源评论
收起资源包目录
CubeDesigner-0.7.2.0_Win32.zip (557个子文件)
RuntimeContextBase.java 91KB
SolutionRepository.java 82KB
SubscriptionAdminUIComponent.java 63KB
PentahoDataTransmuter.java 61KB
PentahoSystem.java 53KB
JFreeChartEngine.java 47KB
SolutionRepository.java 47KB
SubscriptionRepository.java 41KB
SQLBaseComponent.java 37KB
HttpWebService.java 35KB
FlashChartComponent.java 34KB
AdhocWebService.java 32KB
XMLABaseComponent.java 32KB
SharkManager.java 31KB
TimeSeriesCollectionChartDefinition.java 29KB
XmlHelper.java 29KB
KettleComponent.java 28KB
XYSeriesCollectionChartDefinition.java 27KB
JFreeReportGeneratorComponent.java 27KB
JasperReportsComponent.java 27KB
CategoryDatasetChartDefinition.java 26KB
SubscriptionHelper.java 26KB
HibernateUtil.java 26KB
IRuntimeContext.java 25KB
ComponentSubclassExample.java 23KB
EmailComponent.java 23KB
BIRTReportComponent.java 23KB
RuntimeElement.java 22KB
SimpleRuntimeElement.java 22KB
PieDatasetChartDefinition.java 22KB
ServerDatasourceAdmin.java 21KB
ComponentBase.java 21KB
UIUtil.java 21KB
FileInfo.java 21KB
DialWidgetDefinition.java 20KB
SequenceDefinition.java 20KB
PMDUIComponent.java 19KB
UtilityComponent.java 19KB
PentahoHtmlFilesystem.java 19KB
PropertiesPanelUIComponent.java 18KB
ChartHelper.java 18KB
CleanXmlHelper.java 18KB
DateMath.java 17KB
JBossDatasourceAdmin.java 17KB
TemplateUtil.java 17KB
SolutionEngineBase.java 17KB
MDXBaseComponent.java 16KB
MySQL5Dialect.java 16KB
ChartComponent.java 16KB
JobSchedulerComponent.java 16KB
ViewAction.java 16KB
WidgetGridComponent.java 16KB
CacheManager.java 16KB
AbstractChartComponent.java 15KB
XForm.java 15KB
ContentItem.java 15KB
CategoryDatasetChartComponent.java 15KB
TimeSeriesCollectionChartComponent.java 15KB
XYSeriesCollectionChartComponent.java 15KB
XQueryBaseComponent.java 15KB
AbstractChartExpression.java 15KB
PieDatasetChartComponent.java 14KB
ISolutionRepository.java 13KB
SharkPublisher.java 13KB
ColorHelper.java 13KB
MondrianModelComponent.java 13KB
CategorySetCollectorFunction.java 13KB
UserFilesComponent.java 13KB
SchedulerAdminUIComponent.java 13KB
FilterDefinition.java 13KB
JavascriptRule.java 13KB
ContentLocation.java 12KB
PrintComponent.java 12KB
RuntimeContext.java 12KB
PentahoPortalNavigationPortlet.java 12KB
SharkToolAgent.java 12KB
ParameterManager.java 12KB
TestComponent.java 12KB
JavaScriptResultSet.java 12KB
SecureFilterComponent.java 12KB
ActionPortlet.java 12KB
QuartzBackgroundExecutionHelper.java 11KB
SubscriptionExecute.java 11KB
BasePortlet.java 11KB
ContentItemFile.java 11KB
RepositoryFile.java 11KB
SQLConnection.java 11KB
DBCPConnectionProvider.java 11KB
SelectionMapper.java 11KB
JFreeReportDataComponent.java 11KB
ContentRepository.java 11KB
DashboardWidgetComponent.java 11KB
Logger.java 10KB
AclPublisher.java 10KB
XQResultSet.java 10KB
PublisherUtil.java 10KB
JFreeReportLoadComponent.java 10KB
QuartzExecute.java 10KB
IRuntimeElement.java 10KB
JFreeReportComponent.java 10KB
共 557 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
- 武汉众参网络科技有限公司2012-07-17真心没明白这是干嘛的,就一些source文件,并非我需要的整个程序。
gaoyueyue
- 粉丝: 0
- 资源: 15
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功