04-12-2006 09:18 AM
// —————————————-
StringBuilder builder = new StringBuilder();
builder.append(Repository.getMimeTypeForFileName(FacesContext
.getCurrentInstance(), bean.getFileName()));
String mime = builder.toString();
// set mimetype of content
addwiz.setContentType(mime);
// set inline Edit if mimetype = HTML
addwiz.setInlineEdit(addwiz.getContentType().equals(
MimetypeMap.MIMETYPE_HTML));
// Try and extract metadata from the file
ContentReader cr = new FileContentReader(this.file);
cr.setMimetype(addwiz.getContentType());
// create properties for content type
Map<QName, Serializable> contentProps = new HashMap<QName, Serializable>(
5, 1.0f);
// if (Repository.extractMetadata(FacesContext.getCurrentInstance(),
// cr, contentProps))
// {
addwiz.setAuthor((String) (contentProps
.get(ContentModel.PROP_AUTHOR)));
addwiz
.setTitle((String) (contentProps
.get(ContentModel.PROP_TITLE)));
addwiz.setDescription((String) (contentProps
.get(ContentModel.PROP_DESCRIPTION)));
// }
if (addwiz.getTitle() == null)
{
addwiz.setTitle(bean.getFileName());
}
addwiz.quick(this.file, null);
public String quick(File fileContent, String strContent)
{
String outcome = quicksaveContent(fileContent, strContent);
// now we know the new details are in the repository, reset the
// client side node representation so the new details are retrieved
if (this.editMode)
{
this.browseBean.getDocument().reset();
}
return outcome;
}
// if (Repository.extractMetadata(FacesContext.getCurrentInstance(),
04-12-2006 04:10 PM
AddContentWizard.Finish
in the UploadFileServlet ???
04-13-2006 10:36 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.