|
Project Wonder 2.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object er.extensions.ERXEOEncodingUtilities
Field Summary | |
protected static NSMutableDictionary |
_encodedEntityNames
This dictionary contains the encoded entity names used in the defaultGroup |
static String |
EncodedEntityNameKey
Key used in EOModeler to specify the encoded (or abbreviated) entity named used when encoding an enterprise-object is an url. |
static ERXLogger |
log
logging support |
Constructor Summary | |
ERXEOEncodingUtilities()
|
Method Summary | |
static NSArray |
decodeEnterpriseObjectsFromFormValues(EOEditingContext ec,
NSDictionary values)
Decodes all of the objects for a given set of form values in the given editing context. |
static NSDictionary |
dictionaryOfFormValuesForEnterpriseObjects(NSArray eos,
String separator,
boolean encrypt)
Constructs the form values dictionary by first calling the method encodeEnterpriseObjectsPrimaryKeyForUrl
and then using the results of that to construct the dictionary. |
protected static NSDictionary |
encodedEntityNames()
This method constructs a dictionary with encoded entity names as keys and entity names as values. |
static String |
encodeEnterpriseObjectPrimaryKeyForUrl(EOEnterpriseObject eo,
String seperator,
boolean encrypt)
Simple cover method that calls the method:
encodeEnterpriseObjectsPrimaryKeyForUrl with
an array containing the single object passed in. |
static String |
encodeEnterpriseObjectsPrimaryKeyForUrl(NSArray eos,
String separator,
boolean encrypt)
Encodes an array of enterprise objects for use in a url. |
static EOEnterpriseObject |
enterpriseObjectForEntityNamedFromFormValues(EOEditingContext ec,
String entityName,
NSDictionary formValues)
Returns the enterprise object fetched with decoded formValues from
entityName . |
static NSArray |
enterpriseObjectsForEntityNamedFromFormValues(EOEditingContext ec,
String entityName,
NSDictionary formValues)
Returns the enterprise objects fetched with decoded formValues from
entityName . |
static NSArray |
enterpriseObjectsFromFormValues(EOEditingContext ec,
NSDictionary formValues)
Deprecated. use decodeEnterpriseObjectsFromFormValues instead |
static String |
entityNameDecode(String encodedName)
Decodes the encoded entity name. |
static String |
entityNameEncode(EOEnterpriseObject eo)
This method encodes the entity name of the enterprise object by searching in the default model group wether it can find the key EncodedEntityNameKey in the user info dictionary. |
static String |
entityNameSeparator()
|
static NSDictionary |
groupedEnterpriseObjectsFromFormValues(EOEditingContext ec,
NSDictionary formValues)
Returns enterprise objects grouped by entity name. |
static void |
init()
Class initialization |
static boolean |
isSpecifySeparatorInURL()
|
static void |
setEntityNameSeparator(String entityNameSeparator)
|
static void |
setSpecifySeparatorInURL(boolean specifySeparatorInURL)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final ERXLogger log
public static final String EncodedEntityNameKey
protected static NSMutableDictionary _encodedEntityNames
Constructor Detail |
public ERXEOEncodingUtilities()
Method Detail |
public static void init()
public static void setSpecifySeparatorInURL(boolean specifySeparatorInURL)
public static boolean isSpecifySeparatorInURL()
public static void setEntityNameSeparator(String entityNameSeparator)
public static String entityNameSeparator()
public static NSArray enterpriseObjectsFromFormValues(EOEditingContext ec, NSDictionary formValues)
decodeEnterpriseObjectsFromFormValues
instead
public static NSDictionary groupedEnterpriseObjectsFromFormValues(EOEditingContext ec, NSDictionary formValues)
encodeEnterpriseObjectsPrimaryKeyForUrl
- Parameters:
ec
- the editing context to fetch the objects fromformValues
- dictionary where the values are an
encoded representation of the primary key values in either
cleartext or encrypted format.
- Returns:
- enterprise objects grouped by entity name
public static EOEnterpriseObject enterpriseObjectForEntityNamedFromFormValues(EOEditingContext ec, String entityName, NSDictionary formValues)
formValues
from
entityName
.
ec
- the editing context to fetch the object fromentityName
- the entity to fetch the object fromformValues
- dictionary where the values are an
encoded representation of the primary key values in either
cleartext or encrypted format.
public static NSArray enterpriseObjectsForEntityNamedFromFormValues(EOEditingContext ec, String entityName, NSDictionary formValues)
formValues
from
entityName
.
ec
- the editing context to fetch the objects fromentityName
- the entity to fetch the objects fromformValues
- dictionary where the values are an
encoded representation of the primary key values in either
cleartext or encrypted format.
public static String entityNameEncode(EOEnterpriseObject eo)
eo
- the enterprise object
protected static final NSDictionary encodedEntityNames()
public static String entityNameDecode(String encodedName)
public static NSDictionary dictionaryOfFormValuesForEnterpriseObjects(NSArray eos, String separator, boolean encrypt)
encodeEnterpriseObjectsPrimaryKeyForUrl
and then using the results of that to construct the dictionary.
eos
- array of enterprise objects to be encoded in the urlseparator
- to be used to separate entity namesencrypt
- flag to determine if the primary key
of the objects should be encrypted.
public static String encodeEnterpriseObjectPrimaryKeyForUrl(EOEnterpriseObject eo, String seperator, boolean encrypt)
encodeEnterpriseObjectsPrimaryKeyForUrl
with
an array containing the single object passed in.
eo
- enterprise object to encode in a url.seperator
- to be used for the entity name.encrypt
- flag to determine if the primary key
of the object should be encrypted.
public static String encodeEnterpriseObjectsPrimaryKeyForUrl(NSArray eos, String separator, boolean encrypt)
1.1
and 1.2
are the primary key values. Key values
follow alphabetical order for their attribute names, just like
ERXEOControlUtilities.primaryKeyArrayForObject
.
Note: At the moment the attribute value separator cannot be changed.
eos
- array of enterprise objects to be encoded in the urlseparator
- to be used between the entity name and a sequence numberencrypt
- indicates if the primary keys of the objects should be encrypted
public static NSArray decodeEnterpriseObjectsFromFormValues(EOEditingContext ec, NSDictionary values)
encodeEnterpriseObjectsPrimaryKeyForUrl
.
ec
- editingcontext to fetch the objects fromvalues
- form value dictionary where the values are an
encoded representation of the primary key values in either
cleartext or encrypted format.
|
Last updated: Do, Dez 9, 2004 12:46 PM CET | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |