2005-01-31 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mcs / class / Novell.Directory.Ldap / Novell.Directory.Ldap.Utilclass / ExceptionMessages.cs
1 /******************************************************************************
2 * The MIT License
3 * Copyright (c) 2003 Novell Inc.  www.novell.com
4
5 * Permission is hereby granted, free of charge, to any person obtaining  a copy
6 * of this software and associated documentation files (the Software), to deal
7 * in the Software without restriction, including  without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
9 * copies of the Software, and to  permit persons to whom the Software is 
10 * furnished to do so, subject to the following conditions:
11
12 * The above copyright notice and this permission notice shall be included in 
13 * all copies or substantial portions of the Software.
14
15 * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 * SOFTWARE.
22 *******************************************************************************/
23 //
24 // Novell.Directory.Ldap.Utilclass.ExceptionMessages.cs
25 //
26 // Author:
27 //   Sunil Kumar (Sunilk@novell.com)
28 //
29 // (C) 2003 Novell, Inc (http://www.novell.com)
30 //
31
32 using System;
33
34 namespace Novell.Directory.Ldap.Utilclass
35 {
36         
37         /// <summary> This class contains strings that may be associated with Exceptions generated
38         /// by the Ldap API libraries.
39         /// Two entries are made for each message, a String identifier, and the
40         /// actual error string.  Parameters are identified as {0}, {1}, etc.
41         /// </summary>
42         public class ExceptionMessages:System.Resources.ResourceManager
43         {
44                 public System.Object[][] getContents()
45                 {
46                         return contents;
47                 }
48                 //static strings to aide lookup and guarantee accuracy:
49                 //DO NOT include these strings in other Locales
50                 [CLSCompliantAttribute(false)]
51                 public const System.String TOSTRING = "TOSTRING";
52                 public const System.String SERVER_MSG = "SERVER_MSG";
53                 public const System.String MATCHED_DN = "MATCHED_DN";
54                 public const System.String FAILED_REFERRAL = "FAILED_REFERRAL";
55                 public const System.String REFERRAL_ITEM = "REFERRAL_ITEM";
56                 public const System.String CONNECTION_ERROR = "CONNECTION_ERROR";
57                 public const System.String CONNECTION_IMPOSSIBLE = "CONNECTION_IMPOSSIBLE";
58                 public const System.String CONNECTION_WAIT = "CONNECTION_WAIT";
59                 public const System.String CONNECTION_FINALIZED = "CONNECTION_FINALIZED";
60                 public const System.String CONNECTION_CLOSED = "CONNECTION_CLOSED";
61                 public const System.String CONNECTION_READER = "CONNECTION_READER";
62                 public const System.String DUP_ERROR = "DUP_ERROR";
63                 public const System.String REFERRAL_ERROR = "REFERRAL_ERROR";
64                 public const System.String REFERRAL_LOCAL = "REFERRAL_LOCAL";
65                 public const System.String REFERENCE_ERROR = "REFERENCE_ERROR";
66                 public const System.String REFERRAL_SEND = "REFERRAL_SEND";
67                 public const System.String REFERENCE_NOFOLLOW = "REFERENCE_NOFOLLOW";
68                 public const System.String REFERRAL_BIND = "REFERRAL_BIND";
69                 public const System.String REFERRAL_BIND_MATCH = "REFERRAL_BIND_MATCH";
70                 public const System.String NO_DUP_REQUEST = "NO_DUP_REQUEST";
71                 public const System.String SERVER_CONNECT_ERROR = "SERVER_CONNECT_ERROR";
72                 public const System.String NO_SUP_PROPERTY = "NO_SUP_PROPERTY";
73                 public const System.String ENTRY_PARAM_ERROR = "ENTRY_PARAM_ERROR";
74                 public const System.String DN_PARAM_ERROR = "DN_PARAM_ERROR";
75                 public const System.String RDN_PARAM_ERROR = "RDN_PARAM_ERROR";
76                 public const System.String OP_PARAM_ERROR = "OP_PARAM_ERROR";
77                 public const System.String PARAM_ERROR = "PARAM_ERROR";
78                 public const System.String DECODING_ERROR = "DECODING_ERROR";
79                 public const System.String ENCODING_ERROR = "ENCODING_ERROR";
80                 public const System.String IO_EXCEPTION = "IO_EXCEPTION";
81                 public const System.String INVALID_ESCAPE = "INVALID_ESCAPE";
82                 public const System.String SHORT_ESCAPE = "SHORT_ESCAPE";
83                 public const System.String INVALID_CHAR_IN_FILTER = "INVALID_CHAR_IN_FILTER";
84                 public const System.String INVALID_CHAR_IN_DESCR = "INVALID_CHAR_IN_DESCR";
85                 public const System.String INVALID_ESC_IN_DESCR = "INVALID_ESC_IN_DESCR";
86                 public const System.String UNEXPECTED_END = "UNEXPECTED_END";
87                 public const System.String MISSING_LEFT_PAREN = "MISSING_LEFT_PAREN";
88                 public const System.String MISSING_RIGHT_PAREN = "MISSING_RIGHT_PAREN";
89                 public const System.String EXPECTING_RIGHT_PAREN = "EXPECTING_RIGHT_PAREN";
90                 public const System.String EXPECTING_LEFT_PAREN = "EXPECTING_LEFT_PAREN";
91                 public const System.String NO_OPTION = "NO_OPTION";
92                 public const System.String INVALID_FILTER_COMPARISON = "INVALID_FILTER_COMPARISON";
93                 public const System.String NO_MATCHING_RULE = "NO_MATCHING_RULE";
94                 public const System.String NO_ATTRIBUTE_NAME = "NO_ATTRIBUTE_NAME";
95                 public const System.String NO_DN_NOR_MATCHING_RULE = "NO_DN_NOR_MATCHING_RULE";
96                 public const System.String NOT_AN_ATTRIBUTE = "NOT_AN_ATTRIBUTE";
97                 public const System.String UNEQUAL_LENGTHS = "UNEQUAL_LENGTHS";
98                 public const System.String IMPROPER_REFERRAL = "IMPROPER_REFERRAL";
99                 public const System.String NOT_IMPLEMENTED = "NOT_IMPLEMENTED";
100                 public const System.String NO_MEMORY = "NO_MEMORY";
101                 public const System.String SERVER_SHUTDOWN_REQ = "SERVER_SHUTDOWN_REQ";
102                 public const System.String INVALID_ADDRESS = "INVALID_ADDRESS";
103                 public const System.String UNKNOWN_RESULT = "UNKNOWN_RESULT";
104                 public const System.String OUTSTANDING_OPERATIONS = "OUTSTANDING_OPERATIONS";
105                 public const System.String WRONG_FACTORY = "WRONG_FACTORY";
106                 public const System.String NO_TLS_FACTORY = "NO_TLS_FACTORY";
107                 public const System.String NO_STARTTLS = "NO_STARTTLS";
108                 public const System.String STOPTLS_ERROR = "STOPTLS_ERROR";
109                 public const System.String MULTIPLE_SCHEMA = "MULTIPLE_SCHEMA";
110                 public const System.String NO_SCHEMA = "NO_SCHEMA";
111                 public const System.String READ_MULTIPLE = "READ_MULTIPLE";
112                 public const System.String CANNOT_BIND = "CANNOT_BIND";
113                 
114                 //End constants
115                 
116                 internal static readonly System.Object[][] contents = {new System.Object[]{"TOSTRING", "{0}: {1} ({2}) {3}"}, new System.Object[]{"SERVER_MSG", "{0}: Server Message: {1}"}, new System.Object[]{"MATCHED_DN", "{0}: Matched DN: {1}"}, new System.Object[]{"FAILED_REFERRAL", "{0}: Failed Referral: {1}"}, new System.Object[]{"REFERRAL_ITEM", "{0}: Referral: {1}"}, new System.Object[]{"CONNECTION_ERROR", "Unable to connect to server {0}:{1}"}, new System.Object[]{"CONNECTION_IMPOSSIBLE", "Unable to reconnect to server, application has never called connect()"}, new System.Object[]{"CONNECTION_WAIT", "Connection lost waiting for results from {0}:{1}"}, new System.Object[]{"CONNECTION_FINALIZED", "Connection closed by the application finalizing the object"}, new System.Object[]{"CONNECTION_CLOSED", "Connection closed by the application disconnecting"}, new System.Object[]{"CONNECTION_READER", "Reader thread terminated"}, new System.Object[]{"DUP_ERROR", "RfcLdapMessage: Cannot duplicate message built from the input stream"}, new System.Object[]{"REFERENCE_ERROR", "Error attempting to follow a search continuation reference"}, new System.Object[]{"REFERRAL_ERROR", "Error attempting to follow a referral"}, new System.Object[]{"REFERRAL_LOCAL", "LdapSearchResults.{0}(): No entry found & request is not complete"}, new System.Object[]{"REFERRAL_SEND", "Error sending request to referred server"}, new System.Object[]{"REFERENCE_NOFOLLOW", "Search result reference received, and referral following is off"}, new System.Object[]{"REFERRAL_BIND", "LdapBind.bind() function returned null"}, new System.Object[]{"REFERRAL_BIND_MATCH", "Could not match LdapBind.bind() connection with Server Referral URL list"}, new System.Object[]{"NO_DUP_REQUEST", "Cannot duplicate message to follow referral for {0} request, not allowed"}, new System.Object[]{"SERVER_CONNECT_ERROR", "Error connecting to server {0} while attempting to follow a referral"}, new System.Object[]{"NO_SUP_PROPERTY", "Requested property is not supported."}, new 
117                         System.Object[]{"ENTRY_PARAM_ERROR", "Invalid Entry parameter"}, new System.Object[]{"DN_PARAM_ERROR", "Invalid DN parameter"}, new System.Object[]{"RDN_PARAM_ERROR", "Invalid DN or RDN parameter"}, new System.Object[]{"OP_PARAM_ERROR", "Invalid extended operation parameter, no OID specified"}, new System.Object[]{"PARAM_ERROR", "Invalid parameter"}, new System.Object[]{"DECODING_ERROR", "Error Decoding responseValue"}, new System.Object[]{"ENCODING_ERROR", "Encoding Error"}, new System.Object[]{"IO_EXCEPTION", "I/O Exception on host {0}, port {1}"}, new System.Object[]{"INVALID_ESCAPE", "Invalid value in escape sequence \"{0}\""}, new System.Object[]{"SHORT_ESCAPE", "Incomplete escape sequence"}, new System.Object[]{"UNEXPECTED_END", "Unexpected end of filter"}, new System.Object[]{"MISSING_LEFT_PAREN", "Unmatched parentheses, left parenthesis missing"}, new System.Object[]{"NO_OPTION", "Semicolon present, but no option specified"}, new System.Object[]{"MISSING_RIGHT_PAREN", "Unmatched parentheses, right parenthesis missing"}, new System.Object[]{"EXPECTING_RIGHT_PAREN", "Expecting right parenthesis, found \"{0}\""}, new System.Object[]{"EXPECTING_LEFT_PAREN", "Expecting left parenthesis, found \"{0}\""}, new System.Object[]{"NO_ATTRIBUTE_NAME", "Missing attribute description"}, new System.Object[]{"NO_DN_NOR_MATCHING_RULE", "DN and matching rule not specified"}, new System.Object[]{"NO_MATCHING_RULE", "Missing matching rule"}, new System.Object[]{"INVALID_FILTER_COMPARISON", "Invalid comparison operator"}, new System.Object[]{"INVALID_CHAR_IN_FILTER", "The invalid character \"{0}\" needs to be escaped as \"{1}\""}, new System.Object[]{"INVALID_ESC_IN_DESCR", "Escape sequence not allowed in attribute description"}, new System.Object[]{"INVALID_CHAR_IN_DESCR", "Invalid character \"{0}\" in attribute description"}, new System.Object[]{"NOT_AN_ATTRIBUTE", "Schema element is not an LdapAttributeSchema object"}, new System.Object[]{"UNEQUAL_LENGTHS", 
118                         "Length of attribute Name array does not equal length of Flags array"}, new System.Object[]{"IMPROPER_REFERRAL", "Referral not supported for command {0}"}, new System.Object[]{"NOT_IMPLEMENTED", "Method LdapConnection.startTLS not implemented"}, new System.Object[]{"NO_MEMORY", "All results could not be stored in memory, sort failed"}, new System.Object[]{"SERVER_SHUTDOWN_REQ", "Received unsolicited notification from server {0}:{1} to shutdown"}, new System.Object[]{"INVALID_ADDRESS", "Invalid syntax for address with port; {0}"}, new System.Object[]{"UNKNOWN_RESULT", "Unknown Ldap result code {0}"}, new System.Object[]{"OUTSTANDING_OPERATIONS", "Cannot start or stop TLS because outstanding Ldap operations exist on this connection"}, new System.Object[]{"WRONG_FACTORY", "StartTLS cannot use the set socket factory because it does not implement LdapTLSSocketFactory"}, new System.Object[]{"NO_TLS_FACTORY", "StartTLS failed because no LdapTLSSocketFactory has been set for this Connection"}, new System.Object[]{"NO_STARTTLS", "An attempt to stopTLS on a connection where startTLS had not been called"}, new System.Object[]{"STOPTLS_ERROR", "Error stopping TLS: Error getting input & output streams from the original socket"}, new System.Object[]{"MULTIPLE_SCHEMA", "Multiple schema found when reading the subschemaSubentry for {0}"}, new System.Object[]{"NO_SCHEMA", "No schema found when reading the subschemaSubentry for {0}"}, new System.Object[]{"READ_MULTIPLE", "Read response is ambiguous, multiple entries returned"}, new System.Object[]{"CANNOT_BIND", "Cannot bind. Use PoolManager.getBoundConnection()"}};
119         } //End ExceptionMessages
120 }