Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
BPCP committed Jul 16, 2015
0 parents commit a174b9e
Show file tree
Hide file tree
Showing 38 changed files with 1,535 additions and 0 deletions.
3 changes: 3 additions & 0 deletions barcodes-repo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/tomcat/
/target/
/alf_data_dev/
115 changes: 115 additions & 0 deletions barcodes-repo/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>gov.watertown-ny</groupId>
<artifactId>barcodes-repo</artifactId>
<version>1.0-SNAPSHOT</version>
<name>barcodes-repo Repository AMP project</name>
<packaging>amp</packaging>
<description>Manages the lifecycle of the barcodes-repo Repository AMP (Alfresco Module Package)</description>

<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-parent</artifactId>
<version>2.1.0</version>
</parent>

<!--
SDK properties have sensible defaults in the SDK parent,
but you can override the properties below to use another version.
For more available properties see the alfresco-sdk-parent POM.
-->
<properties>
<!-- The following are default values for data location and Alfresco Community version.
Uncomment if you need to change (Note. current default version for Enterprise edition is 5.0.1)
<alfresco.version>5.0.d</alfresco.version>
<alfresco.data.location>alf_data_dev</alfresco.data.location> -->

<!-- This control the root logging level for all apps uncomment and change, defaults to WARN
<app.log.root.level>WARN</app.log.root.level>
-->

<!-- Set the enviroment to use, this controls which properties will be picked in src/test/properties
for embedded run, defaults to the 'local' environment. See SDK Parent POM for more info.
<env>local</env>
-->
</properties>

