Package se.conciliate.extensions.publish
Interface PublishService
public interface PublishService
A service that can publish information, such as HTML or PDF.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceCallback for validateBeforePublish()static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringa helper service for v1 html publisher, also used by customers who did their own publisher (IFS)static final StringDeprecated.static final StringDeprecated.static final Stringv2 of the html publisher, scheduled to replace v1static final Stringv1 of the report publisher (creates pdf/word reports) -
Method Summary
Modifier and TypeMethodDescriptioncreateProfile(String name) Creates a new profile, ready for editing.voideditProfile(Window parent, MutablePublishProfile profile, Runnable editCallBack) Shows a GUI for editing the given profile.default voideditProfile(Window parent, MutablePublishProfile profile, PublishService.ProfileEditorKey key, Runnable editCallBack) Shows a GUI for editing a specific setting in the given profile.voidexportProfile(PublishProfile profile, File toFile) Exports a profile.Returns a description of the service.default intUsed to sort the display order on create new publish profile listgetName()Returns the name of the serviceReturns this service's profile typegetPublishSettingsEditor(PublishProfile profile, UploadProfile target, Map<String, Object> properties) Returns an optional editor for modifying the properties sent to the publish method.Returns an icon that represents this serviceimportProfile(File zipFile) Imports a profile.booleanisAlwaysOverwrite(PublishProfile profile) Returns true if the ui should ignore existing filesbooleanisCompatible(PublishProfile profile) Returns true if this service can use the given profile.booleanReturns true if this service can create new profiles.booleanReturns true if profiles can be edited by this servicebooleanisImportCompatible(File zipFile) Returns true if this service can import the given profilevoidpublish(PublishProfile profile, UploadProfile target, ProgressCallback progress, Map<String, Object> properties, boolean notifySubscribers, Map<String, Object> session) Publish using this service.booleanvalidateBeforePublish(PublishProfile profile, PublishService.InvalidMessage msg, Map<String, Object> session) Returns true if the profile is ready to be used.
-
Field Details
-
HTML_PUBLISH_TYPE_STRING
Deprecated.v1 of the html publisher, soon to be deprecated (5.3)- See Also:
-
HTML_V2_PUBLISH_TYPE_STRING
Deprecated.v1.5 of the html publisher, also called responsive publisher, only lived as a plugin- See Also:
-
PAGES_PUBLISH_TYPE_STRING
v2 of the html publisher, scheduled to replace v1- See Also:
-
REPORT_PUBLISH_TYPE_STRING
v1 of the report publisher (creates pdf/word reports)- See Also:
-
CUSTOM_PUBLISH_TYPE_STRING
a helper service for v1 html publisher, also used by customers who did their own publisher (IFS)- See Also:
-
-
Method Details
-
getName
String getName()Returns the name of the service- Returns:
- the name of the service
-
getDescription
String getDescription()Returns a description of the service.- Returns:
- a description of the service.
-
isCreatable
boolean isCreatable()Returns true if this service can create new profiles.- Returns:
- true if this service can create new profiles.
-
createProfile
Creates a new profile, ready for editing.- Parameters:
name- The name of the profile.- Returns:
- a new profile, ready for editing.
- Throws:
PublishProfileException- If an exception occurs.
-
isImportCompatible
Returns true if this service can import the given profile- Parameters:
zipFile- A zipFile.- Returns:
- true if this service can import the given profile
- Throws:
PublishProfileException- If an exception occurs.
-
importProfile
Imports a profile.- Parameters:
zipFile- The zip to import.- Returns:
- a profile
- Throws:
PublishProfileException- If an exception occurs.
-
exportProfile
Exports a profile.- Parameters:
profile- The profiletoFile- The file.- Throws:
IOException- If an IOException occurs.PublishProfileException- If an exception occurs.
-
isEditable
boolean isEditable()Returns true if profiles can be edited by this service- Returns:
- true if profiles can be edited by this service
-
editProfile
Shows a GUI for editing the given profile.- Parameters:
parent- The parent window.profile- The profile.editCallBack- An edit callback.
-
editProfile
default void editProfile(Window parent, MutablePublishProfile profile, PublishService.ProfileEditorKey key, Runnable editCallBack) Shows a GUI for editing a specific setting in the given profile.- Parameters:
parent- The parent window.profile- A profile.key- A key.editCallBack- An edit callback.
-
isCompatible
Returns true if this service can use the given profile.- Parameters:
profile- A profile.- Returns:
- true if this service can use the given profile.
- Throws:
PublishProfileException- If an exception occurs.
-
validateBeforePublish
boolean validateBeforePublish(PublishProfile profile, PublishService.InvalidMessage msg, Map<String, Object> session) throws PublishProfileExceptionReturns true if the profile is ready to be used. If the profile is not ready (information needed is missing) false is returned and the InvalidMessage object is updated.- Parameters:
profile- A profile.msg- A msg.- Returns:
- true if the profile is ready to be used.
- Throws:
PublishProfileException- If an exception occurs.
-
getProfileType
String getProfileType()Returns this service's profile type- Returns:
- this service's profile type
-
getSmallIcon
Icon getSmallIcon()Returns an icon that represents this service- Returns:
- an icon that represents this service
-
getSmallIconSelected
Icon getSmallIconSelected() -
isAlwaysOverwrite
Returns true if the ui should ignore existing files- Parameters:
profile- A profile- Returns:
- true if the ui should ignore existing files
-
getPublishSettingsEditor
JComponent getPublishSettingsEditor(PublishProfile profile, UploadProfile target, Map<String, Object> properties) Returns an optional editor for modifying the properties sent to the publish method.- Parameters:
profile- A profile.target- A target.properties- A property map.- Returns:
- an optional editor for modifying the properties sent to the publish method.
-
publish
void publish(PublishProfile profile, UploadProfile target, ProgressCallback progress, Map<String, Object> properties, boolean notifySubscribers, Map<String, throws PublishException, IOExceptionObject> session) Publish using this service.- Parameters:
profile- A profile.target- A target.progress- A callback.properties- A property map.notifySubscribers- True to notify subs, false otherwise.- Throws:
PublishException- If an exception occurs.IOException- If an exception occurs.
-
getDisplayPreference
default int getDisplayPreference()Used to sort the display order on create new publish profile list
-