/** * Creates a new copy resource info container.<p> * * If target is <code>null</code>, the macro {@link A_CmsResourceType#MACRO_RESOURCE_FOLDER_PATH} is used as default. * If type is <code>null</code>, the copy type {@link CmsResource#COPY_AS_NEW} is used as default.<p> * * @param source the source resource * @param target the target resource (may contain macros) * @param type the type of the copy, for example "as new", "as sibling" etc */ public CmsConfigurationCopyResource(String source, String target, String type) { m_source = source; if (target == null) { m_target = CmsMacroResolver.formatMacro(A_CmsResourceType.MACRO_RESOURCE_FOLDER_PATH); m_targetWasNull = true; } else { m_target = target; } m_type = CmsResource.COPY_AS_NEW; if (type != null) { if (type.equalsIgnoreCase(CmsConfigurationCopyResource.COPY_AS_SIBLING)) { m_type = CmsResource.COPY_AS_SIBLING; } else if (type.equalsIgnoreCase(CmsConfigurationCopyResource.COPY_AS_PRESERVE)) { m_type = CmsResource.COPY_PRESERVE_SIBLING; } } else { m_typeWasNull = true; } }
/** * Creates a new copy resource info container.<p> * * If target is <code>null</code>, the macro {@link A_CmsResourceType#MACRO_RESOURCE_FOLDER_PATH} is used as default. * If type is <code>null</code>, the copy type {@link CmsResource#COPY_AS_NEW} is used as default.<p> * * @param source the source resource * @param target the target resource (may contain macros) * @param type the type of the copy, for example "as new", "as sibling" etc */ public CmsConfigurationCopyResource(String source, String target, String type) { m_source = source; if (target == null) { m_target = CmsMacroResolver.formatMacro(A_CmsResourceType.MACRO_RESOURCE_FOLDER_PATH); m_targetWasNull = true; } else { m_target = target; } m_type = CmsResource.COPY_AS_NEW; if (type != null) { if (type.equalsIgnoreCase(CmsConfigurationCopyResource.COPY_AS_SIBLING)) { m_type = CmsResource.COPY_AS_SIBLING; } else if (type.equalsIgnoreCase(CmsConfigurationCopyResource.COPY_AS_PRESERVE)) { m_type = CmsResource.COPY_PRESERVE_SIBLING; } } else { m_typeWasNull = true; } }
/** * @see org.opencms.xml.types.I_CmsXmlSchemaType#getSchemaDefinition() */ public String getSchemaDefinition() { StringBuffer result = new StringBuffer(256); // create a named decimal simpletype (for long values) result.append("<xsd:simpleType name=\"ocmsdatedec\"><xsd:restriction base=\"xsd:decimal\">"); result.append("</xsd:restriction></xsd:simpleType>"); // create a simpletype containing the "currenttime" macro result.append("<xsd:simpleType name=\"ocmsdatemacro\">"); result.append("<xsd:restriction base=\"xsd:string\">"); result.append("<xsd:enumeration value=\""); result.append(CmsMacroResolver.formatMacro(CmsMacroResolver.KEY_CURRENT_TIME)); result.append("\"/>"); result.append("</xsd:restriction></xsd:simpleType>"); // unify the simpletypes for the datetime value result.append("<xsd:simpleType name=\""); result.append(TYPE_NAME); result.append("\"><xsd:union memberTypes=\"ocmsdatedec ocmsdatemacro\"/></xsd:simpleType>"); return result.toString(); }
/** * @see org.opencms.xml.types.I_CmsXmlSchemaType#getSchemaDefinition() */ public String getSchemaDefinition() { StringBuffer result = new StringBuffer(256); // create a named decimal simpletype (for long values) result.append("<xsd:simpleType name=\"ocmsdatedec\"><xsd:restriction base=\"xsd:decimal\">"); result.append("</xsd:restriction></xsd:simpleType>"); // create a simpletype containing the "currenttime" macro result.append("<xsd:simpleType name=\"ocmsdatemacro\">"); result.append("<xsd:restriction base=\"xsd:string\">"); result.append("<xsd:enumeration value=\""); result.append(CmsMacroResolver.formatMacro(CmsMacroResolver.KEY_CURRENT_TIME)); result.append("\"/>"); result.append("</xsd:restriction></xsd:simpleType>"); // unify the simpletypes for the datetime value result.append("<xsd:simpleType name=\""); result.append(TYPE_NAME); result.append("\"><xsd:union memberTypes=\"ocmsdatedec ocmsdatemacro\"/></xsd:simpleType>"); return result.toString(); }
int startIndex = matcher.start(1); int endIndex = matcher.end(3); String number = CmsMacroResolver.formatMacro(matcher.group(2));
int startIndex = matcher.start(1); int endIndex = matcher.end(3); String number = CmsMacroResolver.formatMacro(matcher.group(2));
tag.setAttribute(attr, CmsMacroResolver.formatMacro(link.getName()));
tag.setAttribute(attr, CmsMacroResolver.formatMacro(link.getName()));
return CmsMacroResolver.formatMacro(CmsImportExportManager.TimestampMode.FILETIME.toString()); case IMPORTTIME: return CmsMacroResolver.formatMacro(CmsImportExportManager.TimestampMode.IMPORTTIME.toString()); case VFSTIME: default: