RES: [opencms-dev] how to change property value of resource throu gh the shell - SOLUTION
BRAGA Bruno Gonçalves
bruno.braga at globalvalue.com.br
Fri Apr 15 16:39:55 CEST 2005
Create and publish Folder with Properties:
public void createFolder(String path, String name, Map properties)
throws Exception {
//--cria uma pasta
String nomePasta = Format.retiraAcento(name);
setCurrentProject("Offline"); //escolhe o tipo de projeto
createFolder(path, name);
//--seta as properties do resource
if (properties != null && properties.size() > 0) {
List listProperties = new ArrayList();
//--monta lista de properties
Iterator it = properties.entrySet().iterator();
while(it.hasNext()) { //loop nas properties
Map.Entry entry = (Map.Entry)it.next();
CmsProperty property = new CmsProperty();
property.setKey(entry.getKey().toString());
property.setStructureValue(entry.getValue().toString());
listProperties.add(property);
}
//--grava as properties
m_cms.writePropertyObjects(path+name, listProperties);
}
//--publica recurso criado
unlockCurrentProject();
m_cms.publishResource(path+name);
}
_____
De: BRAGA Bruno Gonçalves [mailto:bruno.braga at globalvalue.com.br]
Enviada em: quinta-feira, 14 de abril de 2005 16:58
Para: The OpenCms mailing list
Assunto: [opencms-dev] how to change property value of resource through the
shell
How to change property value of resource through the Shell?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050415/356bc2aa/attachment.htm>
More information about the opencms-dev
mailing list