Skip to content

Commit

Permalink
Merge pull request #4 from jpotts/master
Browse files Browse the repository at this point in the history
Merge changes from jpotts fork
  • Loading branch information
jpotts committed Jul 13, 2021
2 parents 86cad86 + 1d2f609 commit 66abe38
Show file tree
Hide file tree
Showing 26 changed files with 141 additions and 1,028 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.iml
.idea
expirable-content-repo/alf_data_dev
expirable-content-repo/target
Expand Down
233 changes: 0 additions & 233 deletions alfresco-expirable-content.iml

This file was deleted.

237 changes: 0 additions & 237 deletions expirable-content-repo/expirable-content-repo.iml

This file was deleted.

6 changes: 3 additions & 3 deletions expirable-content-repo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.conexiam</groupId>
<groupId>com.metaversant</groupId>
<artifactId>expirable-content-repo</artifactId>
<name>expirable-content-repo Repository AMP project</name>
<packaging>jar</packaging>
<description>Provides the ability to automatically delete content after a certain date.</description>

<parent>
<groupId>com.conexiam</groupId>
<groupId>com.metaversant</groupId>
<artifactId>alfresco-expirable-content</artifactId>
<version>1.0.2-SNAPSHOT</version>
<version>2.0.0</version>
</parent>

<properties>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.conexiam.expirable.actions;
package com.metaversant.expirable.actions;

import com.conexiam.expirable.beans.ReportData;
import com.conexiam.expirable.beans.ReportWriter;
import com.conexiam.expirable.model.ExpirableContentModel;
import com.metaversant.expirable.beans.ReportData;
import com.metaversant.expirable.beans.ReportWriter;
import com.metaversant.expirable.model.ExpirableContentModel;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.action.executer.ActionExecuterAbstractBase;
import org.alfresco.service.cmr.action.Action;
Expand Down Expand Up @@ -68,7 +68,7 @@ protected void addParameterDefinitions(List<ParameterDefinition> paramList) {
}

