Page: http://wiki.cocoondev.org/Wiki.jsp?page=FOM_log , version: 1 on Mon Jun 16 14:38:22 2003 by ReinhardPoetz
New page created: + !!!FOM: The Log Object + + Access the Cocoon logger. + + ------- methods -------- + + *__debug(message)__ + *__boolean isDebugEnabled()__ + *__info(message)__ + *__boolean isInfoEnabled()__ + *__warn(message)__ + *__boolean isWarnEnabled()__ + *__error(message)__ + *__boolean isErrorEnabled() + + -------- properties --------- + + NONE + Page: http://wiki.cocoondev.org/Wiki.jsp?page=FOM_request , version: 1 on Mon Jun 16 14:37:22 2003 by ReinhardPoetz New page created: + !!!The Request Object + The Request object is the one who has been pruned the most from the Cocoon Environment. The sections that were pruned were: + + * URI handling + * Session handling + + NOTE(SM/RR): ''Session handling has been removed in favor of the cocoon object and URI handling has been removed because unnecessary. I'm aware this is a big statement, please see below of why this is so.'' + + ----- methods ------ + + attributes + + *__get(name)__ + *__getAttribute(name)__ + *__getAttributeNames()__ + *__setAttribute(name,value)__ + *__removeAttribute(name)__ + + encoding + + *__getCharacterEncoding()__ + *__setCharacterEncoding(encoding)__ + + + payload + *__getContentLength()__ + *__getContentType()__ + + parameters + + *__getParameter(name)__ + *__getParameterValues(name)__ + *__getParameterNames()__ + + transport + + *__getAuthType()__ + *__getProtocol()__ + *__getScheme()__ + *__getMethod()__ + *__getServerName()__ + *__getServerPort()__ + *__getRemoteAddr()__ + *__getRemoteHost()__ + *__isSecure()__ + + locale + *__getLocale()__ + *__getLocales()__ + + cookies + *__getCookies()__ + + + headers + *__getHeader()__ + *__getHeaders()__ + *__getHeadersNames()__ + + + authentication + *__getRemoteUser()__ + *__getUserPrincipal()__ + *__isUserInRole(role)__ + + + -------- properties --------- + + [[name] -> maps to the parameter indicates with the name + + For example __request.blah__ is equivalent to __request.getParameter("blah")__ + Page: http://wiki.cocoondev.org/Wiki.jsp?page=CocoonAndApache , version: 12 on Mon Jun 16 14:08:37 2003 by 198.26.74.99 - If you want to connect Cocoon with Apache httpd in order to serve static/legacy content directly from Apache you have three possibilities ATM (apart from the obsolete Jserv): ? ^^ -- + If you want to connect Cocoon with Apache httpd in order to serve static/legacy content directly from Apache you have four possibilities ATM (apart from the obsolete Jserv): ? ^^^ Page: http://wiki.cocoondev.org/Wiki.jsp?page=FOM_context , version: 1 on Mon Jun 16 14:39:26 2003 by ReinhardPoetz New page created: + !!!FOM: The Context Object + + ----methods---- + + + ----properties---- + + NONE + Page: http://wiki.cocoondev.org/Wiki.jsp?page=FOM_Cocoon , version: 1 on Mon Jun 16 14:24:28 2003 by ReinhardPoetz New page created: + !!!FOM: The Cocoon Object + The Cocoon object is the only possible way the flow can communicate with Cocoon. In a sense, it's a gateway between the two realms. This protects the flow from abusing the Cocoon internals (for example, there is no way the flow can compose a sitemap pipeline since the cocoon object doesn't give it that power) + + ----methods---- + + __void sendPage(uri,map)__\\ + returns control to the sitemap, invoking the pipeline that will match the given URI and passing the given map as model. + + __void sendPageAndWait(uri,map)__\\ + same as above, but creates one (or more) continuation objects and makes their IDs available as part of the model passed. + + __void processPipelineTo(uri,map,outputStream)__\\ + invoques the pipeline that will match the given URI, passing the map as the model but connecting the output of the pipeline to the given output stream. + + __void redirectTo(uri)__\\ + triggers a client-side redirect to the given URI + + __void addEventListener(eventName,eventHandler))__\\ + adds an event listener to the given event name (for example, session expiration) + + __void removeEventListener(eventName,eventHandler))__\\ + removes the given handler from listening the tiven event name. + + __Object getComponent(id))__\\ + obtains the component indicated by the given ID + + __void callAction(name,map)__\\ + invoques the action indicated by the given name and pass the given map as model\\ + NOTE (SM): ''I personally believe that the getComponent() method removes all needs for the callAction() method. I foresee a future where the callAction() method will be deprecated. I would personally go the extra mile and avoid having it there altogether, but since there is no easy way to plugin new avalon components at runtime (at least, not as easier as plugging in different actions into the sitemap), I'm in favor of leaving it for now, until 'real blocks' will make it unnecessary.'' + + __Session getSession()__\\ + NOTE(SM/RR): ''both Ricardo and I believe that the flow should always be associated with a Session. Thus the use of the semantics "getSession" instead of "createSession". We are, in fact, against the concept of having the flow behave differently we the session has been created or it's has not been. This implicit behavior is potentially very dangerous from a user perspective and should be avoided. + Moreover, it has been pointed out how continuations can be see as a way to "extend" sessions rather than replacing them. This would allow us to reuse the session-handling machinery already in place for things like load-balancing and fault-tollerance.'' + + ---- + Methods that were left out: + ---- + + __input/output module support__\\ + the reason for the first goes together with callAction(). Input/output modules were designed to overcome limitations in the scriptability of the sitemap. + + __script load support__\\ + NOTE(SM/RR): ''The reason for removing load() is because we want to avoid people from loading scripting dynamically. This goes in parallel with the anti-pattern of dynamic pipeline construction.'' + + WARNING: ''removing load() does *NOT* imply that you have to force all your flow in one big file. The way to fragment your flow into different files is to use several <map:script> elements in the <map:flow> section of the sitemap.'' + + -------- properties --------- + + __cocoon.request__ -> the request object\\ + + __cocoon.response__ -> the response object\\ + + __cocoon.log__ -> the log object\\ + + __cocoon.context__ -> the context object\\ + + + NOTE(SM/RR): ''the absence of the context object is intentional! we couldn't come up with a reasonable need for such an object at the flow level. So, for the principle of 'less is more', we don't consider it. Be aware that if you want to propose its addition, you have to come up with a reason for it.'' + Page: http://wiki.cocoondev.org/Wiki.jsp?page=SandBox , version: 122 on Mon Jun 16 14:40:45 2003 by 217.209.69.10 - [Web link test|http://www.css-stuff.com/] + [Web link test|http://www.popkalaset.nu] Page: http://wiki.cocoondev.org/Wiki.jsp?page=FOM_cookie , version: 1 on Mon Jun 16 14:35:37 2003 by ReinhardPoetz New page created: + !!!The Cookie Object + This object is a wrapper around the Cookie object provided by the Environment. + + --------- methods ------ + + *__getName()__ + *__getVersion()__ + *__setVersion(version)__ + + + values + + *__setValue(value)__ + *__getValue()__ + + comment + + *__setComment(purpose)__ + *__getComment__ + + domain + + *__setDomain(domain)__ + *__getDomain()__ + + age + + + *__setMaxAge(age)__ + *__getMaxAge()__ + + path + + *__setPath(path)__ + *__getPath()__ + + secure + + *__setSecure(secure)__ + *__getSecure()__ + + -------- properties ------ + + NONE + Page: http://wiki.cocoondev.org/Wiki.jsp?page=FOM_session , version: 1 on Mon Jun 16 14:32:24 2003 by ReinhardPoetz New page created: + !!!FOM: The Session Object + The session object is simply a wrapper around the Session object provided by the Cocoon environment. No methods were left out since they don't provide problems to the flow environment or suggest abuse. + + ---- methods ----- + + attributes + + *__getAttribute(name)__ + *__setAttribute(name,value)__ + *__removeAttribute(name)__ + *__getAttributeNames()__ + + control + + *__invalidate()__ + *__isNew()__ + *__getId()__ + + time + + *__getCreationTime()__ + *__ getLastAccessedTime()__ + *__setMaxInactiveInterval(interval)__ + *__getMaxInactiveInterval()__ + + + ---- properties ----- + + [[name] -> maps to the attribute indicates with the name + + For example __session.blah__ is equivalent to __session.getAttribute("blah")__ + Page: http://wiki.cocoondev.org/Wiki.jsp?page=FOM , version: 2 on Mon Jun 16 14:28:05 2003 by ReinhardPoetz - The Flow Object Model consists of following objects: ? ------- + The Flow Object Model contains following objects: ? ++++ + * [cocoon|FOM_Cocoon] + * [request|FOM_request] + * [response|FOM_response] + * [session|FOM_session] + * [cookie|FOM_cookie] + * [log|FOM_log] + * [context|FOM_context] - * cocoon - * request - * response - * session - * cookie - * log - * context - Page: http://wiki.cocoondev.org/Wiki.jsp?page=FOM_response , version: 1 on Mon Jun 16 14:34:08 2003 by ReinhardPoetz New page created: + !!!The Response Object + + The response object contains hooks only to the cookies and to the response headers. Everything else will be controlled by the rest of the cocoon pipeline machinery (like output encoding, for example, which should *NOT* be determined by the flow) + + ------- methods ------- + + cookies + + *__Cookie createCookie(name,value)__ + *__void addCookie(Cookie cookie);__ + + headers + + *__containsHeader(name)__ + *__setHeader(name,value)__ + *__addHeader(name,value)__ + + ------- properties ----- + + NONE +
