Style Intelligence v12.0

inetsoft.uql.erm
Class VirtualPrivateModel

java.lang.Object
  extended by inetsoft.uql.erm.VpmObject
      extended by inetsoft.uql.erm.VirtualPrivateModel
All Implemented Interfaces:
inetsoft.util.xml.XMLStorage.XMLFragment, inetsoft.util.XMLSerializable, Serializable, Cloneable, Comparable

public class VirtualPrivateModel
extends VpmObject

VirtualPrivateModel, to restrict the visibility of table columns and the data returned from executed queries based upon some security criteria.

See Also:
Serialized Form

Constructor Summary
VirtualPrivateModel()
          Create a virtual private model.
VirtualPrivateModel(String name)
          Create a virtual private model.
 
Method Summary
 void addCondition(VpmCondition vcond)
          Add a vpm condition to this virtual private model.
 Object clone()
          Clone the object.
 boolean containsCondition(VpmCondition vcond)
          Check if contains a vpm condition in this virtual private model.
 boolean containsTable(String table)
          Determine if the specified table is assigned to this virtual private model.
 boolean evaluate(String[] tables, String[] columns, VariableTable vars, Principal user)
          Check if the virtual private model should be applied.
 boolean evaluate(String[] tables, String[] columns, VariableTable vars, Principal user, String partition)
          Check if the virtual private model should be applied.
 VpmCondition getCondition(String name)
          Get the vpm condition in this virtual private model.
 Enumeration getConditions()
          Get all the vpm conditions.
 String getDescription()
          Get the description of this virtual private model.
 HiddenColumns getHiddenColumns()
          Get the hidden columns.
protected  void parseContents(Element elem)
          Parse contents.
 void removeCondition(String name)
          Remove a vpm condition from this virtual private model.
 void removeCondition(VpmCondition vcond)
          Remove a vpm condition from this virtual private model.
 void removeConditions()
          Remove all the vpm conditions from this virtual private model.
 void setDescription(String desc)
          Set the description of this virtual private model.
 void setHiddenColumns(HiddenColumns hidden)
          Set the hidden columns.
 String toString()
          Get the string representaion.
protected  void writeContents(PrintWriter writer)
          Write contents.
 
Methods inherited from class inetsoft.uql.erm.VpmObject
compareTo, createVpmObject, equals, getName, getScript, hashCode, parseAttributes, parseXML, setName, setScript, writeAttributes, writeEnd, writeStart, writeXML
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VirtualPrivateModel

public VirtualPrivateModel()
Create a virtual private model.


VirtualPrivateModel

public VirtualPrivateModel(String name)
Create a virtual private model.

Parameters:
name - the specified name for the virtual private model.
Method Detail

getDescription

public String getDescription()
Get the description of this virtual private model.

Returns:
the description.

setDescription

public void setDescription(String desc)
Set the description of this virtual private model.

Parameters:
desc - the specified description.

containsTable

public boolean containsTable(String table)
Determine if the specified table is assigned to this virtual private model.

Parameters:
table - the name of the table.
Returns:
true if the specified table is assigned to this model, false otherwise.

addCondition

public void addCondition(VpmCondition vcond)
Add a vpm condition to this virtual private model.

Parameters:
vcond - the specified vpm condition to add.

containsCondition

public boolean containsCondition(VpmCondition vcond)
Check if contains a vpm condition in this virtual private model.

Parameters:
vcond - the specified vpm condition.
Returns:
true if contains the vpm condition, false otherwise.

getCondition

public VpmCondition getCondition(String name)
Get the vpm condition in this virtual private model.

Parameters:
name - the specified name of the vpm condition.
Returns:
the vpm condition if found, null otherwise.

getConditions

public Enumeration getConditions()
Get all the vpm conditions.

Returns:
all the vpm conditions.

removeCondition

public void removeCondition(String name)
Remove a vpm condition from this virtual private model.

Parameters:
name - the name of the vpm condition to remove.

removeCondition

public void removeCondition(VpmCondition vcond)
Remove a vpm condition from this virtual private model.

Parameters:
vcond - the specified vpm condition to remove.

removeConditions

public void removeConditions()
Remove all the vpm conditions from this virtual private model.


getHiddenColumns

public HiddenColumns getHiddenColumns()
Get the hidden columns.

Returns:
the hidden columns to hide columns when executing a query.

setHiddenColumns

public void setHiddenColumns(HiddenColumns hidden)
Set the hidden columns.

Parameters:
hidden - the specified hidden columns to hide columns when executing a query.

evaluate

public boolean evaluate(String[] tables,
                        String[] columns,
                        VariableTable vars,
                        Principal user)
                 throws Exception
Check if the virtual private model should be applied.

Parameters:
tables - the specified tables.
columns - the specified query columns.
vars - the specified variable table.
user - the specified principal.
Returns:
true if should be applied, false otherwise.
Throws:
Exception

evaluate

public boolean evaluate(String[] tables,
                        String[] columns,
                        VariableTable vars,
                        Principal user,
                        String partition)
                 throws Exception
Check if the virtual private model should be applied.

Parameters:
tables - the specified tables.
columns - the specified query columns.
vars - the specified variable table.
user - the specified principal.
Returns:
true if should be applied, false otherwise.
Throws:
Exception

clone

public Object clone()
Clone the object.

Overrides:
clone in class VpmObject
Returns:
the cloned object.

writeContents

protected void writeContents(PrintWriter writer)
Write contents.

Overrides:
writeContents in class VpmObject
Parameters:
writer - the specified writer.

parseContents

protected void parseContents(Element elem)
                      throws Exception
Parse contents.

Overrides:
parseContents in class VpmObject
Parameters:
elem - the specified xml element.
Throws:
Exception

toString

public String toString()
Get the string representaion.

Overrides:
toString in class VpmObject
Returns:
the string representation.

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.