public class UserSignupGenerator extends ServiceableGenerator
Modifier and Type | Field and Description |
---|---|
protected CurrentUserProvider |
_currentUserProvider
The current user provider
|
protected PageHelper |
_pageHelper
Page helper
|
protected Repository |
_repository
The repository
|
protected AmetysObjectResolver |
_resolver
The ametys object resolver.
|
protected SiteManager |
_siteManager
The site Manager.
|
protected SkinsManager |
_skinManager
The
SkinsManager |
protected SourceResolver |
_srcResolver
The source resolver
|
protected SynchronizeComponent |
_synchronizeComponent
The component for live synchronization
|
protected UserSignupManager |
_userSignupManager
The user signup manager.
|
manager
objectModel, parameters, resolver, source
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
Constructor and Description |
---|
UserSignupGenerator() |
Modifier and Type | Method and Description |
---|---|
private void |
_addNotEmptyAttribute(AttributesImpl attrs,
String name,
String value) |
private boolean |
_isValid(Content content) |
private boolean |
_isValid(Page page) |
protected void |
_saxNotEmptyParameter(Request request,
String paramName)
Sax a non-empty request parameter
|
protected void |
_saxNotEmptyValue(String tagName,
String value)
Sax a non-empty value
|
void |
generate() |
protected void |
saxAdditionalInformation(String siteName,
String lang,
ZoneItem zoneItem)
SAX additional information
|
protected void |
saxContent(String contentId,
String rootTag)
SAX the content of GTU
|
protected void |
saxErrors(Multimap<String,I18nizableText> errors)
Generate errors.
|
protected void |
saxSuccessContentIfNeeded(ZoneItem zoneItem)
SAX the success content if needed
|
protected void |
saxTOSIfNeeded(ZoneItem zoneItem)
SAX the general term of use content if needed
|
protected void |
saxUserInputs(Request request,
ZoneItem zoneItem)
SAX the user inputs
|
protected void |
saxWarnings(Boolean publicSignup,
Page signupPage,
Page pwdChangePage,
Page tosPage,
Page successPage,
Content tosContent,
Content successContent)
Generate errors which could prevent the service from working.
|
void |
service(ServiceManager serviceManager) |
dispose
recycle, setup
setConsumer, setContentHandler, setLexicalHandler
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setConsumer
protected UserSignupManager _userSignupManager
protected SiteManager _siteManager
protected AmetysObjectResolver _resolver
protected SynchronizeComponent _synchronizeComponent
protected SkinsManager _skinManager
SkinsManager
protected Repository _repository
protected PageHelper _pageHelper
protected CurrentUserProvider _currentUserProvider
protected SourceResolver _srcResolver
public UserSignupGenerator()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
service
in class ServiceableGenerator
ServiceException
public void generate() throws IOException, SAXException, ProcessingException
protected void saxUserInputs(Request request, ZoneItem zoneItem) throws SAXException
request
- the requestzoneItem
- the zone item holding the serviceSAXException
- if an error occursprotected void _saxNotEmptyParameter(Request request, String paramName) throws SAXException
request
- the requestparamName
- the parameter nameSAXException
- if an error occursprotected void _saxNotEmptyValue(String tagName, String value) throws SAXException
tagName
- the tag namevalue
- the valueSAXException
- if an error occursprotected void saxAdditionalInformation(String siteName, String lang, ZoneItem zoneItem) throws SAXException
siteName
- The site namelang
- The content languagezoneItem
- The zone item holding the serviceSAXException
- if an error occursprotected void saxTOSIfNeeded(ZoneItem zoneItem) throws MalformedURLException, SAXException, IOException
zoneItem
- The current zone itemMalformedURLException
- if an error occursSAXException
- if an error occursIOException
- if an error occursprotected void saxSuccessContentIfNeeded(ZoneItem zoneItem) throws MalformedURLException, SAXException, IOException
zoneItem
- The current zone itemMalformedURLException
- if an error occursSAXException
- if an error occursIOException
- if an error occursprivate void _addNotEmptyAttribute(AttributesImpl attrs, String name, String value)
protected void saxContent(String contentId, String rootTag) throws SAXException, MalformedURLException, IOException
contentId
- the id of GTU contentrootTag
- The root XML tagSAXException
- if an error occursIOException
- if failed to sax TGU contentMalformedURLException
- if failed to sax TGU contentprotected void saxErrors(Multimap<String,I18nizableText> errors) throws SAXException
errors
- the error list.SAXException
- if an error occurs.protected void saxWarnings(Boolean publicSignup, Page signupPage, Page pwdChangePage, Page tosPage, Page successPage, Content tosContent, Content successContent) throws SAXException
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.SAXException
- if an error occurs.