public ResultSet getExpiredContent() {
String query = "ASPECT:\"cxme:expirable\" AND cxme:expirationDate:[MIN to \"" + Instant.now().toString() + "\"]";
String query = "ASPECT:\"mgi:expirable\" AND mgi:expirationDate:[MIN to \"" + Instant.now().toString() + "\"]";
return searchService.query(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, SearchService.LANGUAGE_FTS_ALFRESCO, query);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.conexiam.expirable.beans;
package com.metaversant.expirable.beans;

import org.alfresco.model.ContentModel;
import org.alfresco.repo.content.MimetypeMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.conexiam.expirable.beans;
package com.metaversant.expirable.beans;

import java.util.Date;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.conexiam.expirable.beans;
package com.metaversant.expirable.beans;

import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.conexiam.expirable.jobs;
package com.metaversant.expirable.jobs;

import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.conexiam.expirable.jobs;
package com.metaversant.expirable.jobs;

import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.action.Action;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.metaversant.expirable.model;

import org.alfresco.service.namespace.QName;

public class ExpirableContentModel {
public static final String METAVERSANT_NAMESPACE = "http://www.metaversant.com/model/expirable/1.0";
public static final QName ASPECT_EXPIRABLE = QName.createQName(METAVERSANT_NAMESPACE, "expirable");
public static final QName PROP_EXPIRATION_DATE = QName.createQName(METAVERSANT_NAMESPACE, "expirationDate");
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
## alfresco/tomcat/shared/classes/alfresco-global.properties.
##

com.conexiam.expirable.jobs.deleteExpiredContent.cronexpression=0 0/5 * * * ?
com.conexiam.expirable.jobs.deleteExpiredContent.cronstartdelay=240000
com.metaversant.expirable.jobs.deleteExpiredContent.cronexpression=0 0/5 * * * ?
com.metaversant.expirable.jobs.deleteExpiredContent.cronstartdelay=240000
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
-->
<beans>

<bean id="expired-content-report-writer" class="com.conexiam.expirable.beans.ExpiredContentReportWriter">
<bean id="expired-content-report-writer" class="com.metaversant.expirable.beans.ExpiredContentReportWriter">
<property name="nodeService">
<ref bean="NodeService" />
</property>
Expand All @@ -33,7 +33,7 @@
</property>
</bean>

<bean id="delete-expired-content" class="com.conexiam.expirable.actions.DeleteExpiredContent" parent="action-executer">
<bean id="delete-expired-content" class="com.metaversant.expirable.actions.DeleteExpiredContent" parent="action-executer">
<property name="nodeService">
<ref bean="NodeService" />
</property>
Expand All @@ -45,21 +45,21 @@
</property>
</bean>

<bean id="com.conexiam.expirable.jobs.DeleteExpiredContentScheduledJobExecuter"
class="com.conexiam.expirable.jobs.DeleteExpiredContentScheduledJobExecuter">
<bean id="com.metaversant.expirable.jobs.DeleteExpiredContentScheduledJobExecuter"
class="com.metaversant.expirable.jobs.DeleteExpiredContentScheduledJobExecuter">
<property name="serviceRegistry">
<ref bean="ServiceRegistry" />
</property>
</bean>

<bean id="com.conexiam.expirable.jobs.deleteExpiredContent.jobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
<bean id="com.metaversant.expirable.jobs.deleteExpiredContent.jobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
<property name="jobClass">
<value>com.conexiam.expirable.jobs.DeleteExpiredContentScheduledJob</value>
<value>com.metaversant.expirable.jobs.DeleteExpiredContentScheduledJob</value>
</property>
<property name="jobDataAsMap">
<map>
<entry key="jobExecuter">
<ref bean="com.conexiam.expirable.jobs.DeleteExpiredContentScheduledJobExecuter" />
<ref bean="com.metaversant.expirable.jobs.DeleteExpiredContentScheduledJobExecuter" />
</entry>
<entry key="jobLockService">
<ref bean="jobLockService" />
Expand All @@ -68,22 +68,22 @@
</property>
</bean>

<bean id="com.conexiam.expirable.jobs.deleteExpiredContent.trigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<bean id="com.metaversant.expirable.jobs.deleteExpiredContent.trigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref bean="com.conexiam.expirable.jobs.deleteExpiredContent.jobDetail" />
<ref bean="com.metaversant.expirable.jobs.deleteExpiredContent.jobDetail" />
</property>
<property name="cronExpression">
<value>${com.conexiam.expirable.jobs.deleteExpiredContent.cronexpression}</value>
<value>${com.metaversant.expirable.jobs.deleteExpiredContent.cronexpression}</value>
</property>
<property name="startDelay">
<value>${com.conexiam.expirable.jobs.deleteExpiredContent.cronstartdelay}</value>
<value>${com.metaversant.expirable.jobs.deleteExpiredContent.cronstartdelay}</value>
</property>
</bean>

<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="com.conexiam.expirable.jobs.deleteExpiredContent.trigger"/>
<ref bean="com.metaversant.expirable.jobs.deleteExpiredContent.trigger"/>
</list>
</property>
</bean>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ expirable.content.folder.reports.description=Folder for expirable content report
expirable-content-repo.folderBootstrap=Bootstraps the Expirable Content Reports folder
expirable-content-repo.folderBootstrap.description=Bootstraps the Expirable Content Reports folder

#cxme:expirable
cxme_expirableContentModel.aspect.cxme_expirable.title=Expirable Content
cxme_expirableContentModel.property.cxme_expirationDate.title=Expiration Date
#mgi:expirable
mgi_expirableContentModel.aspect.mgi_expirable.title=Expirable Content
mgi_expirableContentModel.property.mgi_expirationDate.title=Expiration Date
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<model name="cxme:expirableContentModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<model name="mgi:expirableContentModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

<description>Expirable Content</description>
<author>Metaversant Group, Inc., Jeff Potts</author>
Expand All @@ -10,14 +10,14 @@
</imports>

<namespaces>
<namespace uri="http://www.conexiam.com/model/expirable/1.0" prefix="cxme"/>
<namespace uri="http://www.metaversant.com/model/expirable/1.0" prefix="mgi"/>
</namespaces>

<aspects>
<aspect name="cxme:expirable">
<aspect name="mgi:expirable">
<title>Expirable Content</title>
<properties>
<property name="cxme:expirationDate">
<property name="mgi:expirationDate">
<type>d:datetime</type>
</property>
</properties>
Expand Down
Loading

0 comments on commit 66abe38

Please sign in to comment.