public final class Files2DocsLinkDocument extends Object
Modifier and Type | Method and Description |
---|---|
String |
createDocument(fr.paris.lutece.plugins.document.business.Document document,
fr.paris.lutece.portal.business.user.AdminUser user)
Creates a new document
|
List<Attribute> |
getAllAttributes(String strDocumentTypeCode,
int nIdMapping,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the collection of all document attributes that are mandatory or type
file/image.
|
Collection<fr.paris.lutece.plugins.document.business.attributes.AttributeTypeParameter> |
getAttributeParametersValues(int nAttributeId,
Locale locale)
Gets parameters values
|
Collection<fr.paris.lutece.plugins.document.business.attributes.AttributeTypeParameter> |
getAttributeTypeParameterList(String strAttributeTypeCode,
Locale locale)
Gets attribute type parameters list
|
fr.paris.lutece.plugins.document.business.attributes.DocumentAttribute |
getDocumentAttributeById(int nKey)
Returns an instance of a documentAttribute whose identifier is specified
in parameter
|
fr.paris.lutece.plugins.document.business.Document |
getDocumentById(int nKey)
Returns an instance of a document whose identifier is specified in
parameter
|
fr.paris.lutece.plugins.document.business.DocumentType |
getDocumentTypeByCode(String strCode)
Returns an instance of a documentType whose identifier is specified in
parameter
|
static Files2DocsLinkDocument |
getInstance()
Gets the unique instance of Files2DocsLinkDocument
|
Collection<fr.paris.lutece.plugins.document.business.DocumentType> |
getListDocumentTypeFile(Collection<String> listAttributeTypeFile,
boolean bIsForCreate)
Gets the document types filtered by fields of type file
|
Collection<Integer> |
getListRegularExpressionKeyByIdAttribute(int nIdAttribute)
Gets all regular expression key associated to the attribute
|
fr.paris.lutece.plugins.document.business.attributes.DocumentAttribute |
getMandatoryAttributeFileImage(String strDocumentTypeCode)
Get the mandatory attribute file/image from a given
document type
|
Collection<fr.paris.lutece.plugins.document.business.attributes.DocumentAttribute> |
getMandatoryAttributes(String strDocumentTypeCode)
Gets mandatory attributes for the document type
|
String |
getSpacesBrowser(javax.servlet.http.HttpServletRequest request,
fr.paris.lutece.portal.business.user.AdminUser user,
Locale locale)
Gets the HTML code to display the spaces browser
|
boolean |
isAuthorizedAdminDocument(int nIdSpace,
String strDocumentTypeId,
fr.paris.lutece.portal.business.user.AdminUser user)
Checks that a given user is allowed to access a document type for a given
permission in a document space specified
in parameter.
|
boolean |
isDocumentAttributeFile(fr.paris.lutece.plugins.document.business.attributes.DocumentAttribute attribute)
Check if the given document attribute is an attribute type file
|
boolean |
isDocumentAttributeImage(fr.paris.lutece.plugins.document.business.attributes.DocumentAttribute attribute)
Check if the given document attribute is an attribute type image
|
public static Files2DocsLinkDocument getInstance()
public Collection<fr.paris.lutece.plugins.document.business.DocumentType> getListDocumentTypeFile(Collection<String> listAttributeTypeFile, boolean bIsForCreate)
listAttributeTypeFile
- The list of document attributes types
(codes) with a field of type filepublic String getSpacesBrowser(javax.servlet.http.HttpServletRequest request, fr.paris.lutece.portal.business.user.AdminUser user, Locale locale)
request
- The HTTP requestuser
- The current userlocale
- The current localepublic boolean isAuthorizedAdminDocument(int nIdSpace, String strDocumentTypeId, fr.paris.lutece.portal.business.user.AdminUser user)
nIdSpace
- The document space identifierstrDocumentTypeId
- The identifier of the type document being
considereduser
- The user trying to access the resourcepublic Collection<fr.paris.lutece.plugins.document.business.attributes.DocumentAttribute> getMandatoryAttributes(String strDocumentTypeCode)
strDocumentTypeCode
- The document type codepublic fr.paris.lutece.plugins.document.business.attributes.DocumentAttribute getMandatoryAttributeFileImage(String strDocumentTypeCode)
strDocumentTypeCode
- the document type codepublic Collection<fr.paris.lutece.plugins.document.business.attributes.AttributeTypeParameter> getAttributeTypeParameterList(String strAttributeTypeCode, Locale locale)
strAttributeTypeCode
- The attribute type codelocale
- The current localepublic Collection<fr.paris.lutece.plugins.document.business.attributes.AttributeTypeParameter> getAttributeParametersValues(int nAttributeId, Locale locale)
nAttributeId
- The attribute identifierlocale
- The current localepublic String createDocument(fr.paris.lutece.plugins.document.business.Document document, fr.paris.lutece.portal.business.user.AdminUser user)
document
- The documentuser
- The user doing the actionpublic fr.paris.lutece.plugins.document.business.Document getDocumentById(int nKey)
nKey
- The primary key of the documentpublic fr.paris.lutece.plugins.document.business.DocumentType getDocumentTypeByCode(String strCode)
strCode
- The document type code (primary key)public fr.paris.lutece.plugins.document.business.attributes.DocumentAttribute getDocumentAttributeById(int nKey)
nKey
- The primary key of the documentAttributepublic Collection<Integer> getListRegularExpressionKeyByIdAttribute(int nIdAttribute)
nIdAttribute
- The identifier of the document attributepublic List<Attribute> getAllAttributes(String strDocumentTypeCode, int nIdMapping, fr.paris.lutece.portal.service.plugin.Plugin plugin)
strDocumentTypeCode
- the document type codenIdMapping
- the id mappingplugin
- the pluginpublic boolean isDocumentAttributeFile(fr.paris.lutece.plugins.document.business.attributes.DocumentAttribute attribute)
attribute
- then attributepublic boolean isDocumentAttributeImage(fr.paris.lutece.plugins.document.business.attributes.DocumentAttribute attribute)
attribute
- then attributeCopyright © 2015 City of Paris. All rights reserved.