Search code examples
structureliferay-6assets

Get content of structure Liferay


I want to get the structure content, to be more clear I have this structure :

enter image description here

And I need to make a filter based on this options of "Etablissement" in the asset publisher

I am using Liferay 6.2 ce ga2.

How to achieve this?


Solution

  •        String structureXSD = "";
    
            List<DDMStructure> structures =null;
            try {
                structures = DDMStructureLocalServiceUtil.getStructures();
                //get all structures
                for (DDMStructure structureL : structures) {
                    if( structureL.getName().indexOf(structureName) > 0){// 0 for empty string
                        structureXSD = structureL.getXsd();
                        break;
                    }
                }