1 17 package org.alfresco.repo.version.common; 18 19 import java.util.Collection ; 20 21 import org.alfresco.repo.version.VersionModel; 22 import org.alfresco.service.cmr.version.ReservedVersionNameException; 23 24 29 public class VersionUtil 30 { 31 34 public static final String [] RESERVED_PROPERTY_NAMES = new String []{ 35 VersionModel.PROP_CREATED_DATE, 36 VersionModel.PROP_FROZEN_NODE_ID, 37 VersionModel.PROP_FROZEN_NODE_STORE_ID, 38 VersionModel.PROP_FROZEN_NODE_STORE_PROTOCOL, 39 VersionModel.PROP_FROZEN_NODE_TYPE, 40 VersionModel.PROP_FROZEN_ASPECTS, 41 VersionModel.PROP_VERSION_LABEL, 42 VersionModel.PROP_VERSION_NUMBER}; 43 44 52 public static void checkVersionPropertyNames(Collection <String > names) 53 throws ReservedVersionNameException 54 { 55 for (String name : RESERVED_PROPERTY_NAMES) 56 { 57 if (names.contains(name) == true) 58 { 59 throw new ReservedVersionNameException(name); 60 } 61 } 62 } 63 } 64 | Popular Tags |