<!-- Here we realize the connection with the Alfresco selected platform
(e.g.version and edition) -->
<dependencyManagement>
<dependencies>
<!-- Setup what versions of the different Alfresco artifacts that will be used (depends on alfresco.version),
so we don't have to specify version in any of the dependency definitions in our POM.
For more info see:
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies
-->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-platform-distribution</artifactId>
<version>${alfresco.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

</dependencies>
</dependencyManagement>

<dependencies>
<!-- Following dependencies are needed for compiling Java code in src/main/java;
<scope>provided</scope> is inherited for each of the following;
for more info, please refer to alfresco-platform-distribution POM -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-repository</artifactId>
</dependency>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>javase</artifactId>
<version>3.2.0</version>
</dependency>
</dependencies>

<profiles>
<!--
Brings in the extra Enterprise specific repository classes,
if the 'enterprise' profile has been activated, needs to be activated manually.
-->
<profile>
<id>enterprise</id>
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-enterprise-repository</artifactId>
<version>${alfresco.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</profile>

<!--
If the 'amp-to-war' profile is enabled then make sure to bring in the alfresco-rad module,
which has the H2 scripts and other RAD features.

TODO: TO INVESTIGATE: This dependency is already defined in the parent SDK pom in the 'amp-to-war' profile
but this does not work, it is not include...
-->
<profile>
<id>amp-to-war</id>
<dependencies>
<dependency>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-rad</artifactId>
<version>${maven.alfresco.version}</version>
</dependency>

</dependencies>
</profile>
</profiles>
</project>
20 changes: 20 additions & 0 deletions barcodes-repo/run.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Dev environment startup script for Alfresco Community. ::
:: ::
:: Downloads the spring-loaded lib if not existing and ::
:: runs the Repo AMP applied to Alfresco WAR. ::
:: Note. the Share WAR is not deployed. ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off

set springloadedfile=C:\Users\bphelps\.m2\repository\org\springframework\springloaded\1.2.3.RELEASE\springloaded-1.2.3.RELEASE.jar

if not exist %springloadedfile% (
echo %springloadedfile%
mvn validate -Psetup
)

set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify -Xms256m -Xmx2G

mvn integration-test -Pamp-to-war -nsu
:: mvn integration-test -Pamp-to-war
11 changes: 11 additions & 0 deletions barcodes-repo/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
# Downloads the spring-loaded lib if not existing and
# runs the Repo AMP applied to Alfresco WAR.
# Note. the Share WAR is not deployed.
springloadedfile=~/.m2/repository/org/springframework/springloaded/1.2.3.RELEASE/springloaded-1.2.3.RELEASE.jar

if [ ! -f $springloadedfile ]; then
mvn validate -Psetup
fi

MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G" mvn integration-test -Pamp-to-war
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## This Alfresco Repo Configuration file should be used for custom properties that are introduced by this module.
## Define default values for all properties here.
## System Administrators can override these values in environment specific configurations in
## alfresco/tomcat/shared/classes/alfresco-global.properties.
##
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version='1.0' encoding='UTF-8'?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

<!-- The bootstrap-context.xml file is used for patch definitions, importers,
workflow, and loading custom content models. -->


<!-- Registration of new models -->
<bean id="gov.watertown_ny.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/module/${project.artifactId}/model/content-model.xml</value>
<value>alfresco/module/${project.artifactId}/model/workflow-model.xml</value>
</list>
</property>
</bean>



</beans>
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
-->
<beans>

<!-- A simple class that is initialized by Spring -->

<!-- A simple module component that will be executed once -->

<bean id="get-barcode" class="gov.watertown_ny.barcodes.executer.BarCodeActionExecuter" parent="action-executer">
<property name="nodeService">
<ref bean="NodeService" />
</property>
<property name="contentService">
<ref bean="ContentService" />
</property>
</bean>
<bean id="${project.artifactId}_actionResourceBundles" parent="actionResourceBundles">
<property name="resourceBundles">
<list>
<value>alfresco.module.${project.artifactId}.messages.barcodesactions</value>
</list>
</property>
</bean>

</beans>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
-->
<beans>

</beans>
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.
#-----------------------------------------------------------------------
# ${artifactId} module log4j.properties
#
# NOTE
# ----
# Log4j uses the following logging levels:
# debug,info,warn,error,fatal
#
# To set the logging level of {fullClassName} to {loglevel},
# add a line to this file of the following form:
#
# log4j.logger.{fullClassName}={loglevel}
#
# For example, to make 'com.example.MyExample' produce 'debug'
# logs, add a line like this:
#
# log4j.logger.com.example.MyExample=debug
#
#
# WARNING
# -------
# Log properties in this log4j.properties file override/augment
# those in the webapp's main log4j.properties.
#
#-----------------------------------------------------------------------
log4j.logger.org.alfresco.demoamp.DemoComponent=${module.log.level}
log4j.logger.gov.watertown_ny.barcodes.executer.BarCodeActionExecuter=info
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
get-barcode.title=Get Barcode
get-barcode.description=Scans document for barcode and places text value in the barCodeText field
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<model name="bcode:barcode" xmlns="http://www.alfresco.org/model/dictionary/1.0">

<!-- Optional meta-data about the model -->
<description>Document Model for Repo Extension Barcode</description>
<author>Brian Phelps</author>
<version>1.0</version>

<imports>
<!-- Import Alfresco Dictionary Definitions -->
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<!-- Import Alfresco Content Domain Model Definitions -->
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
<!-- Import Alfresco System Model Definitions -->
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/>
</imports>

<!-- Custom namespace for your domain -->
<namespaces>
<namespace uri="http://www.watertown-ny.gov/model/bcode/1.0" prefix="bcode"/>
</namespaces>
<aspects>

<aspect name="bcode:barCoded">
<title>Bar Coded</title>
<description>Document contains or has been checked for existing bar code</description>
<properties>
<property name="bcode:barCodeText">
<title>Data contained in found bar code</title>
<type>d:text</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
<index enabled="false"></index>
</property>
</properties>
<associations/>
<overrides/>
<mandatory-aspects/>
</aspect>
</aspects>
<!-- ===============================================================================================================
Constraints, Types, and Aspects go here...
-->
</model>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<model name="myw:workflowModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!-- Optional meta-data about the model -->
<description>Workflow Model for Repo Extension X</description>
<author>My Name</author>
<version>1.0</version>

<imports>
<!-- Import Alfresco Dictionary Definitions -->
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<!-- Import Alfresco Content Domain Model Definitions -->
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
<!-- Import Alfresco Workflow Model Definitions -->
<import uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm"/>
</imports>

<!-- Custom namespace for your domain -->
<namespaces>
<namespace uri="http://www.mycompany.com/model/workflow/1.0" prefix="myw"/>
</namespaces>

<!-- ===============================================================================================================
Constraints, Types, and Aspects go here...
-->
</model>

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version='1.0' encoding='UTF-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements.
The ASF licenses this file to You 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.
-->
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>
<!-- This is filtered by Maven at build time, so that module name is single sourced. -->
<import resource="classpath:alfresco/module/${project.artifactId}/context/service-context.xml" />
<import resource="classpath:alfresco/module/${project.artifactId}/context/bootstrap-context.xml" />
<import resource="classpath:alfresco/module/${project.artifactId}/context/webscript-context.xml" />

</beans>
Loading

0 comments on commit a174b9e

Please sign in to comment.