Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

er.extensions: Javadoc index of package er.extensions.


Package Samples:

er.extensions

Classes:

ERXBrowserFactory: All WebObjects applications have exactly one ERXBrowserFactory instance. Its primary role is to manage ERXBrowser objects. It provides facility to parse "user-agent" HTTP header and to create an appropriate browser object. It also maintains the browser pool to store shared ERXBrowser objects. Since ERXBrowser object is immutable, it can be safely shared between sessions and ERXBrowserFactory tries to have only one instance of ERXBrowser for each kind of web browsers. The primary method called by ERXSession and ERXDirectAction is browserMatchingRequest 55 which takes a WORequest as the parameter ...
ERXConfigurationManager: Configuration Manager handles rapid turnaround for system configuration as well as swizzling of the EOModel connection dictionaries. Placing configuration parameters You can provide the system configuration by the following ways: Note: This is the standard way for WebObjects 5.x applications. Properties file under the Resources group of the application and framework project. It's a java.util.Properties file and Project Wonder's standard project templates include it. (The templates won't be available on some platforms at this moment.) WebObjects.properties under the user home directory; same format ...
ERXBasicBrowser: ERXBasicBrowser is a concrete subclass of ERXBrowser that defines browser object. A browser object represents the web browser that the current request-response cycle is dealing with. It holds the information retrieved from HTTP request's "user-agent" header, and such information includes web browser's name, version, Mozilla compatible version and platform (OS). Also, a browser object can answer boolean questions such as isIE() 55 , isOmniWeb() 55 , isVersion5() 55 and isMozilla40Compatible() 55 , and even more specific questions like isIFrameSupported() 55 and willRenderNestedTablesFast() 55 . ...
ERXBrowser: ERXBrowser is an abstract class that defines browser object. A browser object represents the web browser that the current request-response loop is dealing with. It holds the information retrieved from HTTP request's "user-agent" header, and such information includes web browser's name, version, Mozilla compatible version and platform (OS). Also, a browser object can answer boolean questions such as isIE , isOmniWeb , isVersion5 and isMozilla40Compatible . ERXBrowser is immutable and shared by different sessions and direct actions. The shared instances are managed by ERXBrowserFactory which is also ...
ERXLocalizer: KVC access to localization. Monitors a set of files in all frameworks and returns a string given a key for a language. In the current state, it's more a stub for things to come. These types of keys are acceptable in the monitored files: "this is a test" = "some test"; "unittest.key.path.as.string" = "some test"; "unittest" = {"key" = { "path" = { "as" = {"dict"="some test";};};};}; Note that if you only call for "unittest", you'll get a dictionary. So you can localize more complex objects than strings. If you set the base class of your session to ERXSession, you can then use this code in your components: ...
ERXTable: Enhanced table component that adds the ability to have the table layed out in a vertical orientation and adds the ability to specify an array of header images that appear in the header cells of the table. Corrects a bug intorduced in WO 5.1 where OutOfBounds exceptions are thrown. Note that this component subclasses WOTable from this framework, not the WOTable in com.webobjects.woextensions. The reason for this is that all of the instance variables are private in JavaWOExtensions WOTable. Synopsis: list= anArray ;item= aSettableObject ;[col= aSettableNumber ;][index= aSettableNumber ;][row= aSettableNumber ...
ERXPatternLayout: The ERXPatternLayout adds some additional (and needed) layout options. The first is by specifing an '@' character a full backtrace will be logged as part of the log event. The second is by specifing an '$' char the current application name of the WOApplication will be logged as part of the log event. Finally by specifing an '#' char the current port number on which the primary adaptor listens to will be logged as part of the log event. WebObjects Applicaion Info Patterns Example: %W{n[i:p s]} -- MyApp[9300:2001 28] n: application name i: pid (process ID, provided through Java system property "com.webobjects.pid") ...
ERXEntityClassDescription: The main purpose of the ERXClassDescription class is to throw ERXValidationException s instead of the usual NSValidation.ValidationException objects. See the ERXValidationException and ERXValidationFactory class for more information about localized and templatized validation exceptions. This class is configured to register itself as the class description by calling the method registerDescription . This method is called when the principal class of this framework is loaded. This happens really early so you shouldn't have to worry about this at all. If you wish to provide your own class description ...
EOGenericRecordClazz: WARNING: this is alpha and untested! Use subclasses of EOGenericRecordClazz as inner classes in your EO subclasses to work around the missing class object inheritance of java. They must be named XXX.XXXClazz to work! Every subclass of this class will get their own "ClazzObject" instance, so it's OK to store things which might be different in superclasses. That is, the "User"'s implementation can override the "Person"'s and because Person.clazz() will get it's own instance, it will do only "Person" things. The methods from EOUtilities are mirrored here so you don't have to import EOAccess in your ...
ERXNSPrintWriterLogger: ERXNSPrintWriterLogger is an alternative of NSLog.PrintStreamLogger but accepts character oriented java.io.PrintWriter instead of byte oriented java.io.PrintStream so that the character encoding for logging can be explicitly set. Usage: // Create a PrintWriter with Japanese "SJIS" encoding. OutputStreamWriter sjisOutWriter = new OutputStreamWriter(new FileOutputStream("app.log"), "SJIS"); PrintWriter sjisPrintWriter = new PrintWriter(sjisOutWriter, true); // Create a logger then set it to NSLog. NSLog.Logger logger = new ERXNSPrintWriterLogger(sjisPrintWriter); NSLog.setDebug(logger); NSLog.setOut(logger); ...
ERXFixedLengthString: This stateless component is useful for displaying a string of a fixed length. For example imagine you have the string: 'The brown dog jumped' and for a given table cell you only want to display at most 10 characters of the string, then using this component you could bind the given string to the 'value' binding, 10 to the 'length' binding and the string '...' to the 'suffixWhenTrimmed' binding. When rendering this would display: The brown ... This component can also be used to pad whitespace onto the end of strings that are shorter than the given length. Synopsis: value= aString ;length= aNumber ...
ERXGenericRecord: This class contains a bunch of extensions to the regular com.webobjects.eocontrol.EOGenericRecord class. Of notable interest it contains built in support for generating primary keys via the ERXGeneratesPrimaryKeyInterface , support for an augmented transaction methods like willUpdate and didDelete and a bunch of handy utility methods like committedSnapshotValueForKey . At the moment it is required that those wishing to take advantage of templatized and localized validation exceptions need to subclass this class. Hopefully in the future we can get rid of this requirement.
ERXUnitAwareDecimalFormat: ERXUnitAwareDecimalFormat extends java.text.DecimalFormat to add an automatic unit conversion feature for the given unit. Convenient to display friendly values for file size, elaps time, etc. Examples: import java.text.NumberFormat; import er.extensions.ERXUnitAwareDecimalFormat double smallValue = 123.0d; double largeValue = 1234567890.0d; NumberFormat formatter = new ERXUnitAwareDecimalFormat(ERXUnitAwareDecimalFormat.BYTE); formatter.setMaximumFractionDigits(2); // Will display "123 bytes" System.out.println(formatter.format(smallValue)); // Will display "1.15 GB" System.out.println(formatter ...
ERXDirectActionHyperlink: This component can be used for two things: 1) Generating direct action urls for use in components that are being e-mailed to people. 2) Support for encoding enterprise objects in the form values of generated urls. At the moment this component still contains some custy code that needs to be cleaned up before it can really be used, like adding the .wo and .api files ;0. Synopsis: [actionClass= anActionClass ];directActionName= aDirectActionName ;[entityNameSeparator= aSeparator ;] [relative= aBoolean ;][shouldEncryptObjectFormValues= aBoolean ;][objectsForFormValues= anArray ;] [bindingDictionary= ...
ERXDefaultEditingContextDelegate: Default editing context delegate. This delegate augments the regular transaction process by adding the calling of willInsert, willUpdate or willDelete on enterprise objects that are of type ERXGenericRecord after saveChanges is called on the editing context, but before validateForSave is called on the object. These methods can give the object a last chance to modify itself before validation occurs. The second enhancement is a built in flushing of caches on subclasses of ERXGenericRecords when objects have changes merged in or are invalidated. Being able to maintain caches on enterprise objects ...
ERXFetchSpecificationBatchIterator: The goal of the fetch specification batch iterator is to have the ability to iterate through a fetch specification that might fetch one million enterprise objects. Fetching all of the objects into a singel editing context is prohibitive in the amount of memory needed and in the time taken to process all of the rows. The iterator allows one to iterate through the fetched objects only hydrating those objects need in small bite size pieces. The iterator also allows you to swap out editing contexts between calls to nextBatch , which will allow the garbage collector to collect the old editing context ...
ERXFileNotificationCenter: The file notification center is only used in developement systems. It provides a nice repository about files and their last modified dates. So instead of every dynamic spot having to keep track of the files' dates, register and check at the end of every request-response loop, instead you can just add an observer to this center and be notified when the file changes. Files' last modification dates are checked at the end of every request-response loop. It should be noted that the current version of the file notification center will retain a reference to each registered observer. This is not ideal ...
ERXExtensions: Principal class of the ERExtensions framework. This class will be loaded at runtime when the ERExtensions bundle is loaded (even before the Application construcor is called) This class has a boat-load of stuff in it that will hopefully be finding better homes in the future. This class serves as the initilization point of this framework, look in the static initializer to see all the stuff that is initially setup when this class is loaded. This class also has a boat load of string, array and eof utilities as well as the factory methods for creating editing contexts with the default delegates set ...
ERXCrypto: Provides a nice wrapper around the blowfish cipher and the sha digest algorithms. The blowfish cipher is a two-way cipher meaning the original string that was encrypted can be retrieved. The blowfish cipher uses a secret key that should be set in the System properties using the key: ERBlowfishCipherKey . The way that this version of the blowfish cipher is enrcypted it is safe to use as a form value. The sha digest uses one-way encryption to form a hash of a given string. The digest formed is safe for use in form values and cookies.
ERXTolerantSaver: This class is pulled directly out of David Neumann's ChangeNotification framework. The only changes made are to use log4j instead of System.out.println. The tolerant saver provides a way to save an editing context in a tolerant fashion. By tolerant we mean that you can have the option to save an editing context and have the exception ignored, hvae the changes merged from the database or stomp all the changes the database regardless of locking. The entry point for using this class is the save method.
ERXWOForm: Transparent replacement for WOForm. It adds the Forms name to the ERXContext's mutableUserInfo as as "formName" key, which makes writing JavaScript elements a bit easier. Also, it warns you when you have one Form embedded inside another. Additionally, it pushes the enctype into the userInfo, so that ERXWOFileUpload can check if it is set correctly. This subclass is installed when the frameworks loads.
ERXLocalizedString: Examples: 1) value = "Localize me" -> the localized value of "Localize me" 2) keyPath = "componentName" (note that the path must be a String) -> localized name of the parent component 3) object = bug, an EO -> localized version of bug.userPresentableDescription (may or may not be useful) 4) object = bug, keyPath = "state" -> localized version of the bugs state 5) templateString = "You have @assignedBugs.count@ Bug(s) assigned to you", object = session.user -> localized template is evaluated Bindings:
ERXSession: The ERXSession aguments the regular WOSession object by adding a few nice additions. Of interest, notifications are now posted when a session when a session goes to sleep, David Neumann's browser backtracking detection has been added from his security framework, a somewhat comprehensive user-agent parsing is provided to know what type of browser is being used, flags have also been added to tell if javascript has been enabled, and enhanced localization support has been added.
ERXEOFAppender: Basic log4j EOF Appender Very basic appender, useful for logging events to a database using EOF. Manditory Fields: LoggingEntity - Entity for creating logging events. The class mapped to this entity must implement the interface: ERXEOFLogEntryInterface Optional Fields: BufferSize - Number of Events to catch before calling ec.saveChanges()
ERXGeneratesPrimaryKeyInterface: Enterprise objects that need to generate their own primary keys should implement this interface. This interface works in conjunction with the ERXDatabaseContextDelegate . Note that ERXGenericRecord implements a default implementation of this interface.

Home | Contact Us | Privacy Policy | Terms of Service