Class TemplateDesignerSessionController
- java.lang.Object
-
- org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
-
- org.silverpeas.core.web.mvc.controller.AbstractAdminComponentSessionController
-
- org.silverpeas.web.templatedesigner.control.TemplateDesignerSessionController
-
- All Implemented Interfaces:
Serializable
,ComponentSessionController
,SessionCloseable
public class TemplateDesignerSessionController extends AbstractAdminComponentSessionController
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
context
-
-
Constructor Summary
Constructors Constructor Description TemplateDesignerSessionController(MainSessionController mainSessionCtrl, ComponentContext componentContext)
Standard Session Controller Constructeur
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addField(FieldTemplate field)
void
addField(FieldTemplate field, int index)
boolean
createTemplate(PublicationTemplate template)
Creates the given template into repositories.void
deleteTemplate()
void
duplicateTemplate(String duplicatedFormName)
List<LocalizedWAComponent>
getComponentsUsingForms()
PublicationTemplate
getCurrentTemplate()
FieldTemplate
getField(String fieldName)
Iterator<FieldTemplate>
getFields()
List<String>
getLanguages()
Map<String,Integer>
getNumberOfRecordsByTemplateAndComponents()
List<PublicationTemplate>
getTemplates()
boolean
isEncryptionAvailable()
boolean
isUpdateInProgress()
PublicationTemplate
reloadCurrentTemplate()
void
removeField(String fieldName)
void
saveTemplate()
PublicationTemplate
setTemplate(String fileName)
void
sortFields(String[] fieldNames)
void
updateField(FieldTemplate field)
void
updateTemplate(PublicationTemplateImpl updatedTemplate)
-
Methods inherited from class org.silverpeas.core.web.mvc.controller.AbstractAdminComponentSessionController
checkAccessGranted, checkAccessGranted, checkAdminAccessOnly, isAccessGranted, isAccessGranted, isUserAdmin, setAppModeMaintenance, setSpaceModeMaintenance, throwForbiddenError
-
Methods inherited from class org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
addClipboardSelection, clipboardPasteDone, close, getClipboardErrorMessage, getClipboardExceptionError, getClipboardObjects, getClipboardSelectedObjects, getClipboardSize, getComponentAccessController, getComponentId, getComponentLabel, getComponentName, getComponentParameterValue, getComponentParameterValue, getComponentRootName, getComponentUrl, getHighestSilverpeasUserRole, getIcon, getLanguage, getLook, getMultilang, getOrganisationController, getPersonalization, getRSSUrl, getSelection, getSettings, getSilverpeasUserRoles, getSpaceId, getSpaceLabel, getString, getSubscriptionContext, getUrlEncodedParameter, getUserAccessLevel, getUserAvailComponentIds, getUserDetail, getUserDetail, getUserId, getUserManageableGroupIds, getUserManageableSpaceIds, getUserRoles, getZoneId, isAppInMaintenance, isGroupManager, isPasswordChangeAllowed, isSpaceInMaintenance, removeClipboardElement, setClipboardSelectedElement, setComponentRootName
-
-
-
-
Constructor Detail
-
TemplateDesignerSessionController
public TemplateDesignerSessionController(MainSessionController mainSessionCtrl, ComponentContext componentContext)
Standard Session Controller Constructeur- Parameters:
mainSessionCtrl
- The user's profilecomponentContext
- The component's profile
-
-
Method Detail
-
getTemplates
public List<PublicationTemplate> getTemplates() throws TemplateDesignerException
- Throws:
TemplateDesignerException
-
reloadCurrentTemplate
public PublicationTemplate reloadCurrentTemplate() throws TemplateDesignerException
- Throws:
TemplateDesignerException
-
setTemplate
public PublicationTemplate setTemplate(String fileName) throws TemplateDesignerException
- Throws:
TemplateDesignerException
-
createTemplate
public boolean createTemplate(PublicationTemplate template) throws TemplateDesignerException, CryptoException
Creates the given template into repositories.- Parameters:
template
- the template to create.- Returns:
- true if well created, false on functional error.
- Throws:
TemplateDesignerException
- on technical error.CryptoException
- on crypto error.
-
updateTemplate
public void updateTemplate(PublicationTemplateImpl updatedTemplate) throws TemplateDesignerException, CryptoException
-
addField
public void addField(FieldTemplate field) throws TemplateDesignerException
- Throws:
TemplateDesignerException
-
addField
public void addField(FieldTemplate field, int index) throws TemplateDesignerException
- Throws:
TemplateDesignerException
-
removeField
public void removeField(String fieldName) throws TemplateDesignerException
- Throws:
TemplateDesignerException
-
sortFields
public void sortFields(String[] fieldNames) throws TemplateDesignerException
- Throws:
TemplateDesignerException
-
updateField
public void updateField(FieldTemplate field) throws TemplateDesignerException
- Throws:
TemplateDesignerException
-
getFields
public Iterator<FieldTemplate> getFields()
-
getField
public FieldTemplate getField(String fieldName)
-
saveTemplate
public void saveTemplate() throws TemplateDesignerException, CryptoException
-
getCurrentTemplate
public PublicationTemplate getCurrentTemplate()
-
isUpdateInProgress
public boolean isUpdateInProgress()
-
getComponentsUsingForms
public List<LocalizedWAComponent> getComponentsUsingForms()
-
isEncryptionAvailable
public boolean isEncryptionAvailable()
-
duplicateTemplate
public void duplicateTemplate(String duplicatedFormName)
-
getNumberOfRecordsByTemplateAndComponents
public Map<String,Integer> getNumberOfRecordsByTemplateAndComponents() throws FormException
- Throws:
FormException
-
deleteTemplate
public void deleteTemplate()
-
-