com.sap.ip.collaboration.room.api

Class RoomCreationValidationErrors

java.lang.Object
  extended bycom.sap.ip.collaboration.room.api.RoomCreationValidationErrors

public class RoomCreationValidationErrors
extends Object

Public Class describing the possible error situations at room creation time.

To create a new room an instance of IRoomInfo is needed. Some of the fields in the IRoomInfo object are mandatory or need to have a specific value to ensure integrity before a new room is created based on the IRoomInfo object (using method IRooms.createRoom(IRoomInfo, boolean)). All these integrity checks are done by the method IRoomInfo.validate(). If this method returns false, some of the constraints are violated in your instance of IRoomInfo. In this case a call to IRoomInfo.getValidationErrors() returns you one or more instances of RoomCreationValidationErrors. This means that you get all errors in your IRoomInfo object at the same time with one single call to getValidationErrors(). You can simply iterate over the errors and for example display them in the UI.

The class provides static final instances of itself. Each of these instances represent one possible error situation and can be matched against the actual errors returned by IRoomInfo.getValidationErrors().

This allows a separation between the application creating a room and the room backend. The room backend knows about all data constraints in the IRoomInfo object and checks them for the application. The application gets an error object for each violated constraint containing also a shorttext describing the violation. In the future this description will be more detailed and internationalizable.


Field Summary
static RoomCreationValidationErrors BAD_USER_ID
           
static RoomCreationValidationErrors CATEGORIES_MISSING
           
static RoomCreationValidationErrors DESC_MISSING
           
static RoomCreationValidationErrors INVALID_INITIAL_ROLE
           
static RoomCreationValidationErrors INVALID_USER_ROLE
           
static RoomCreationValidationErrors NAME_MISSING
          static final members: instances of RoomCreationValidationErrors representing the different errors.
static RoomCreationValidationErrors NO_SUCH_PRIVACY
           
static RoomCreationValidationErrors NO_SUCH_TEMPLATE
           
static RoomCreationValidationErrors OWNER_MISSING
           
static RoomCreationValidationErrors OWNER_ROLE_MISSING
           
static RoomCreationValidationErrors PRIVACY_MISSING
           
static RoomCreationValidationErrors STRICT_PRIVACY_VIOLATION
           
static RoomCreationValidationErrors TEMPLATENAME_MISSING
           
 
Method Summary
static RoomCreationValidationErrors[] getErrors()
          Get a list of all possible errors
 String getShortText()
          Get the shorttext of the error
 String toString()
          toString method -> getShortText()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME_MISSING

public static final RoomCreationValidationErrors NAME_MISSING
static final members: instances of RoomCreationValidationErrors representing the different errors. These instances can be accessed from outside.


DESC_MISSING

public static final RoomCreationValidationErrors DESC_MISSING

TEMPLATENAME_MISSING

public static final RoomCreationValidationErrors TEMPLATENAME_MISSING

NO_SUCH_TEMPLATE

public static final RoomCreationValidationErrors NO_SUCH_TEMPLATE

CATEGORIES_MISSING

public static final RoomCreationValidationErrors CATEGORIES_MISSING

OWNER_MISSING

public static final RoomCreationValidationErrors OWNER_MISSING

PRIVACY_MISSING

public static final RoomCreationValidationErrors PRIVACY_MISSING

NO_SUCH_PRIVACY

public static final RoomCreationValidationErrors NO_SUCH_PRIVACY

STRICT_PRIVACY_VIOLATION

public static final RoomCreationValidationErrors STRICT_PRIVACY_VIOLATION

INVALID_INITIAL_ROLE

public static final RoomCreationValidationErrors INVALID_INITIAL_ROLE

INVALID_USER_ROLE

public static final RoomCreationValidationErrors INVALID_USER_ROLE

OWNER_ROLE_MISSING

public static final RoomCreationValidationErrors OWNER_ROLE_MISSING

BAD_USER_ID

public static final RoomCreationValidationErrors BAD_USER_ID
Method Detail

getErrors

public static RoomCreationValidationErrors[] getErrors()
Get a list of all possible errors

Returns:
Array containing all possible error objects

getShortText

public String getShortText()
Get the shorttext of the error

Returns:
String describing the error

toString

public String toString()
toString method -> getShortText()

Returns:
String describing the error


Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.