Commit 640693fe authored by Noel Alonso's avatar Noel Alonso
Browse files

Añade campo a modelo

Permite gestionar contenido a incrustar
parent bcc7d5da
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
	<groupId>es.redmic.lib</groupId>
	<artifactId>models</artifactId>
	<packaging>jar</packaging>
	<version>0.14.0</version>
	<version>0.14.0-feature-addActivityEmbeddedContent</version>
	<name>Models</name>
	<description>Input-output classes and models</description>

+11 −0
Original line number Diff line number Diff line
@@ -63,6 +63,9 @@ public class ActivityDTO extends ActivityBaseDTO {
	@JsonSchemaUniqueItemsByRequiredProperties
	private List<ActivityResourceDTO> resources;

	@JsonSchemaUniqueItemsByRequiredProperties
	private List<ActivityEmbeddedContentDTO> embeddedContents;

	@JsonIgnoreProperties(value = { "_meta" })
	@JsonDeserialize(using = CustomRelationDeserializer.class)
	@JsonSchemaUrl(value = "controller.mapping.THEME_INSPIRE")
@@ -123,6 +126,14 @@ public class ActivityDTO extends ActivityBaseDTO {
		this.resources = resources;
	}

	public List<ActivityEmbeddedContentDTO> getEmbeddedContents() {
		return this.embeddedContents;
	}

	public void setEmbeddedContents(List<ActivityEmbeddedContentDTO> embeddedContents) {
		this.embeddedContents = embeddedContents;
	}

	public ThemeInspireDTO getThemeInspire() {
		return this.themeInspire;
	}
+44 −0
Original line number Diff line number Diff line
package es.redmic.models.es.administrative.dto;

/*-
 * #%L
 * Models
 * %%
 * Copyright (C) 2019 - 2023 REDMIC Project / Server
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import es.redmic.models.es.common.dto.DTOImplement;

public class ActivityEmbeddedContentDTO extends DTOImplement {

	@NotNull
	@Size(min = 1, max = 50000)
	private String embeddedContent;

	public ActivityEmbeddedContentDTO() {
		// default constructor
	}

	public String getEmbeddedContent() {
		return this.embeddedContent;
	}

	public void setEmbeddedContent(String embeddedContent) {
		this.embeddedContent = embeddedContent;
	}
}
+10 −0
Original line number Diff line number Diff line
@@ -44,6 +44,8 @@ public class Activity extends ActivityBase {

	private List<ActivityResource> resources;

	private List<ActivityEmbeddedContent> embeddedContents;

	private ThemeInspire themeInspire;

	private String licence;
@@ -86,6 +88,14 @@ public class Activity extends ActivityBase {
		this.resources = resources;
	}

	public List<ActivityEmbeddedContent> getEmbeddedContents() {
		return this.embeddedContents;
	}

	public void setEmbeddedContents(List<ActivityEmbeddedContent> embeddedContents) {
		this.embeddedContents = embeddedContents;
	}

	public ThemeInspire getThemeInspire() {
		return this.themeInspire;
	}
+40 −0
Original line number Diff line number Diff line
package es.redmic.models.es.administrative.model;

/*-
 * #%L
 * Models
 * %%
 * Copyright (C) 2019 - 2023 REDMIC Project / Server
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */

import es.redmic.models.es.common.model.BaseAbstractES;

public class ActivityEmbeddedContent extends BaseAbstractES {

	private String embeddedContent;

	public ActivityEmbeddedContent() {
		// default constructor
	}

	public String getEmbeddedContent() {
		return this.embeddedContent;
	}

	public void setEmbeddedContent(String embeddedContent) {
		this.embeddedContent = embeddedContent;
	}
}
Loading