public class SocialDocumentAdapter extends Object implements SocialDocument
SocialDocument
.Constructor and Description |
---|
SocialDocumentAdapter(DocumentModel sourceDocument) |
Modifier and Type | Method and Description |
---|---|
DocumentModel |
getPublicDocument()
Return the public proxy of the source document if the source document is public else return null.
|
DocumentModel |
getRestrictedDocument()
If source document is not an Article return the private proxy of the source document if the source document is
private else return null If is the source document is an Article return the source document if private else
return null.
|
String |
getType() |
boolean |
isDocumentInSocialWorkspace()
Returns
true if this document is inside a SocialWorkspace , false otherwise. |
boolean |
isPublic()
Returns
true if this document is public, false otherwise. |
boolean |
isRestrictedToMembers()
Returns
true if this document is restricted to a SocialWorkspace members, false
otherwise. |
DocumentModel |
makePublic()
Make this document public.
|
DocumentModel |
restrictToMembers()
Make this document restricted to a
SocialWorkspace members. |
public SocialDocumentAdapter(DocumentModel sourceDocument) throws ClientException
sourceDocument
- on which social publications need to be performedClientException
public DocumentModel restrictToMembers() throws ClientException
SocialDocument
SocialWorkspace
members.restrictToMembers
in interface SocialDocument
ClientException
public DocumentModel makePublic() throws ClientException
SocialDocument
SocialWorkspace
.makePublic
in interface SocialDocument
ClientException
public DocumentModel getPublicDocument() throws ClientException
SocialDocument
getPublicDocument
in interface SocialDocument
ClientException
public boolean isPublic() throws ClientException
SocialDocument
true
if this document is public, false
otherwise.isPublic
in interface SocialDocument
ClientException
public DocumentModel getRestrictedDocument() throws ClientException
SocialDocument
getRestrictedDocument
in interface SocialDocument
ClientException
public boolean isRestrictedToMembers() throws ClientException
SocialDocument
true
if this document is restricted to a SocialWorkspace
members, false
otherwise.isRestrictedToMembers
in interface SocialDocument
ClientException
public boolean isDocumentInSocialWorkspace()
SocialDocument
true
if this document is inside a SocialWorkspace
, false
otherwise.isDocumentInSocialWorkspace
in interface SocialDocument
public String getType()
getType
in interface SocialDocument
Copyright © 2015 Nuxeo SA. All rights reserved.