+++ /dev/null
-/**
- *
- */
-package fr.mbdx.parapheur;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.activiti.engine.impl.util.json.JSONArray;
-import org.activiti.engine.impl.util.json.JSONObject;
-
-/**
- * Bean encapsulant quelques propriétés utiles d'un bureau parapheur
- * (lues en passant directement par CMIS et l'API REST d'Alfresco et non le webservice)
- */
-public class Bureau {
- private String id = null;
- private String name = null;
- private String title = null;
- private String description = null;
- private String delegataire = null;
- private List<String> owners = new ArrayList<String>();
-
- public Bureau() {
-
- }
-
- /**
- * Permet d'initialiser ce bureau à partir de l'objet JSON suivant :
- * {
- * "id" : "workspace://SpacesStore/955655b1-c95e-4542-a6a4-93ef8aa14b8a",
- * "name" : "Le Maire",
- * "title" : "Bureau de Monsieur le Maire",
- * "description" : "Bureau de Monsieur le Maire",
- * "delegataire" : "",
- * "owners" :
- * [
- *
- * "Administrator"
- *
- * ]
- * }
- *
- * @param json
- */
- public Bureau(JSONObject json) {
- this.id = json.getString("id");
- this.name = json.getString("name");
- this.title = json.getString("title");
- this.description = json.getString("description");
- this.delegataire = json.getString("delegataire");
- JSONArray array = json.getJSONArray("owners");
- for (int i = 0; i < array.length(); ++i) {
- this.owners.add(array.getString(i));
- }
- }
-
- /**
- * @return the id
- */
- public String getId() {
- return id;
- }
-
- /**
- * @param id the id to set
- */
- public void setId(String id) {
- this.id = id;
- }
-
- /**
- * @return the name
- */
- public String getName() {
- return name;
- }
-
- /**
- * @param name the name to set
- */
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * @return the title
- */
- public String getTitle() {
- return title;
- }
-
- /**
- * @param title the title to set
- */
- public void setTitle(String title) {
- this.title = title;
- }
-
- /**
- * @return the description
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * @param description the description to set
- */
- public void setDescription(String description) {
- this.description = description;
- }
-
- /**
- * @return the delegataire
- */
- public String getDelegataire() {
- return delegataire;
- }
-
- /**
- * @param delegataire the delegataire to set
- */
- public void setDelegataire(String delegataire) {
- this.delegataire = delegataire;
- }
-
- /**
- * @return the owners
- */
- public List<String> getOwners() {
- return owners;
- }
-
- /**
- * @param owners the owners to set
- */
- public void setOwners(List<String> owners) {
- this.owners = owners;
- }
-
-
-}