mirror of https://github.com/apache/archiva.git
Adjusting Metadata content.
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/branches/archiva-jpox-database-refactor@529614 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8e01424163
commit
e37599c559
|
@ -247,6 +247,21 @@ public class ArchivaModelCloner
|
||||||
return cloned;
|
return cloned;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static SnapshotVersion clone( SnapshotVersion snapshotVersion )
|
||||||
|
{
|
||||||
|
if ( snapshotVersion == null )
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
SnapshotVersion cloned = new SnapshotVersion();
|
||||||
|
|
||||||
|
cloned.setTimestamp( snapshotVersion.getTimestamp() );
|
||||||
|
cloned.setBuildNumber( snapshotVersion.getBuildNumber() );
|
||||||
|
|
||||||
|
return cloned;
|
||||||
|
}
|
||||||
|
|
||||||
public static VersionedReference clone( VersionedReference versionedReference )
|
public static VersionedReference clone( VersionedReference versionedReference )
|
||||||
{
|
{
|
||||||
if ( versionedReference == null )
|
if ( versionedReference == null )
|
||||||
|
@ -506,4 +521,9 @@ public class ArchivaModelCloner
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List cloneAvailableVersions( List availableVersions )
|
||||||
|
{
|
||||||
|
return cloneSimpleStringList( availableVersions );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ package org.apache.maven.archiva.model.jpox;
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.apache.maven.archiva.model.AbstractProjectKey;
|
import org.apache.maven.archiva.model.AbstractVersionedKey;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ import java.io.Serializable;
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
public class ArchivaRepositoryMetadataKey
|
public class ArchivaRepositoryMetadataKey
|
||||||
extends AbstractProjectKey
|
extends AbstractVersionedKey
|
||||||
implements Serializable
|
implements Serializable
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -475,6 +475,16 @@
|
||||||
</codeSegment>
|
</codeSegment>
|
||||||
</codeSegments>
|
</codeSegments>
|
||||||
</class>
|
</class>
|
||||||
|
|
||||||
|
<!-- _______________________________________________________________
|
||||||
|
__ __ _ _ _
|
||||||
|
| \/ | ___| |_ __ _ __| | __ _| |_ __ _
|
||||||
|
| |\/| |/ _ \ __/ _` |/ _` |/ _` | __/ _` |
|
||||||
|
| | | | __/ || (_| | (_| | (_| | || (_| |
|
||||||
|
|_| |_|\___|\__\__,_|\__,_|\__,_|\__\__,_|
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
<class stash.storable="true"
|
<class stash.storable="true"
|
||||||
jpox.use-identifiers-as-primary-key="false"
|
jpox.use-identifiers-as-primary-key="false"
|
||||||
jpox.identity-type="application"
|
jpox.identity-type="application"
|
||||||
|
@ -492,7 +502,7 @@
|
||||||
<type>String</type>
|
<type>String</type>
|
||||||
<required>true</required>
|
<required>true</required>
|
||||||
<description>
|
<description>
|
||||||
The Group ID of the repository content.
|
The Group ID of the metadata.
|
||||||
</description>
|
</description>
|
||||||
</field>
|
</field>
|
||||||
<field jpox.primary-key="true"
|
<field jpox.primary-key="true"
|
||||||
|
@ -504,7 +514,29 @@
|
||||||
<type>String</type>
|
<type>String</type>
|
||||||
<required>true</required>
|
<required>true</required>
|
||||||
<description>
|
<description>
|
||||||
The Artifact ID of the repository content.
|
The Artifact ID of the metadata.
|
||||||
|
</description>
|
||||||
|
</field>
|
||||||
|
<field jpox.primary-key="true"
|
||||||
|
jpox.value-strategy="off"
|
||||||
|
jpox.persistence-modifier="persistent">
|
||||||
|
<name>version</name>
|
||||||
|
<identifier>true</identifier>
|
||||||
|
<version>1.0.0+</version>
|
||||||
|
<type>String</type>
|
||||||
|
<required>true</required>
|
||||||
|
<description>
|
||||||
|
The Version of the metadata.
|
||||||
|
</description>
|
||||||
|
</field>
|
||||||
|
<field>
|
||||||
|
<name>latestVersion</name>
|
||||||
|
<identifier>false</identifier>
|
||||||
|
<version>1.0.0+</version>
|
||||||
|
<required>false</required>
|
||||||
|
<type>String</type>
|
||||||
|
<description>
|
||||||
|
The latest version id.
|
||||||
</description>
|
</description>
|
||||||
</field>
|
</field>
|
||||||
<field>
|
<field>
|
||||||
|
@ -517,6 +549,19 @@
|
||||||
The released version id.
|
The released version id.
|
||||||
</description>
|
</description>
|
||||||
</field>
|
</field>
|
||||||
|
<field>
|
||||||
|
<name>snapshotVersion</name>
|
||||||
|
<identifier>false</identifier>
|
||||||
|
<version>1.0.0+</version>
|
||||||
|
<required>false</required>
|
||||||
|
<description>
|
||||||
|
The snapshot version id.
|
||||||
|
</description>
|
||||||
|
<association>
|
||||||
|
<type>SnapshotVersion</type>
|
||||||
|
<multiplicity>1</multiplicity>
|
||||||
|
</association>
|
||||||
|
</field>
|
||||||
<field>
|
<field>
|
||||||
<name>availableVersions</name>
|
<name>availableVersions</name>
|
||||||
<identifier>false</identifier>
|
<identifier>false</identifier>
|
||||||
|
@ -531,17 +576,27 @@
|
||||||
</description>
|
</description>
|
||||||
</field>
|
</field>
|
||||||
<field>
|
<field>
|
||||||
<name>lastModified</name>
|
<name>lastUpdated</name>
|
||||||
|
<identifier>false</identifier>
|
||||||
|
<version>1.0.0+</version>
|
||||||
|
<type>String</type>
|
||||||
|
<required>true</required>
|
||||||
|
<description>
|
||||||
|
When the metadata was last updated.
|
||||||
|
</description>
|
||||||
|
</field>
|
||||||
|
<field>
|
||||||
|
<name>fileLastModified</name>
|
||||||
<identifier>false</identifier>
|
<identifier>false</identifier>
|
||||||
<version>1.0.0+</version>
|
<version>1.0.0+</version>
|
||||||
<type>Date</type>
|
<type>Date</type>
|
||||||
<required>true</required>
|
<required>true</required>
|
||||||
<description>
|
<description>
|
||||||
The Last Modified Timestamp of this artifact.
|
The Last Modified Timestamp of this file.
|
||||||
</description>
|
</description>
|
||||||
</field>
|
</field>
|
||||||
<field jpox.column="FILE_SIZE">
|
<field jpox.column="FILE_SIZE">
|
||||||
<name>size</name>
|
<name>fileSize</name>
|
||||||
<identifier>false</identifier>
|
<identifier>false</identifier>
|
||||||
<version>1.0.0+</version>
|
<version>1.0.0+</version>
|
||||||
<type>long</type>
|
<type>long</type>
|
||||||
|
@ -571,8 +626,54 @@
|
||||||
</description>
|
</description>
|
||||||
</field>
|
</field>
|
||||||
</fields>
|
</fields>
|
||||||
|
<codeSegments>
|
||||||
|
<codeSegment>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<code>
|
||||||
|
public void updateTimestamp()
|
||||||
|
{
|
||||||
|
setLastUpdatedTimestamp( new java.util.Date() );
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastUpdatedTimestamp( java.util.Date date )
|
||||||
|
{
|
||||||
|
java.util.TimeZone timezone = java.util.TimeZone.getTimeZone( "UTC" );
|
||||||
|
java.text.DateFormat fmt = new java.text.SimpleDateFormat( "yyyyMMddHHmmss" );
|
||||||
|
fmt.setTimeZone( timezone );
|
||||||
|
setLastUpdated( fmt.format( date ) );
|
||||||
|
}
|
||||||
|
</code>
|
||||||
|
</codeSegment>
|
||||||
|
</codeSegments>
|
||||||
</class>
|
</class>
|
||||||
|
|
||||||
|
<class stash.storable="true"
|
||||||
|
jpox.table="REPOSITORY_METADATA_SNAPSHOTS">
|
||||||
|
<name>SnapshotVersion</name>
|
||||||
|
<description>The Snapshot Version</description>
|
||||||
|
<version>1.0.0+</version>
|
||||||
|
<fields>
|
||||||
|
<field jpox.column="VERSION_TIMESTAMP">
|
||||||
|
<name>timestamp</name>
|
||||||
|
<type>String</type>
|
||||||
|
<identifier>false</identifier>
|
||||||
|
<required>true</required>
|
||||||
|
<description>
|
||||||
|
The unique timestamp for the snapshot version.
|
||||||
|
</description>
|
||||||
|
</field>
|
||||||
|
<field>
|
||||||
|
<name>buildNumber</name>
|
||||||
|
<type>int</type>
|
||||||
|
<identifier>false</identifier>
|
||||||
|
<required>true</required>
|
||||||
|
<description>The incremental build number of the snapshot.</description>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
</class>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- _______________________________________________________________
|
<!-- _______________________________________________________________
|
||||||
____ __
|
____ __
|
||||||
| _ \ ___ / _| ___ _ __ ___ _ __ ___ ___ ___
|
| _ \ ___ / _| ___ _ __ ___ _ __ ___ ___ ___
|
||||||
|
|
Loading…
Reference in New Issue