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 interface
Callback for validateBeforePublish()static interface
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
a helper service for v1 html publisher, also used by customers who did their own publisher (IFS)static final String
Deprecated.static final String
Deprecated.static final String
v2 of the html publisher, scheduled to replace v1static final String
v1 of the report publisher (creates pdf/word reports) -
Method Summary
Modifier and TypeMethodDescriptioncreateProfile
(String name) Creates a new profile, ready for editing.void
editProfile
(Window parent, MutablePublishProfile profile, Runnable editCallBack) Shows a GUI for editing the given profile.default void
editProfile
(Window parent, MutablePublishProfile profile, PublishService.ProfileEditorKey key, Runnable editCallBack) Shows a GUI for editing a specific setting in the given profile.void
exportProfile
(PublishProfile profile, File toFile) Exports a profile.Returns a description of the service.default int
Used 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.boolean
isAlwaysOverwrite
(PublishProfile profile) Returns true if the ui should ignore existing filesboolean
isCompatible
(PublishProfile profile) Returns true if this service can use the given profile.boolean
Returns true if this service can create new profiles.boolean
Returns true if profiles can be edited by this serviceboolean
isImportCompatible
(File zipFile) Returns true if this service can import the given profilevoid
publish
(PublishProfile profile, UploadProfile target, ProgressCallback progress, Map<String, Object> properties, boolean notifySubscribers, Map<String, Object> session) Publish using this service.boolean
validateBeforePublish
(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
-