summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorning.zhang2012-02-14 03:51:15 (EST)
committer dgao2012-02-14 03:51:15 (EST)
commitcaca53f2290cdb330dbc2471757cdaf2a5bbbf41 (patch)
treefcb5e7cd74480aa7f69fbaea4126739d8f455d8d
parent5916d9b24e0930161d22235125d343923844c277 (diff)
downloadorg.eclipse.birt-caca53f2290cdb330dbc2471757cdaf2a5bbbf41.zip
org.eclipse.birt-caca53f2290cdb330dbc2471757cdaf2a5bbbf41.tar.gz
org.eclipse.birt-caca53f2290cdb330dbc2471757cdaf2a5bbbf41.tar.bz2
- Summary:
A new CubeACLExpressionProvider instance is used when editing ACL expressions for the group, level, measure, and cube. - Bugzilla Bug(s) Resolved: None - Description: A new CubeACLExpressionProvider instance is used when editing ACL expressions for the group, level, measure, and cube.
-rw-r--r--UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/DateLevelDialog.java4
-rw-r--r--UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/GroupDialog.java4
-rw-r--r--UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/GroupRenameDialog.java4
-rw-r--r--UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/LevelPropertyDialog.java3
-rw-r--r--UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/MeasureDialog.java4
-rw-r--r--UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/provider/CubeACLExpressionProvider.java56
6 files changed, 66 insertions, 9 deletions
diff --git a/UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/DateLevelDialog.java b/UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/DateLevelDialog.java
index 5e9acd8..4b1436c 100644
--- a/UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/DateLevelDialog.java
+++ b/UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/DateLevelDialog.java
@@ -13,7 +13,7 @@ import org.eclipse.birt.report.designer.internal.ui.util.IHelpContextIds;
import org.eclipse.birt.report.designer.internal.ui.util.UIUtil;
import org.eclipse.birt.report.designer.internal.ui.util.WidgetUtil;
import org.eclipse.birt.report.designer.ui.cubebuilder.nls.Messages;
-import org.eclipse.birt.report.designer.ui.cubebuilder.provider.CubeExpressionProvider;
+import org.eclipse.birt.report.designer.ui.cubebuilder.provider.CubeACLExpressionProvider;
import org.eclipse.birt.report.designer.ui.cubebuilder.provider.LinkToCubeExpressionProvider;
import org.eclipse.birt.report.designer.ui.cubebuilder.util.BuilderConstants;
import org.eclipse.birt.report.designer.ui.cubebuilder.util.OlapUtil;
@@ -433,7 +433,7 @@ public class DateLevelDialog extends TitleAreaDialog
helper.setProperty( BuilderConstants.SECURITY_EXPRESSION_CONTEXT,
input );
helper.setProperty( BuilderConstants.SECURITY_EXPRESSION_PROVIDER,
- new CubeExpressionProvider( input ) );
+ new CubeACLExpressionProvider( input ) );
helper.setProperty( BuilderConstants.SECURITY_EXPRESSION_PROPERTY,
input.getACLExpression( ) );
helper.createContent( parent );
diff --git a/UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/GroupDialog.java b/UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/GroupDialog.java
index f6bf36f..7b80ec9 100644
--- a/UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/GroupDialog.java
+++ b/UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/GroupDialog.java
@@ -13,7 +13,7 @@ import org.eclipse.birt.report.designer.internal.ui.util.IHelpContextIds;
import org.eclipse.birt.report.designer.internal.ui.util.UIUtil;
import org.eclipse.birt.report.designer.internal.ui.util.WidgetUtil;
import org.eclipse.birt.report.designer.ui.cubebuilder.nls.Messages;
-import org.eclipse.birt.report.designer.ui.cubebuilder.provider.CubeExpressionProvider;
+import org.eclipse.birt.report.designer.ui.cubebuilder.provider.CubeACLExpressionProvider;
import org.eclipse.birt.report.designer.ui.cubebuilder.util.BuilderConstants;
import org.eclipse.birt.report.designer.ui.cubebuilder.util.OlapUtil;
import org.eclipse.birt.report.designer.ui.cubebuilder.util.UIHelper;
@@ -726,7 +726,7 @@ public class GroupDialog extends TitleAreaDialog
helper.setProperty( BuilderConstants.SECURITY_EXPRESSION_CONTEXT,
dimension );
helper.setProperty( BuilderConstants.SECURITY_EXPRESSION_PROVIDER,
- new CubeExpressionProvider( dimension ) );
+ new CubeACLExpressionProvider( dimension ) );
helper.setProperty( BuilderConstants.SECURITY_EXPRESSION_PROPERTY,
dimension.getACLExpression( ) );
helper.createContent( parent );
diff --git a/UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/GroupRenameDialog.java b/UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/GroupRenameDialog.java
index d4e41fc..4f79458 100644
--- a/UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/GroupRenameDialog.java
+++ b/UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/GroupRenameDialog.java
@@ -18,7 +18,7 @@ import org.eclipse.birt.report.designer.internal.ui.util.ExceptionHandler;
import org.eclipse.birt.report.designer.internal.ui.util.IHelpContextIds;
import org.eclipse.birt.report.designer.internal.ui.util.UIUtil;
import org.eclipse.birt.report.designer.ui.cubebuilder.nls.Messages;
-import org.eclipse.birt.report.designer.ui.cubebuilder.provider.CubeExpressionProvider;
+import org.eclipse.birt.report.designer.ui.cubebuilder.provider.CubeACLExpressionProvider;
import org.eclipse.birt.report.designer.ui.cubebuilder.util.BuilderConstants;
import org.eclipse.birt.report.designer.ui.dialogs.BaseDialog;
import org.eclipse.birt.report.designer.ui.util.ExceptionUtil;
@@ -207,7 +207,7 @@ public class GroupRenameDialog extends BaseDialog
helper.setProperty( BuilderConstants.SECURITY_EXPRESSION_CONTEXT,
dimension );
helper.setProperty( BuilderConstants.SECURITY_EXPRESSION_PROVIDER,
- new CubeExpressionProvider( dimension ) );
+ new CubeACLExpressionProvider( dimension ) );
helper.setProperty( BuilderConstants.SECURITY_EXPRESSION_PROPERTY,
dimension.getACLExpression( ) );
helper.createContent( parent );
diff --git a/UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/LevelPropertyDialog.java b/UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/LevelPropertyDialog.java
index a239824..709c76c 100644
--- a/UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/LevelPropertyDialog.java
+++ b/UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/LevelPropertyDialog.java
@@ -28,6 +28,7 @@ import org.eclipse.birt.report.designer.internal.ui.util.IHelpContextIds;
import org.eclipse.birt.report.designer.internal.ui.util.UIUtil;
import org.eclipse.birt.report.designer.internal.ui.util.WidgetUtil;
import org.eclipse.birt.report.designer.ui.cubebuilder.nls.Messages;
+import org.eclipse.birt.report.designer.ui.cubebuilder.provider.CubeACLExpressionProvider;
import org.eclipse.birt.report.designer.ui.cubebuilder.provider.CubeExpressionProvider;
import org.eclipse.birt.report.designer.ui.cubebuilder.provider.LinkToCubeExpressionProvider;
import org.eclipse.birt.report.designer.ui.cubebuilder.util.BuilderConstants;
@@ -1151,7 +1152,7 @@ public class LevelPropertyDialog extends TitleAreaDialog
levelHelper.setProperty( BuilderConstants.SECURITY_EXPRESSION_CONTEXT,
input );
levelHelper.setProperty( BuilderConstants.SECURITY_EXPRESSION_PROVIDER,
- new CubeExpressionProvider( input ) );
+ new CubeACLExpressionProvider( input ) );
levelHelper.setProperty( BuilderConstants.SECURITY_EXPRESSION_PROPERTY,
input.getACLExpression( ) );
levelHelper.createContent( parent );
diff --git a/UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/MeasureDialog.java b/UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/MeasureDialog.java
index 0773c5b..fae70cd 100644
--- a/UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/MeasureDialog.java
+++ b/UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/dialog/MeasureDialog.java
@@ -28,7 +28,7 @@ import org.eclipse.birt.report.designer.internal.ui.util.IHelpContextIds;
import org.eclipse.birt.report.designer.internal.ui.util.UIUtil;
import org.eclipse.birt.report.designer.internal.ui.util.WidgetUtil;
import org.eclipse.birt.report.designer.ui.cubebuilder.nls.Messages;
-import org.eclipse.birt.report.designer.ui.cubebuilder.provider.CubeExpressionProvider;
+import org.eclipse.birt.report.designer.ui.cubebuilder.provider.CubeACLExpressionProvider;
import org.eclipse.birt.report.designer.ui.cubebuilder.provider.CubeMeasureExpressionProvider;
import org.eclipse.birt.report.designer.ui.cubebuilder.provider.LinkToCubeExpressionProvider;
import org.eclipse.birt.report.designer.ui.cubebuilder.util.BuilderConstants;
@@ -741,7 +741,7 @@ public class MeasureDialog extends TitleAreaDialog
securityHelper.setProperty( BuilderConstants.SECURITY_EXPRESSION_CONTEXT,
input );
securityHelper.setProperty( BuilderConstants.SECURITY_EXPRESSION_PROVIDER,
- new CubeExpressionProvider( input ) );
+ new CubeACLExpressionProvider( input ) );
securityHelper.setProperty( BuilderConstants.SECURITY_EXPRESSION_PROPERTY,
input.getACLExpression( ) );
securityHelper.createContent( parent );
diff --git a/UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/provider/CubeACLExpressionProvider.java b/UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/provider/CubeACLExpressionProvider.java
new file mode 100644
index 0000000..e07fbbf
--- /dev/null
+++ b/UI/org.eclipse.birt.report.designer.ui.cubebuilder/src/org/eclipse/birt/report/designer/ui/cubebuilder/provider/CubeACLExpressionProvider.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Actuate Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Actuate Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.birt.report.designer.ui.cubebuilder.provider;
+
+import org.eclipse.birt.report.designer.ui.dialogs.ExpressionProvider;
+import org.eclipse.birt.report.designer.ui.expressions.ExpressionFilter;
+import org.eclipse.birt.report.model.api.DesignElementHandle;
+
+/**
+ * The expression provider for the Access Control List Expressions.
+ * Basically this is the default CubeExpressionProvider except that
+ * it filters the data set row category for the data set rows
+ * are not available while evaluating the ACL expression for a level.
+ */
+public class CubeACLExpressionProvider extends CubeExpressionProvider
+{
+ public CubeACLExpressionProvider(DesignElementHandle handle)
+ {
+ super(handle);
+ }
+
+ protected void addFilterToProvider()
+ {
+ this.addFilter( new ExpressionFilter( ) {
+
+ public boolean select( Object parentElement, Object element )
+ {
+ if ( ExpressionFilter.CATEGORY.equals( parentElement )
+ && ExpressionProvider.CURRENT_CUBE.equals( element ) )
+ {
+ return false;
+ }
+ if ( ExpressionFilter.CATEGORY.equals( parentElement )
+ && ExpressionProvider.MEASURE.equals( element ) )
+ {
+ return false;
+ }
+ if ( ExpressionFilter.CATEGORY.equals( parentElement )
+ && ExpressionProvider.DATASETS.equals( element ) )
+ {
+ return false;
+ }
+ return true;
+ }
+ } );
+ }
+}