Package com.jalios.jcms.publiclink
Class PublicLinkManager
java.lang.Object
com.jalios.jcms.publiclink.PublicLinkManager
- All Implemented Interfaces:
JPropertiesListener
-
Method Summary
Modifier and TypeMethodDescriptionbuildAccessUrl(String accessId) booleanCheck if the specified member can create a public link.booleancanCreatePublicLink(Member mbr, Publication pub) Check if the specified member can create a public link for the specified publication.booleangenerateAccessCode(int length) intstatic PublicLinkManagergetPublicLink(String accessId) booleanbooleanvoidprocessDocumentDeletion(FileDocument doc, Member opAuthor) Delete or update PublicLink when a document is deletedvoidpropertiesChange(JProperties properties) Invoked after properties have been modified in JCMS and save on disk.
-
Method Details
-
getInstance
-
isEnabled
public boolean isEnabled()- Returns:
- true if the Public Link feature is enabled.
- Since:
- jcms-10.0.5
-
isForceDownload
public boolean isForceDownload() -
getPublicLink
- Parameters:
accessId- the access id- Returns:
- the PublicLink bound to the given accessId
- Since:
- jcms-10.0.5
-
generateAccessId
- Returns:
- a random access ID.
- Since:
- jcms-10.0.5
-
generateAccessCode
- Returns:
- a random access code
- Since:
- jcms-10.0.5
-
getAccessCodeLength
public int getAccessCodeLength()- Returns:
- the length of the access code
- Since:
- jcms-10.0.5
-
generateAccessCode
- Parameters:
length- the number of digit of the code- Returns:
- a random access code
- Since:
- jcms-10.0.5
-
buildAccessUrl
- Parameters:
accessId- the access ID- Returns:
- the access URL for the given accessId.
- Since:
- jcms-10.0.5
-
canManagePublicLink
- Parameters:
mbr- the member- Returns:
- true if the given member can manage all public links
- Since:
- jcms-10.0.5
-
canCreatePublicLink
Check if the specified member can create a public link for the specified publication.- Parameters:
mbr- the member for which verification is performed (null accepted)pub- the publication for which a pub link would be created (null accepted)- Returns:
- true if the given member can create public link for the specified publication
- Since:
- 10.0.8 / JCMS-10746
-
canCreatePublicLink
Check if the specified member can create a public link.If you need to check rights for a specific publication, use
canCreatePublicLink(Member, Publication).- Parameters:
mbr- the member- Returns:
- true if the given member can create public links
- Since:
- jcms-10.0.5
-
propertiesChange
Description copied from interface:JPropertiesListenerInvoked after properties have been modified in JCMS and save on disk.You cannot alter the value received in parameters.
Note that properties parameter may be null, a limited set of site properties, or all site properties.
To check that a property has been modified, reload the "current" property instead using
channel.getPropertiesorchannel.getProperty.- Specified by:
propertiesChangein interfaceJPropertiesListener- Parameters:
properties- the properties which have been submitted to change
-
processDocumentDeletion
Delete or update PublicLink when a document is deleted- Parameters:
doc- the documentopAuthor- the member who has deleted the document- Since:
- jcms-10.0.6
-