Fórumok

Create new Liferay document library types programatically

BRONDY DENIS, módosítva 11 év-val korábban

Create new Liferay document library types programatically

New Member Bejegyzések: 3 Csatlakozás dátuma: 2012.12.10. Legújabb bejegyzések
Hello everybody,

We usually don't ask for support and search as deep as we can when we have a problem, but at this point, we tried and we didn't succeed.

We are using the local document library API (no JAAS authentication) in order to add document programatically and we succeed in it. However, we really don't know how to add a document and create its associated type automatically.
We have a java thread that looks for files in a dedicated directory using a regular expression based on the filename. When a file is detected, we publish the file but its impossible, let say, to create a new document type identified by the string name "Document BLABAL type" and a simple metadata set (I think we succeed once but it wasn't really clean...the document type was there but the metadata set no...strange).

Is anyone using this feature ?
Thanks again to everybody who is posting and supporting this forum.
denis
BRONDY DENIS, módosítva 11 év-val korábban

RE: Create new Liferay document library types programatically

New Member Bejegyzések: 3 Csatlakozás dátuma: 2012.12.10. Legújabb bejegyzések
One small "up"

I can't imagine we are the first using this nice feature ...

Tks guys,
denis
thumbnail
Mika Koivisto, módosítva 11 év-val korábban

RE: Create new Liferay document library types programatically

Liferay Legend Bejegyzések: 1519 Csatlakozás dátuma: 2006.08.07. Legújabb bejegyzések
Take a look at AddDefaultDocumentLibraryStructuresAction to see how we add the default document types.
BRONDY DENIS, módosítva 11 év-val korábban

RE: Create new Liferay document library types programatically

New Member Bejegyzések: 3 Csatlakozás dátuma: 2012.12.10. Legújabb bejegyzések
Hey Mika,

Thanks for the reply. That's a good idea.... Next time, I will start from here.
denis