maia/.svn/pristine/3e/3eccddbea470e47653ba5a73350...

181 lines
4.7 KiB
Plaintext
Executable File

/**
*
*/
package com.fp.alfresco.client;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
import com.fp.alfresco.enums.EnumDataType;
import com.fp.alfresco.enums.EnumDocumentType;
/**
* Documento que contiene las propiedades que posee todo documento alfresco
* @author bpt
*
*/
public class DocumentoAlfresco {
private String id;
private String nombre;
private String modificadoPor;
private String accesoDescarga;
private String xPathLocationPadre;
private String xPathLocation;
private String tipo;
private Map<String, Object> propiedades;
private Map<String, Map<String, Object>> propiedadesToSet;
private File file;
public DocumentoAlfresco(String nombre, String modificadoPor){
this.nombre = nombre;
this.modificadoPor = modificadoPor;
this.tipo = EnumDocumentType.FILE.getValue();
this.propiedades = new HashMap<String, Object>();
this.propiedadesToSet = new HashMap<String, Map<String,Object>>();
}
/**
* @return Retorna el atributo id
*/
public String getId() {
return this.id;
}
/**
* @param id Par&aacute;metro a fijar en el atributo id
*/
public void setId(String id) {
this.id = id;
}
/**
* @return Retorna el atributo nombre
*/
public String getNombre() {
return this.nombre;
}
/**
* @param nombre Par&aacute;metro a fijar en el atributo nombre
*/
public void setNombre(String nombre) {
this.nombre = nombre;
}
/**
* @return Retorna el atributo modificadoPor
*/
public String getModificadoPor() {
return this.modificadoPor;
}
/**
* @param modificadoPor Par&aacute;metro a fijar en el atributo modificadoPor
*/
public void setModificadoPor(String modificadoPor) {
this.modificadoPor = modificadoPor;
}
/**
* @return Retorna el atributo accesoDescarga
*/
public String getAccesoDescarga() {
return this.accesoDescarga;
}
/**
* @param accesoDescarga Par&aacute;metro a fijar en el atributo accesoDescarga
*/
public void setAccesoDescarga(String accesoDescarga) {
this.accesoDescarga = accesoDescarga;
}
/**
* @return Retorna el atributo xPathLocationPadre
*/
public String getxPathLocationPadre() {
return this.xPathLocationPadre;
}
/**
* @param xPathLocationPadre Par&aacute;metro a fijar en el atributo xPathLocationPadre
*/
public void setxPathLocationPadre(String xPathLocationPadre) {
this.xPathLocationPadre = xPathLocationPadre;
}
/**
* @return Retorna el atributo xPathLocation
*/
public String getxPathLocation() {
return this.xPathLocation;
}
/**
* @param xPathLocation Par&aacute;metro a fijar en el atributo xPathLocation
*/
public void setxPathLocation(String xPathLocation) {
this.xPathLocation = xPathLocation;
}
/**
* @return Retorna el atributo tipo
*/
public String getTipo() {
return this.tipo;
}
/**
* @param tipo Par&aacute;metro a fijar en el atributo tipo
*/
public void setTipo(String tipo) {
this.tipo = tipo;
}
/**
* @return Retorna el atributo propiedades
*/
public Map<String, Object> getPropiedades() {
return this.propiedades;
}
/**
* @param propiedades Par&aacute;metro a fijar en el atributo propiedades
*/
public void setPropiedades(Map<String, Object> propiedades) {
this.propiedades = propiedades;
}
/**
* @return Retorna el atributo propiedadesToSet
*/
public Map<String, Map<String, Object>> getPropiedadesToSet() {
return this.propiedadesToSet;
}
/**
* @param propiedadesToSet Par&aacute;metro a fijar en el atributo propiedadesToSet
*/
public void setPropiedadesToSet(
Map<String, Map<String, Object>> propiedadesToSet) {
this.propiedadesToSet = propiedadesToSet;
}
/**
* @return Retorna el atributo file
*/
public File getFile() {
return this.file;
}
/**
* @param file Par&aacute;metro a fijar en el atributo file
*/
public void setFile(File file) {
this.file = file;
}
/**
* M&eacute;todo para agregar una propiedad al documento que se va a subir
* @param name Nombre del campo
* @param value Valor del campo
* @param type Tipo de dato del campo
*/
public void setPropiedadCampo(String name, Object value, EnumDataType type){
HashMap<String, Object> item = new HashMap<String, Object>();
item.put("value", value);
item.put("type", type);
this.propiedadesToSet.put(name, item);
}
}