Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions services/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
<include>**/*.gif</include>
<include>**/*.jpg</include>
<include>**/*.png</include>
<include>**/*.idx</include>
</includes>
</resource>
</resources>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,21 @@
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.NamedQueries;
import jakarta.persistence.NamedQuery;
import jakarta.persistence.Table;

import org.exoplatform.commons.api.persistence.ExoEntity;
import org.exoplatform.webconferencing.WebConferencingService;

/**
* Created by The eXo Platform SAS.
*
* @author <a href="mailto:pnedonosko@exoplatform.com">Peter Nedonosko</a>
* @version $Id: CallEntity.java 00000 Dec 22, 2017 pnedonosko $
*/
@Entity(name = "WebConfCall")
@ExoEntity
@Table(name = "WBC_CALLS")
@NamedQueries({
@NamedQuery(name = "WebConfCall.findGroupCallByOwnerId", // XXX skip OWNER_TYPE_SPACEEVENT to do get only spaces and user
query = "SELECT c FROM WebConfCall c WHERE c.isGroup = true AND c.ownerType != '" + OWNER_TYPE_SPACEEVENT + "' AND c.ownerId = :ownerId"),
@NamedQuery(name = "WebConfCall.findGroupCallByOwnerTypeId",
query = "SELECT c FROM WebConfCall c WHERE c.isGroup = true AND c.ownerType = :ownerType AND c.ownerId = :ownerId ORDER BY c.lastDate"), // TODO order by startDate
@NamedQuery(name = "WebConfCall.findUserGroupCalls",
query = "SELECT c FROM WebConfCall c, WebConfParticipant p WHERE c.id = p.callId AND p.id = :userId ORDER BY c.lastDate"),
@NamedQuery(name = "WebConfCall.deleteOwnerOlderCalls",
query = "DELETE FROM WebConfCall WHERE ownerType = :ownerType AND lastDate <= :expiredDate"),
@NamedQuery(name = "WebConfCall.findGroupCallsByState",
query = "SELECT c FROM WebConfCall c WHERE c.state = :state AND c.ownerType != '" + OWNER_TYPE_USER + "'")})
@NamedQuery(name = "WebConfCall.findGroupCallByOwnerId", // XXX skip OWNER_TYPE_SPACEEVENT to do get only spaces and user
query = "SELECT c FROM WebConfCall c WHERE c.isGroup = true AND c.ownerType != '" + OWNER_TYPE_SPACEEVENT + "' AND c.ownerId = :ownerId")
@NamedQuery(name = "WebConfCall.findGroupCallByOwnerTypeId",
query = "SELECT c FROM WebConfCall c WHERE c.isGroup = true AND c.ownerType = :ownerType AND c.ownerId = :ownerId ORDER BY c.lastDate") // TODO order by startDate
@NamedQuery(name = "WebConfCall.findUserGroupCalls",
query = "SELECT c FROM WebConfCall c, WebConfParticipant p WHERE c.id = p.callId AND p.id = :userId ORDER BY c.lastDate")
@NamedQuery(name = "WebConfCall.deleteOwnerOlderCalls",
query = "DELETE FROM WebConfCall WHERE ownerType = :ownerType AND lastDate <= :expiredDate")
@NamedQuery(name = "WebConfCall.findGroupCallsByState",
query = "SELECT c FROM WebConfCall c WHERE c.state = :state AND c.ownerType != '" + OWNER_TYPE_USER + "'")
public class CallEntity {

/** The id. */
Expand Down Expand Up @@ -104,12 +92,6 @@ public class CallEntity {
@Column(name = "IS_USER")
protected boolean isUser;

/**
* Instantiates a new call entity.
*/
public CallEntity() {
}

/**
* Gets the id.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,16 @@
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.IdClass;
import jakarta.persistence.NamedQueries;
import jakarta.persistence.NamedQuery;
import jakarta.persistence.Table;

import org.exoplatform.commons.api.persistence.ExoEntity;

/**
* The Class InviteEntity.
*/
@Entity(name = "WebConfInvite")
@ExoEntity
@Table(name = "WBC_INVITES")
@NamedQueries({
@NamedQuery(name = "WebConfInvite.deleteCallInvites", query = "DELETE FROM WebConfInvite WHERE callId = :callId"),
@NamedQuery(name = "WebConfInvite.findCallInvites", query = "SELECT i FROM WebConfInvite i WHERE i.callId = :callId ORDER BY i.identity")
})
@NamedQuery(name = "WebConfInvite.deleteCallInvites", query = "DELETE FROM WebConfInvite WHERE callId = :callId")
@NamedQuery(name = "WebConfInvite.findCallInvites", query = "SELECT i FROM WebConfInvite i WHERE i.callId = :callId ORDER BY i.identity")
@IdClass(InviteId.class)
public class InviteEntity {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,9 @@ public int hashCode() {
*/
@Override
public boolean equals(Object obj) {
if (obj != null) {
if (InviteId.class.isAssignableFrom(obj.getClass())) {
InviteId other = InviteId.class.cast(obj);
return callId.equals(other.getCallId()) && identity.equals(other.getIdentity());
}
if (obj != null && InviteId.class.isAssignableFrom(obj.getClass())) {
InviteId other = InviteId.class.cast(obj);
return callId.equals(other.getCallId()) && identity.equals(other.getIdentity());
}
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,18 @@
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.IdClass;
import jakarta.persistence.NamedQueries;
import jakarta.persistence.NamedQuery;
import jakarta.persistence.Table;

import org.exoplatform.commons.api.persistence.ExoEntity;

/**
* Call origins (from where participants are from).
*
* Created by The eXo Platform SAS.
*
* @author <a href="mailto:pnedonosko@exoplatform.com">Peter Nedonosko</a>
* @version $Id: OriginEntity.java 00000 Dec 18, 2020 pnedonosko $
*/
@Entity(name = "WebConfOrigin")
@ExoEntity
@Table(name = "WBC_ORIGINS")
@IdClass(OriginId.class)
@NamedQueries({
@NamedQuery(name = "WebConfOrigin.findCallOrigins",
query = "SELECT o FROM WebConfOrigin o WHERE o.callId = :callId AND o.type = :type ORDER BY o.type, o.state"),
@NamedQuery(name = "WebConfOrigin.deleteCallOrigins", query = "DELETE FROM WebConfOrigin WHERE callId = :callId") })
@NamedQuery(name = "WebConfOrigin.findCallOrigins",
query = "SELECT o FROM WebConfOrigin o WHERE o.callId = :callId AND o.type = :type ORDER BY o.type, o.state")
@NamedQuery(name = "WebConfOrigin.deleteCallOrigins", query = "DELETE FROM WebConfOrigin WHERE callId = :callId")
public class OriginEntity {

/** The id. */
Expand All @@ -64,12 +54,6 @@ public class OriginEntity {
@Column(name = "STATE")
protected String state;

/**
* Instantiates a new origin entity.
*/
public OriginEntity() {
}

/**
* Gets the id.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
*/
public class OriginId implements Serializable {

private static final long serialVersionUID = -6786134308978492369L;

/** The id. */
protected String id;

Expand Down Expand Up @@ -61,11 +63,9 @@ public OriginId(String id, String callId, String type) {
* {@inheritDoc}
*/
public boolean equals(Object o) {
if (o != null) {
if (OriginId.class.isAssignableFrom(o.getClass())) {
OriginId other = OriginId.class.cast(o);
return id.equals(other.getId()) && callId.equals(other.getCallId()) && type.equals(other.getType());
}
if (o != null && OriginId.class.isAssignableFrom(o.getClass())) {
OriginId other = OriginId.class.cast(o);
return id.equals(other.getId()) && callId.equals(other.getCallId()) && type.equals(other.getType());
}
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,18 @@
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.IdClass;
import jakarta.persistence.NamedQueries;
import jakarta.persistence.NamedQuery;
import jakarta.persistence.Table;

import org.exoplatform.commons.api.persistence.ExoEntity;

/**
* Created by The eXo Platform SAS.
*
* @author <a href="mailto:pnedonosko@exoplatform.com">Peter Nedonosko</a>
* @version $Id: ParticipantEntity.java 00000 Dec 22, 2017 pnedonosko $
*/
@Entity(name = "WebConfParticipant")
@ExoEntity
@Table(name = "WBC_PARTICIPANTS")
@IdClass(ParticipantId.class)
@NamedQueries({
@NamedQuery(name = "WebConfCall.findCallParts",
query = "SELECT p FROM WebConfParticipant p WHERE p.callId = :callId ORDER BY p.state, p.type"),
@NamedQuery(name = "WebConfCall.deleteCallParts", query = "DELETE FROM WebConfParticipant WHERE callId = :callId") })
@NamedQuery(name = "WebConfCall.findCallParts",
query = "SELECT p FROM WebConfParticipant p WHERE p.callId = :callId ORDER BY p.state, p.type")
@NamedQuery(name = "WebConfCall.deleteCallParts", query = "DELETE FROM WebConfParticipant WHERE callId = :callId")
public class ParticipantEntity {

/** The id. */
Expand All @@ -66,12 +58,6 @@ public class ParticipantEntity {
@Column(name = "CLIENT_ID")
protected String clientId;

/**
* Instantiates a new participant entity.
*/
public ParticipantEntity() {
}

/**
* Gets the id.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
*/
public class ParticipantId implements Serializable {

private static final long serialVersionUID = 3670760662832572112L;

/** The id. */
protected String id;

Expand Down Expand Up @@ -56,11 +58,9 @@ public ParticipantId(String id, String callId) {
* {@inheritDoc}
*/
public boolean equals(Object o) {
if (o != null) {
if (ParticipantId.class.isAssignableFrom(o.getClass())) {
ParticipantId other = ParticipantId.class.cast(o);
return id.equals(other.getId()) && callId.equals(other.getCallId());
}
if (o != null && ParticipantId.class.isAssignableFrom(o.getClass())) {
ParticipantId other = ParticipantId.class.cast(o);
return id.equals(other.getId()) && callId.equals(other.getCallId());
}
return false;
}
Expand Down
4 changes: 4 additions & 0 deletions services/src/main/resources/jpa-entities.idx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
org.exoplatform.webconferencing.domain.CallEntity
org.exoplatform.webconferencing.domain.InviteEntity
org.exoplatform.webconferencing.domain.OriginEntity
org.exoplatform.webconferencing.domain.ParticipantEntity
2 changes: 1 addition & 1 deletion webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<packagingExcludes>**/*.less,**/*.vue,css/lib/*,vue-apps/**,js/mock/**/*,**-dev.*</packagingExcludes>
<packagingExcludes>WEB-INF/lib/**,**/*.less,**/*.vue,css/lib/*,vue-apps/**,js/mock/**/*,**-dev.*</packagingExcludes>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.exoplatform.webconferencing;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
import org.springframework.boot.liquibase.autoconfigure.LiquibaseAutoConfiguration;
import org.springframework.context.annotation.PropertySource;

import io.meeds.spring.AvailableIntegration;
Expand All @@ -31,9 +31,9 @@
* Application Center badge means contributing a Spring bean, and a bean needs a
* context to live in. Extending {@link PortalApplicationContextInitializer}
* registers this WAR's context with the Kernel before the portal container
* boots, so beans of this add-on and of the platform become mutually
* injectable — which is how {@code VisioApplicationBadgePlugin} can
* {@code @Autowired} the Kernel-side {@link WebConferencingService}.
* boots, so beans of this add-on and of the platform become mutually injectable
* — which is how {@code VisioApplicationBadgePlugin} can {@code @Autowired} the
* Kernel-side {@link WebConferencingService}.
* <p>
* The scan is deliberately narrow. Only {@link #MODULE_NAME} is scanned, and
* every class currently shipped under that package by this add-on, by
Expand Down Expand Up @@ -65,13 +65,19 @@
* The JPA auto-configuration is deliberately <em>not</em> excluded, even though
* this add-on owns no Spring-managed entity. Removing it was tried and broke
* the boot differently: the platform modules scanned above expect an
* {@code entityManagerFactory} to exist ({@code jpaSharedEM_entityManagerFactory}
* resolves against it), so denying them one merely swaps a Liquibase failure
* for a missing-bean one. The add-on continues to manage its own schema through
* the Kernel regardless; the factory simply goes unused here.
* {@code entityManagerFactory} to exist
* ({@code jpaSharedEM_entityManagerFactory} resolves against it), so denying
* them one merely swaps a Liquibase failure for a missing-bean one. The add-on
* continues to manage its own schema through the Kernel regardless; the factory
* simply goes unused here.
*/
@SpringBootApplication(scanBasePackages = { WebConferencingApplication.MODULE_NAME, AvailableIntegration.KERNEL_MODULE,
AvailableIntegration.WEB_MODULE }, exclude = { LiquibaseAutoConfiguration.class })
@SpringBootApplication(scanBasePackages = {
WebConferencingApplication.MODULE_NAME,
AvailableIntegration.KERNEL_MODULE,
AvailableIntegration.WEB_MODULE
}, exclude = {
LiquibaseAutoConfiguration.class,
})
@PropertySource("classpath:application.properties")
@PropertySource("classpath:application-common.properties")
public class WebConferencingApplication extends PortalApplicationContextInitializer {
Expand Down
Loading