aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-base/archiva-configuration/src
diff options
context:
space:
mode:
Diffstat (limited to 'archiva-base/archiva-configuration/src')
-rw-r--r--archiva-base/archiva-configuration/src/main/mdo/configuration.mdo42
1 files changed, 41 insertions, 1 deletions
diff --git a/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo b/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo
index 6de28dc79..8ea11bd2b 100644
--- a/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo
+++ b/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo
@@ -257,7 +257,47 @@
</description>
<defaultValue>0 0,30 * * * ?</defaultValue>
</field>
- </fields>
+ </fields>
+ <codeSegments>
+ <codeSegment>
+ <version>1.0.0+</version>
+ <code><![CDATA[
+ /**
+ * Utility method to help determine if configuration refers to a remote repository.
+ *
+ * @return true if configuration belongs to a remote repository.
+ * (note: false does not automatically mean this is a managed repository,
+ * you must use {@link #isManaged()} to test for that.)
+ */
+ public boolean isRemote()
+ {
+ if ( this.url == null )
+ {
+ return false;
+ }
+
+ return !this.url.startsWith( "file" );
+ }
+
+ /**
+ * Utility method to help determine if configuration refers to a managed repository.
+ *
+ * @return true if configuration belongs to a managed repository.
+ * (note: false does not automatically mean this is a remote repository,
+ * you must use {@link #isRemote()} to test for that.)
+ */
+ public boolean isManaged()
+ {
+ if ( this.url == null )
+ {
+ return false;
+ }
+
+ return this.url.startsWith( "file" );
+ }
+ ]]></code>
+ </codeSegment>
+ </codeSegments>
</class>
<!--