Package org.ametys.web.usermanagement
Class UserSignupGenerator
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.cocoon.xml.AbstractXMLProducer
-
- org.apache.cocoon.generation.AbstractGenerator
-
- org.apache.cocoon.generation.ServiceableGenerator
-
- org.ametys.web.usermanagement.UserSignupGenerator
-
- All Implemented Interfaces:
Poolable,Recyclable,Disposable,Component,LogEnabled,Serviceable,Generator,SitemapModelComponent,XMLProducer
- Direct Known Subclasses:
UserPasswordGenerator,UserPasswordValidateGenerator,UserSignupGenerator,UserSignupValidateGenerator
public class UserSignupGenerator extends ServiceableGenerator
Generate information to render the user signup service.
-
-
Field Summary
Fields Modifier and Type Field Description protected CurrentUserProvider_currentUserProviderThe current user providerprotected PageHelper_pageHelperPage helperprotected Repository_repositoryThe repositoryprotected AmetysObjectResolver_resolverThe ametys object resolver.protected SiteManager_siteManagerThe site Manager.protected SkinsManager_skinManagerTheSkinsManagerprotected SourceResolver_srcResolverThe source resolverprotected SynchronizeComponent_synchronizeComponentThe component for live synchronizationprotected UserSignupManager_userSignupManagerThe user signup manager.-
Fields inherited from class org.apache.cocoon.generation.ServiceableGenerator
manager
-
Fields inherited from class org.apache.cocoon.generation.AbstractGenerator
objectModel, parameters, resolver, source
-
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
-
-
Constructor Summary
Constructors Constructor Description UserSignupGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void_saxNotEmptyParameter(Request request, String paramName)Sax a non-empty request parameterprotected void_saxNotEmptyValue(String tagName, String value)Sax a non-empty valuevoidgenerate()protected voidsaxAdditionalInformation(String siteName, String lang, ZoneItem zoneItem)SAX additional informationprotected voidsaxContent(String contentId, String rootTag)SAX the content of GTUprotected voidsaxErrors(Multimap<String,I18nizableText> errors)Generate errors.protected voidsaxSuccessContentIfNeeded(ZoneItem zoneItem)SAX the success content if neededprotected voidsaxTOSIfNeeded(ZoneItem zoneItem)SAX the general term of use content if neededprotected voidsaxUserInputs(Request request, ZoneItem zoneItem)SAX the user inputsprotected voidsaxWarnings(Boolean publicSignup, Page signupPage, Page pwdChangePage, Page tosPage, Page successPage, Content tosContent, Content successContent)Generate errors which could prevent the service from working.voidservice(ServiceManager serviceManager)-
Methods inherited from class org.apache.cocoon.generation.ServiceableGenerator
dispose
-
Methods inherited from class org.apache.cocoon.generation.AbstractGenerator
recycle, setup
-
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
setConsumer, setContentHandler, setLexicalHandler
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
-
-
-
-
Field Detail
-
_userSignupManager
protected UserSignupManager _userSignupManager
The user signup manager.
-
_siteManager
protected SiteManager _siteManager
The site Manager.
-
_resolver
protected AmetysObjectResolver _resolver
The ametys object resolver.
-
_synchronizeComponent
protected SynchronizeComponent _synchronizeComponent
The component for live synchronization
-
_skinManager
protected SkinsManager _skinManager
TheSkinsManager
-
_repository
protected Repository _repository
The repository
-
_pageHelper
protected PageHelper _pageHelper
Page helper
-
_currentUserProvider
protected CurrentUserProvider _currentUserProvider
The current user provider
-
_srcResolver
protected SourceResolver _srcResolver
The source resolver
-
-
Constructor Detail
-
UserSignupGenerator
public UserSignupGenerator()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classServiceableGenerator- Throws:
ServiceException
-
generate
public void generate() throws IOException, SAXException, ProcessingException
-
saxUserInputs
protected void saxUserInputs(Request request, ZoneItem zoneItem) throws SAXException
SAX the user inputs- Parameters:
request- the requestzoneItem- the zone item holding the service- Throws:
SAXException- if an error occurs
-
_saxNotEmptyParameter
protected void _saxNotEmptyParameter(Request request, String paramName) throws SAXException
Sax a non-empty request parameter- Parameters:
request- the requestparamName- the parameter name- Throws:
SAXException- if an error occurs
-
_saxNotEmptyValue
protected void _saxNotEmptyValue(String tagName, String value) throws SAXException
Sax a non-empty value- Parameters:
tagName- the tag namevalue- the value- Throws:
SAXException- if an error occurs
-
saxAdditionalInformation
protected void saxAdditionalInformation(String siteName, String lang, ZoneItem zoneItem) throws SAXException
SAX additional information- Parameters:
siteName- The site namelang- The content languagezoneItem- The zone item holding the service- Throws:
SAXException- if an error occurs
-
saxTOSIfNeeded
protected void saxTOSIfNeeded(ZoneItem zoneItem) throws MalformedURLException, SAXException, IOException
SAX the general term of use content if needed- Parameters:
zoneItem- The current zone item- Throws:
MalformedURLException- if an error occursSAXException- if an error occursIOException- if an error occurs
-
saxSuccessContentIfNeeded
protected void saxSuccessContentIfNeeded(ZoneItem zoneItem) throws MalformedURLException, SAXException, IOException
SAX the success content if needed- Parameters:
zoneItem- The current zone item- Throws:
MalformedURLException- if an error occursSAXException- if an error occursIOException- if an error occurs
-
saxContent
protected void saxContent(String contentId, String rootTag) throws SAXException, MalformedURLException, IOException
SAX the content of GTU- Parameters:
contentId- the id of GTU contentrootTag- The root XML tag- Throws:
SAXException- if an error occursIOException- if failed to sax TGU contentMalformedURLException- if failed to sax TGU content
-
saxErrors
protected void saxErrors(Multimap<String,I18nizableText> errors) throws SAXException
Generate errors.- Parameters:
errors- the error list.- Throws:
SAXException- if an error occurs.
-
saxWarnings
protected void saxWarnings(Boolean publicSignup, Page signupPage, Page pwdChangePage, Page tosPage, Page successPage, Content tosContent, Content successContent) throws SAXException
Generate errors which could prevent the service from working.- Parameters:
publicSignup- indicate if public signup is enabled for the site.signupPage- the signup page.pwdChangePage- the lost password page. Can be null.tosPage- the page of terms of use. Can be null.successPage- the page of success. Can be null.tosContent- the content for terms of use. Can be null.successContent- the content for success. Can be null.- Throws:
SAXException- if an error occurs.
-
-