@Override public String[] getPropertyNames() { // Obtain all the property names String[] contextNames = HttpTemplateSectionSource.this.getContext().getPropertyNames(); // Filter to just this extension's properties List<String> extensionNames = new LinkedList<String>(); for (String contextName : contextNames) { if (contextName.startsWith(this.extensionPropertyPrefix)) { // Add the extension property name String extensionName = contextName.substring(this.extensionPropertyPrefix.length()); extensionNames.add(extensionName); } } // Return the extension names return extensionNames.toArray(new String[extensionNames.size()]); }
@Override public Properties getProperties() { // Obtain all the properties Properties properties = new Properties(); // Filter to just this extension's properties String[] contextNames = HttpTemplateSectionSource.this.getContext().getPropertyNames(); for (String contextName : contextNames) { if (contextName.startsWith(this.extensionPropertyPrefix)) { // Add the extension property name String extensionName = contextName.substring(this.extensionPropertyPrefix.length()); String value = HttpTemplateSectionSource.this.getContext().getProperty(contextName); properties.setProperty(extensionName, value); } } // Return the properties return properties; }
@Override public void sourceSection(SectionDesigner designer, SectionSourceContext context) throws Exception { // Create the Servlet Bridge dependency SectionObject servletBridge = designer.addSectionObject( "SERVLET_BRIDGE", ServletBridge.class.getName()); // Create the non-handled task String nonHandledInputName = context.getSectionLocation(); this.addServletResource(nonHandledInputName, null, servletBridge, designer); // Create the Servlet container resource tasks Set<String> registeredResources = new HashSet<String>(); for (String inputName : context.getPropertyNames()) { // Obtain the request dispatcher path String requestDispatcherPath = context.getProperty(inputName); // Ensure only register the resource once if (registeredResources.contains(requestDispatcherPath)) { continue; } // Add Servlet Resource this.addServletResource(inputName, requestDispatcherPath, servletBridge, designer); // Resource registered registeredResources.add(requestDispatcherPath); } }
for (String propertyName : context.getPropertyNames()) { if (propertyName.startsWith(PROPERTY_URL_LINK_PREFIX)) {
for (String name : context.getPropertyNames()) { if (name.startsWith(PROPERTY_RESOURCE_PREFIX)) {
for (String name : context.getPropertyNames()) { if (name.startsWith(PROPERTY_MANUAL_PUBLISH_URI_PREFIX)) {
NEXT_PROPERTY: for (String propertyName : context.getPropertyNames()) { if (propertyName.startsWith(PROPERTY_LINK_SECURE_PREFIX)) {
NEXT_PROPERTY: for (String propertyName : context.getPropertyNames()) { if (propertyName.startsWith(HttpTemplateWorkSource.PROPERTY_LINK_SECURE_PREFIX)) {