@Override protected PropertyIdImpl createTarget(XmlPullParser parser, QName name) { return new PropertyIdImpl(); } };
@Override protected PropertyIdImpl createTarget(XMLStreamReader parser, QName name) { return new PropertyIdImpl(); } };
@Override public MutablePropertyId createPropertyIdData(String id, List<String> values) { return new PropertyIdImpl(id, values); }
@Override public MutablePropertyId createPropertyIdData(String id, String value) { return new PropertyIdImpl(id, value); }
@Override public MutablePropertyId createPropertyIdData(String id, String value) { return new PropertyIdImpl(id, value); }
@Override public MutablePropertyId createPropertyIdData(String id, List<String> values) { return new PropertyIdImpl(id, values); }
/** * Add Id property to the CMIS object represented by this instance */ protected final void addPropertyId(PropertiesImpl props, String typeId, Set<String> filter, String id, String value) { if (!checkAddProperty(props, typeId, filter, id)) { return; } if (value.equals(CMISConstants.GREG_PROPERTY_NOT_SET)) { value = null; } PropertyIdImpl prop = new PropertyIdImpl(id, value); prop.setQueryName(id); props.addProperty(prop); }
/** * Helper method for adding an id-list-valued property.<p> * * @param typeManager * @param props the properties to add to * @param typeId the type id * @param filter the property filter * @param id the property id * @param value the property value */ public static void addPropertyIdList( CmsCmisTypeManager typeManager, PropertiesImpl props, String typeId, Set<String> filter, String id, List<String> value) { if (!checkAddProperty(typeManager, props, typeId, filter, id)) { return; } props.addProperty(new PropertyIdImpl(id, value)); }
protected final void addPropertyId(PropertiesImpl props, String typeId, Set<String> filter, String id, List<String> values) { if (!checkAddProperty(props, typeId, filter, id)) { return; } PropertyIdImpl prop = new PropertyIdImpl(id, values); prop.setQueryName(id); props.addProperty(prop); }
/** * Creates a CMIS object that only contains an id in the property list. */ protected ObjectData createIdObject(String objectId) { ObjectDataImpl object = new ObjectDataImpl(); PropertiesImpl properties = new PropertiesImpl(); object.setProperties(properties); properties.addProperty(new PropertyIdImpl(PropertyIds.OBJECT_ID, objectId)); return object; }
/** * Creates a CMIS object that only contains an ID in the property list. */ protected ObjectData createIdObject(String objectId) { ObjectDataImpl object = new ObjectDataImpl(); PropertiesImpl properties = new PropertiesImpl(); object.setProperties(properties); properties.addProperty(new PropertyIdImpl(PropertyIds.OBJECT_ID, objectId)); return object; }
/** * Helper method for adding an id-valued property.<p> * * @param typeManager the type manager * @param props the properties to add to * @param typeId the type id * @param filter the property filter * @param id the property id * @param value the property value */ public static void addPropertyId( CmsCmisTypeManager typeManager, PropertiesImpl props, String typeId, Set<String> filter, String id, String value) { if (!checkAddProperty(typeManager, props, typeId, filter, id)) { return; } PropertyIdImpl result = new PropertyIdImpl(id, value); result.setQueryName(id); props.addProperty(result); }
@Override public NodeRef execute(CmisService cmisService) { String repositoryId = cmisService.getRepositoryInfos(null).get(0).getId(); String rootNodeId = cmisService.getObjectByPath(repositoryId, "/", null, true, IncludeRelationships.NONE, null, false, true, null).getId(); Collection<PropertyData<?>> propsList = new ArrayList<PropertyData<?>>(); propsList.add(new PropertyStringImpl(PropertyIds.NAME, "Folder-" + GUID.generate())); propsList.add(new PropertyIdImpl(PropertyIds.OBJECT_TYPE_ID, "cmis:folder")); String folderId = cmisService.createFolder(repositoryId, new PropertiesImpl(propsList), rootNodeId, null, null, null, null); propsList = new ArrayList<PropertyData<?>>(); propsList.add(new PropertyStringImpl(PropertyIds.NAME, "File-" + GUID.generate())); propsList.add(new PropertyIdImpl(PropertyIds.OBJECT_TYPE_ID, "cmis:document")); String nodeId = cmisService.createDocument(repositoryId, new PropertiesImpl(propsList), folderId, null, null, null, null, null, null); return new NodeRef(nodeId.substring(0, nodeId.indexOf(';'))); } }, CmisVersion.CMIS_1_1);
@Override public NodeRef execute(CmisService cmisService) { final PropertiesImpl properties = new PropertiesImpl(); String objectTypeId = "cmis:document"; properties.addProperty(new PropertyIdImpl(PropertyIds.OBJECT_TYPE_ID, objectTypeId)); String fileName = "textFile" + GUID.generate(); properties.addProperty(new PropertyStringImpl(PropertyIds.NAME, fileName)); final ContentStreamImpl contentStream = new ContentStreamImpl(fileName, MimetypeMap.MIMETYPE_TEXT_PLAIN, "Simple text plain document"); String nodeId = cmisService.create(repositoryId, properties, repositoryHelper.getCompanyHome().getId(), contentStream, VersioningState.NONE, null, null); return new NodeRef(nodeId.substring(0, nodeId.indexOf(';'))); } }, CmisVersion.CMIS_1_1);
break; case ID: props.addProperty(new PropertyIdImpl(propDef.getId(), (List<String>)defaultValue)); break; case INTEGER:
@Override public String execute(CmisService cmisService) { final PropertiesImpl properties = new PropertiesImpl(); String objectTypeId = "cmis:document"; properties.addProperty(new PropertyIdImpl(PropertyIds.OBJECT_TYPE_ID, objectTypeId)); String fileName = "textFile" + GUID.generate(); properties.addProperty(new PropertyStringImpl(PropertyIds.NAME, fileName)); final ContentStreamImpl contentStream = new ContentStreamImpl(fileName, MimetypeMap.MIMETYPE_TEXT_PLAIN, "Simple text plain document"); String objectId = cmisService.create(repositoryId, properties, repositoryHelper.getCompanyHome().getId(), contentStream, VersioningState.MAJOR, null, null); return objectId; } }, CmisVersion.CMIS_1_1);
return new PropertyHtmlImpl(propDef.getId(), (List<String>) defaultValue); case ID: return new PropertyIdImpl(propDef.getId(), (List<String>) defaultValue); case INTEGER: return new PropertyIntegerImpl(propDef.getId(), (List<BigInteger>) defaultValue);
properties.addProperty(new PropertyIdImpl(PropertyIds.OBJECT_TYPE_ID, tpdfn.getId())); properties.addProperty(new PropertyStringImpl(PropertyIds.NAME, CLIENT_NAME)); properties.addProperty(new PropertyStringImpl("sctst:clientId", "id" + GUID.generate())); properties.addProperty(new PropertyIdImpl(PropertyIds.OBJECT_TYPE_ID, "R:sctst:relatedClients")); properties.addProperty(new PropertyIdImpl(PropertyIds.SOURCE_ID, contentData.getId())); properties.addProperty(new PropertyIdImpl(PropertyIds.TARGET_ID, itemData.getId())); cmisService.createRelationship(repositoryId, properties, null, null, null, null);
properties.addProperty(new PropertyIdImpl(PropertyIds.OBJECT_TYPE_ID, objectTypeId)); String fileName = "textFile" + GUID.generate(); properties.addProperty(new PropertyStringImpl(PropertyIds.NAME, fileName));
((CmisPropertyString) property).getValue()); } else if (property instanceof CmisPropertyId) { result = new PropertyIdImpl(property.getPropertyDefinitionId(), ((CmisPropertyId) property).getValue()); } else if (property instanceof CmisPropertyInteger) { result = new PropertyIntegerImpl(property.getPropertyDefinitionId(),