|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.ssonet.net.ActionConfiguration
This class saves all values which are neccessary for configuring a action. This are mainly settings for the security goals. Methods are provided to access the values. Furthermore there are methods to save a configuration into a stream, respectively read from there.
Field Summary | |
static int |
STREAM_SIZE
contains the size (in bytes) which a configuration file needs if it's saved in a stream or is read from one |
Constructor Summary | |
ActionConfiguration(org.w3c.dom.Element rootElement)
creates an ActionConfiguration from an XML Node. |
|
ActionConfiguration(java.io.InputStream is)
Creates an ActionConfiguration from its XML-encoded form a stream. |
|
ActionConfiguration(java.io.InputStream is,
boolean isZipped)
Creates an ActionConfiguration from its XML-encoded form a stream. |
|
ActionConfiguration(int confidentiality,
int integrity,
int accountabilitySign,
int accountabilityAccept)
creates a action configuration objectes |
|
ActionConfiguration(org.ssonet.io.IOStream ioStream)
Creates an ActionConfiguration from its XML-encoded form an IOStream. |
|
ActionConfiguration(org.ssonet.io.IOStream ioStream,
boolean isZipped)
Creates an ActionConfiguration from its XML-encoded form an IOStream. |
Method Summary | |
org.w3c.dom.Document |
asXMLDocument(boolean negotiableIsSecret)
Outputs the ActionConfiguration as XML Document |
byte |
getSecurityGoalLevel(int securityGoal)
returns the level set for a security goal |
boolean |
lower(int securityGoal)
Lowers the level for a security goal. |
static void |
main(java.lang.String[] argv)
Main method (for testing purposes only) |
boolean |
raise(int securityGoal)
Raises the level for a security goal. |
boolean |
setSecurityGoalLevel(int securityGoal,
byte securityLevel)
Sets the level for a security goal |
void |
toStreamXML(org.ssonet.io.IOStream ioStream,
boolean negotiableIsSecret)
Encodes the data of this object in an XML document and writes it to an IOStream |
void |
toStreamXML(org.ssonet.io.IOStream ioStream,
boolean negotiableIsSecret,
boolean isZipped)
Encodes the data of this object in an XML document and writes it to an IOStream |
void |
toStreamXML(java.io.OutputStream outputStream,
boolean negotiableIsSecret)
Encodes the data of this object in an XML document and writes it to an OutputStream |
void |
toStreamXML(java.io.OutputStream outputStream,
boolean negotiableIsSecret,
boolean isZipped)
Encodes the data of this object in an XML document and writes it to an OutputStream |
java.lang.String |
toString()
returns a text, from which one can extract the actual settings |
java.lang.String |
toString(int securityGoal)
Returns a short description of the level set for the corresponding security goal. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int STREAM_SIZE
Constructor Detail |
public ActionConfiguration(int confidentiality, int integrity, int accountabilitySign, int accountabilityAccept) throws java.security.InvalidParameterException
confidentiality
- Level for confidentialityintegrity
- Level for IntegrityaccountabilitySign
- Level for accountabilitySignaccountabilityAccept
- Level for accountabilityAccept
The value for the level to set ranges from 0 - 6. For a more precise description of the
number meanings see @see namespublic ActionConfiguration(org.w3c.dom.Element rootElement) throws java.io.IOException
rootElement
- the XML document
java.io.IOException
- if an error occures while reading the data from the XML Documentpublic ActionConfiguration(java.io.InputStream is) throws java.io.IOException
is
- the stream the XML-encoded ActionConfiguration shall be read from.
java.io.IOException
- if an error occures while parsing the XML-encoded ActionConfigurationpublic ActionConfiguration(java.io.InputStream is, boolean isZipped) throws java.io.IOException
is
- the stream the XML-encoded ActionConfiguration shall be read from.isZipped
- true, if the document to be read is zipped, false otherwise
java.io.IOException
- if an error occures while parsing the XML-encoded ActionConfigurationpublic ActionConfiguration(org.ssonet.io.IOStream ioStream) throws java.io.IOException
ioStream
- the IOStream the XML-encoded ActionConfiguration shall be read from.
java.io.IOException
- if an error occures while parsing the XML-encoded ActionConfigurationpublic ActionConfiguration(org.ssonet.io.IOStream ioStream, boolean isZipped) throws java.io.IOException
ioStream
- the IOStream the XML-encoded ActionConfiguration shall be read from.isZipped
- true, if the document to be read is zipped, false otherwise
java.io.IOException
- if an error occures while parsing the XML-encoded ActionConfigurationMethod Detail |
public java.lang.String toString(int securityGoal)
public java.lang.String toString()
toString
in class java.lang.Object
public byte getSecurityGoalLevel(int securityGoal)
securityGoal
- security goal the level should be determined for. See @see SSONEConstants
public boolean setSecurityGoalLevel(int securityGoal, byte securityLevel)
securityGoal
- security goal the level should be set for. See @see SSONEConstantssecurityLevel
- securityLevel to set
public boolean raise(int securityGoal)
securityGoal
- security goal which security level should be raised
public boolean lower(int securityGoal)
securityGoal
- security goal which security level should be lowered
public org.w3c.dom.Document asXMLDocument(boolean negotiableIsSecret)
ActionConfiguration
as XML Document
negotiableIsSecret
- true, if the Negotiable-Flag shall not be included
in the XML Document, false otherwise
("on no condition, negotiable" becomes "on no condition"
and "unconditional, negotiable" becomes "unconditional") * @return the ActionConfiguration
encoded as XML Documentpublic void toStreamXML(java.io.OutputStream outputStream, boolean negotiableIsSecret) throws java.io.IOException
outputStream
- the stream, where the XML document shall be written to,negotiableIsSecret
- true, if the "negotiable" flag shall not be seen in the encoded form, false otherwise
("on no condition, negotiable" becomes "on no condition"
and "unconditional, negotiable" becomes "unconditional")
java.io.IOException
- if an error occures during encoding to XML.public void toStreamXML(java.io.OutputStream outputStream, boolean negotiableIsSecret, boolean isZipped) throws java.io.IOException
outputStream
- the stream, where the XML document shall be written to,negotiableIsSecret
- true, if the "negotiable" flag shall not be seen in the encoded form, false otherwise
("on no condition, negotiable" becomes "on no condition"
and "unconditional, negotiable" becomes "unconditional")isZipped
- true, if the document shall be zipped, false otherwise
java.io.IOException
- if an error occures during encoding to XML.public void toStreamXML(org.ssonet.io.IOStream ioStream, boolean negotiableIsSecret) throws java.io.IOException
ioStream
- the stream, where the XML document shall be written to,negotiableIsSecret
- true, if the "negotiable" flag shall not be seen in the encoded form, false otherwise
("on no condition, negotiable" becomes "on no condition"
and "unconditional, negotiable" becomes "unconditional")
java.io.IOException
- if an error occures during encoding to XML.public void toStreamXML(org.ssonet.io.IOStream ioStream, boolean negotiableIsSecret, boolean isZipped) throws java.io.IOException
ioStream
- the stream, where the XML document shall be written to,negotiableIsSecret
- true, if the "negotiable" flag shall not be seen in the encoded form, false otherwise
("on no condition, negotiable" becomes "on no condition"
and "unconditional, negotiable" becomes "unconditional")isZipped
- true, if the document shall be zipped, false otherwise
java.io.IOException
- if an error occures during encoding to XML.public static void main(java.lang.String[] argv)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |