com.sapportals.wcm.protocol.ice.protocol

Class ICEAccessControl

java.lang.Object
  extended by com.sapportals.wcm.protocol.ice.protocol.ICEAccessControl
All Implemented Interfaces:
IICECharacterHandler, IICEElement, IDOMStorable

public class ICEAccessControl
extends Object
implements IICEElement, IICECharacterHandler, IDOMStorable

ICEAccessControl represents an ice-access-control element inside an ice-access. An ICEAccessControl defines the authentication method the subscriber could use to access an item referenced by the surrounding ice-item-ref.

Detailed information about the ICE package structur could be found in the ICE 1.1 specification section 5.2 , the ice-item-ref element is described in section 5.2.2.3 . ice-access-control format

 <!ENTITY % cm.access-control "(#PCDATA)" >
 <!ELEMENT ice-access-control %cm.access-control; >
 <!ATTLIST ice-access-control
           id                    ID              #IMPLIED
           name                  CDATA           #IMPLIED
           description           CDATA           #IMPLIED
           control-type          ( password  |
                                   cookie    |
                                   custom    )   #REQUIRED
           user                  CDATA           #IMPLIED
           password              CDATA           #IMPLIED
           access-reference      CDATA           #IMPLIED
           extension-id          CDATA           #IMPLIED
 >

Copyright 2004 SAP AG

See Also:
ICEAccess, ICEItemRef

Field Summary
static String TAGNAME
           
 
Constructor Summary
ICEAccessControl(Attributes attributes)
          Create a new ICEAccessControl.
ICEAccessControl(Element element)
          Create an ICEAccessControl object from a DOM-element.
ICEAccessControl(Properties properties)
           
ICEAccessControl(String user, String password)
          Create a new ICEAccessControl for password authentication.
 
Method Summary
 void close()
          Informs the handler that is character stream is closed.
 String getAccessReference()
          Get the access reference.
 ICEAccessControlType getControlType()
          The the type of the access control.
 String getPassword()
          Get the password for password authentication.
 String getUser()
          Get the user id for password authentication.
 void handleCharacters(char[] characters, int offset, int length)
          Receive notification of character data.
 Node store(Document document)
          Store the informations into a DOM.
 void write(ContentHandler handler)
          Write the XML representation of the ICE element to a SAX ContentHandler.
 boolean writeChunk(ContentHandler handler)
          Write a chunk of XML to a SAX ContentHandler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAGNAME

public static final String TAGNAME
See Also:
Constant Field Values
Constructor Detail

ICEAccessControl

public ICEAccessControl(Attributes attributes)
Create a new ICEAccessControl. This constructor is used by ICEInput to decode an ICEAccessControl from an ICE payload.

Parameters:
attributes - The attributes of the ice-access-control tag

ICEAccessControl

public ICEAccessControl(Element element)
Create an ICEAccessControl object from a DOM-element.

Parameters:
element - A DOM-element containing the data of the access control

ICEAccessControl

public ICEAccessControl(Properties properties)

ICEAccessControl

public ICEAccessControl(String user,
                        String password)
Create a new ICEAccessControl for password authentication.

Parameters:
user - The user-id
password - The password
Method Detail

getControlType

public ICEAccessControlType getControlType()
The the type of the access control.

Returns:
The type of the access control

getUser

public String getUser()
Get the user id for password authentication.

Returns:
The user id for password authentication

getPassword

public String getPassword()
Get the password for password authentication.

Returns:
The password for password authentication

getAccessReference

public String getAccessReference()
Get the access reference. This is usually a cookie.

Returns:
The access reference

handleCharacters

public void handleCharacters(char[] characters,
                             int offset,
                             int length)
                      throws SAXException
Receive notification of character data. ICEInput invokes this method upon a character event from the underlying SAX parser.

Specified by:
handleCharacters in interface IICECharacterHandler
Parameters:
characters - The characters from the XML document.
offset - The start position in the array.
length - The number of characters to read from the array.
Throws:
SAXException - on error (might wrap another exception)

close

public void close()
           throws SAXException
Informs the handler that is character stream is closed. ICEInput invokes this method once the current XML element ends.

Specified by:
close in interface IICECharacterHandler
Throws:
SAXException - on error (might wrap another exception)

write

public void write(ContentHandler handler)
           throws SAXException
Write the XML representation of the ICE element to a SAX ContentHandler. This method is used by ICEOutput to create an ICE payload.

Specified by:
write in interface IICEElement
Parameters:
handler - The SAX ContentHandler (usually a XMLSerializer)
Throws:
SAXException - on error (might wrap another exception)

writeChunk

public boolean writeChunk(ContentHandler handler)
                   throws SAXException
Write a chunk of XML to a SAX ContentHandler. This method is used by ICEOutput to write an ICE payload in chunked mode.

Specified by:
writeChunk in interface IICEElement
Parameters:
handler - The SAX ContentHandler (usually a XMLSerializer)
Returns:
true if there are more chunks in the queue
Throws:
SAXException - on error (might wrap another exception)

store

public Node store(Document document)
Store the informations into a DOM.

Specified by:
store in interface IDOMStorable
Parameters:
document - The DOM document that should be used as factory for the DOM elements
Returns:
A Node containing the informations of the configuration object (this might be the document element of the XML that is eventually written to the repository)
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM


Copyright 2011 SAP AG Complete Copyright Notice