You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

StagingRepositoryFeature.java 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. package org.apache.archiva.repository.features;
  2. /*
  3. * Licensed to the Apache Software Foundation (ASF) under one
  4. * or more contributor license agreements. See the NOTICE file
  5. * distributed with this work for additional information
  6. * regarding copyright ownership. The ASF licenses this file
  7. * to you under the Apache License, Version 2.0 (the
  8. * "License"); you may not use this file except in compliance
  9. * with the License. You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing,
  14. * software distributed under the License is distributed on an
  15. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  16. * KIND, either express or implied. See the License for the
  17. * specific language governing permissions and limitations
  18. * under the License.
  19. */
  20. import org.apache.archiva.repository.ManagedRepository;
  21. /**
  22. * This feature provides some information about staging repositories.
  23. *
  24. */
  25. public class StagingRepositoryFeature implements RepositoryFeature<StagingRepositoryFeature> {
  26. public static final String STAGING_REPO_POSTFIX = "-stage";
  27. private ManagedRepository stagingRepository = null;
  28. private boolean stageRepoNeeded = false;
  29. public StagingRepositoryFeature() {
  30. }
  31. public StagingRepositoryFeature(ManagedRepository stagingRepository, boolean stageRepoNeeded) {
  32. this.stagingRepository = stagingRepository;
  33. this.stageRepoNeeded = stageRepoNeeded;
  34. }
  35. /**
  36. * Returns the staging repository, if it exists.
  37. *
  38. * @return The staging repository, null if not set.
  39. *
  40. */
  41. public ManagedRepository getStagingRepository() {
  42. return stagingRepository;
  43. }
  44. /**
  45. * Sets the staging repository.
  46. *
  47. * @param stagingRepository
  48. */
  49. public void setStagingRepository(ManagedRepository stagingRepository) {
  50. this.stagingRepository = stagingRepository;
  51. }
  52. /**
  53. * Returns true, if a staging repository is needed by this repository.
  54. * @return True, if staging repository is needed, otherwise false.
  55. */
  56. public boolean isStageRepoNeeded() {
  57. return stageRepoNeeded;
  58. }
  59. /**
  60. * Sets the flag for needed staging repository.
  61. *
  62. * @param stageRepoNeeded
  63. */
  64. public void setStageRepoNeeded(boolean stageRepoNeeded) {
  65. this.stageRepoNeeded = stageRepoNeeded;
  66. }
  67. }