diff --git a/network/src/main/java/de/muehlencord/shared/network/PortInformation.java b/network/src/main/java/de/muehlencord/shared/network/PortInformation.java index 06f8f6b..3787a56 100644 --- a/network/src/main/java/de/muehlencord/shared/network/PortInformation.java +++ b/network/src/main/java/de/muehlencord/shared/network/PortInformation.java @@ -26,9 +26,3 @@ public class PortInformation { } -/** - * History: - * - * $$Log$$ - * - */ diff --git a/sharepoint/api/pom.xml b/sharepoint/api/pom.xml deleted file mode 100644 index eae08dc..0000000 --- a/sharepoint/api/pom.xml +++ /dev/null @@ -1,317 +0,0 @@ - - - 4.0.0 - - - de.muehlencord.shared - shared-sharepoint - 1.2-SNAPSHOT - - - de.muehlencord.shared.sharepoint - sharepoint-api - - - shared-sharepoint-api - - - - - - com.helger.maven - jaxws-maven-plugin - - ${project.build.directory}/generated-sources/jaxws-wsimport - - - - - authentication2010 - generate-sources - - wsimport - - - com.microsoft.schemas.sharepoint.soap.authentication - ${basedir}/src/main/resources/2010/wsdl - - authentication.wsdl - - - -Djavax.xml.accessExternalDTD=all - -Djavax.xml.accessExternalSchema=all - - true - - - - alerts2010 - generate-sources - - wsimport - - - com.microsoft.schemas.sharepoint.soap.alerts - ${basedir}/src/main/resources/2010/wsdl - - alerts.wsdl - - - -Djavax.xml.accessExternalDTD=all - -Djavax.xml.accessExternalSchema=all - - true - - - - sites2010 - generate-sources - - wsimport - - - com.microsoft.schemas.sharepoint.soap.sites - ${basedir}/src/main/resources/2010/wsdl - - sites.wsdl - - - -Djavax.xml.accessExternalDTD=all - -Djavax.xml.accessExternalSchema=all - - true - - - - webs2010 - generate-sources - - wsimport - - - com.microsoft.schemas.sharepoint.soap.webs - ${basedir}/src/main/resources/2010/wsdl - - webs.wsdl - - - -Djavax.xml.accessExternalDTD=all - -Djavax.xml.accessExternalSchema=all - - true - - - - lists2010 - generate-sources - - wsimport - - - com.microsoft.schemas.sharepoint.soap.lists - ${basedir}/src/main/resources/2010/wsdl - - lists.wsdl - - - -Djavax.xml.accessExternalDTD=all - -Djavax.xml.accessExternalSchema=all - - true - - - - search2010 - generate-sources - - wsimport - - - com.microsoft.schemas.sharepoint.soap.search - ${basedir}/src/main/resources/2010/wsdl - - search.wsdl - - - -Djavax.xml.accessExternalDTD=all - -Djavax.xml.accessExternalSchema=all - - true - - - - usergroup2010 - generate-sources - - wsimport - - - com.microsoft.schemas.sharepoint.soap.usergroup - ${basedir}/src/main/resources/2010/wsdl - - usergroup.wsdl - - - -Djavax.xml.accessExternalDTD=all - -Djavax.xml.accessExternalSchema=all - - true - - - - - - javax.annotation - javax.annotation-api - 1.3.2 - - - javax.xml.bind - jaxb-api - 2.3.1 - - - javax.xml.ws - jaxws-api - 2.3.1 - - - javax.jws - javax.jws-api - 1.1 - - - - - - - org.codehaus.mojo - jaxb2-maven-plugin - - false - true - false - - - - - - batch - - xjc - - - - de.muehlencord.shared.sharepoint.api.batch - - ${project.build.directory}/generated-sources/jaxb/ - true - - src/main/resources/xsd/dummy.xsd - src/main/resources/xsd/batch.xsd - - - - - - - lists - - xjc - - - - de.muehlencord.shared.sharepoint.api.lists - - ${project.build.directory}/generated-sources/jaxb/ - true - - ${basedir}/src/main/resources/xsd/lists.xsd - - false - - - - - - usergroup2010 - - xjc - - - - de.muehlencord.shared.sharepoint.api.usergroup - - ${project.build.directory}/generated-sources/jaxb/ - true - true - - ${basedir}/src/main/resources/xsd/usergroup.xsd - - false - - - - - - org.glassfish.jaxb - jaxb-xjc - 2.3.2 - - - com.sun.activation - jakarta.activation - 1.2.1 - - - - - - - - org.junit.jupiter - junit-jupiter-engine - - - org.apache.commons - commons-lang3 - - - de.muehlencord.shared - shared-util - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - test - - - - - javax.xml.bind - jaxb-api - 2.3.1 - - - com.sun.xml.bind - jaxb-core - 2.3.0 - - - com.sun.xml.bind - jaxb-impl - 2.3.2 - - - com.sun.activation - jakarta.activation - 1.2.1 - - - - \ No newline at end of file diff --git a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/AbstractAuthenticator.java b/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/AbstractAuthenticator.java deleted file mode 100644 index 67a1b93..0000000 --- a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/AbstractAuthenticator.java +++ /dev/null @@ -1,49 +0,0 @@ -package de.muehlencord.shared.sharepoint.api; - -import java.net.Authenticator; - -/** - * - * @author jomu - */ -public class AbstractAuthenticator extends Authenticator { - - String domain; - String user; - String password; - - public AbstractAuthenticator(String user, String password) { - super(); - this.domain = null; - this.user = user; - this.password = password; - } - - public AbstractAuthenticator(String domain, String user, String password) { - super(); - this.domain = domain; - this.user = user; - this.password = password; - } - - public String getDomain() { - return domain; - } - - public String getUser() { - return user; - } - - public String getPassword() { - return password; - } - - public String getUserName() { - String userName = user; - if (domain != null && !domain.isEmpty()) { - userName = domain + "\\" + user; - } - return userName; - } - -} diff --git a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/AbstractSpJaxbObject.java b/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/AbstractSpJaxbObject.java deleted file mode 100644 index 9ca34a0..0000000 --- a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/AbstractSpJaxbObject.java +++ /dev/null @@ -1,40 +0,0 @@ -package de.muehlencord.shared.sharepoint.api; - -import java.io.IOException; -import java.io.StringReader; -import javax.xml.bind.JAXBException; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import org.w3c.dom.Document; -import org.w3c.dom.Node; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; - -/** - * - * @author joern.muehlencord - */ -public abstract class AbstractSpJaxbObject extends SPObject { - - public AbstractSpJaxbObject(SPContext context) { - super(context); - } - - public static Node createSharePointCAMLNode(String xmlString) throws ParserConfigurationException, SAXException, IOException, JAXBException { - DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); - documentBuilderFactory.setValidating(false); - DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder(); - Document document = documentBuilder.parse(new InputSource(new StringReader(xmlString))); - Node node = document.getDocumentElement(); - return node; - } - -} - -/** - * History: - * - * $$Log$$ - * - */ diff --git a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/NtlmAuthenticator.java b/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/NtlmAuthenticator.java deleted file mode 100644 index 7372799..0000000 --- a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/NtlmAuthenticator.java +++ /dev/null @@ -1,24 +0,0 @@ -package de.muehlencord.shared.sharepoint.api; - -import java.net.PasswordAuthentication; - -/** - * - * @author jomu - */ -public class NtlmAuthenticator extends AbstractAuthenticator { - - public NtlmAuthenticator(String user, String password) { - super(user, password); - } - - public NtlmAuthenticator(String domain, String user, String password) { - super(domain, user, password); - } - - @Override - public PasswordAuthentication getPasswordAuthentication() { - return new PasswordAuthentication(getUserName(), password.toCharArray()); - } - -} diff --git a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/SPContext.java b/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/SPContext.java deleted file mode 100644 index 0981927..0000000 --- a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/SPContext.java +++ /dev/null @@ -1,82 +0,0 @@ -package de.muehlencord.shared.sharepoint.api; - -import java.net.Authenticator; -import java.net.URL; -import java.security.KeyManagementException; -import java.security.NoSuchAlgorithmException; -import java.security.cert.X509Certificate; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; - -/** - * - * @author jomu - */ -public class SPContext { - - private URL siteURL; - private AbstractAuthenticator authenticator; - private SPVersion spVersion; - private boolean trustAllCerts; - - public SPContext(URL siteURL, AbstractAuthenticator authenticator, SPVersion spVersion) throws NoSuchAlgorithmException, KeyManagementException { - this.siteURL = siteURL; - this.authenticator = authenticator; - this.spVersion = spVersion; - this.trustAllCerts = false; - configure(); - } - - public SPContext(URL siteURL, AbstractAuthenticator authenticator, SPVersion spVersion, boolean trustAllCerts) throws NoSuchAlgorithmException, KeyManagementException { - this.siteURL = siteURL; - this.authenticator = authenticator; - this.spVersion = spVersion; - this.trustAllCerts = trustAllCerts; - configure(); - } - - private void configure() throws NoSuchAlgorithmException, KeyManagementException { - Authenticator.setDefault(authenticator); - // allow SSL connections, even if SSL chain is not complete - // e.g. needed for self signed certificates - // TODO create documentation how to install this cert into the java certificate chain. - if (trustAllCerts) { - // Trust all SSLs, create a trust manager that does not validate certificate chains - TrustManager[] trustManager = new TrustManager[]{new X509TrustManager() { - @Override - public java.security.cert.X509Certificate[] getAcceptedIssuers() { - return null; - } - - @Override - public void checkClientTrusted(X509Certificate[] certs, String authType) { - // trust all SSLs, do not check - } - - @Override - public void checkServerTrusted(X509Certificate[] certs, String authType) { - // trust all SSLs, do not check - } - }}; - // Install the all-trusting trust manager - SSLContext sc = SSLContext.getInstance("SSL"); - sc.init(null, trustManager, new java.security.SecureRandom()); - HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); - } - } - - public URL getSiteURL() { - return siteURL; - } - - public AbstractAuthenticator getAuthenticator() { - return authenticator; - } - - public SPVersion getSpVersion() { - return spVersion; - } - -} diff --git a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/SPHelper.java b/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/SPHelper.java deleted file mode 100644 index 91bb5a2..0000000 --- a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/SPHelper.java +++ /dev/null @@ -1,22 +0,0 @@ -package de.muehlencord.shared.sharepoint.api; - -import java.text.SimpleDateFormat; -import java.util.Date; - -/** - * - * @author joern.muehlencord - */ -public class SPHelper { - - /* -- Format for Date Only Field -- */ - public static synchronized String toSPDate(Date d) { - SimpleDateFormat dateOnlyFormat = new SimpleDateFormat("yyyy-MM-dd"); - if (d == null) { - return ""; - } - - return dateOnlyFormat.format(d); - } - -} diff --git a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/SPJaxbObject.java b/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/SPJaxbObject.java deleted file mode 100644 index 3dccf76..0000000 --- a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/SPJaxbObject.java +++ /dev/null @@ -1,140 +0,0 @@ -package de.muehlencord.shared.sharepoint.api; - -import java.io.IOException; -import java.io.InputStream; -import java.io.StringReader; -import java.io.StringWriter; -import java.util.List; -import javax.xml.XMLConstants; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.bind.Unmarshaller; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.stream.StreamSource; -import javax.xml.validation.Schema; -import javax.xml.validation.SchemaFactory; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.w3c.dom.Node; -import org.xml.sax.SAXException; - -/** - * - * @author joern.muehlencord - * @param - */ -public abstract class SPJaxbObject extends AbstractSpJaxbObject { - - /** the logging object. */ - private final static Logger LOGGER = LoggerFactory.getLogger(SPJaxbObject.class); - - /** - * list of packages to search in - */ - private final static String packages = "" // - + "de.muehlencord.shared.sharepoint.api.batch" // - + ":de.muehlencord.shared.sharepoint.api.lists" // - + ":de.muehlencord.shared.sharepoint.api.usergroup"; // - - /** the JAX-B context to use */ - private static volatile JAXBContext jaxbContext = null; - - /** the value object */ - protected T value; - /** the class type of the object */ - protected Class cl; - - /** - * returns the jax-b context. - * @return the jax-b context. - * @throws JAXBException if the context cannot be obtained. - */ - public static JAXBContext getJaxbContext() throws JAXBException { - if (jaxbContext == null) { - jaxbContext = JAXBContext.newInstance(packages); - } - return jaxbContext; - } - - - public SPJaxbObject(Class cl, SPContext context) throws JAXBException { - super(context); - this.cl = cl; - this.value = null; - } - - protected abstract List getSchemaLocation(); - - protected Schema getSchema() throws SAXException { - List schemaLocations = getSchemaLocation(); - if ((schemaLocations == null) || (schemaLocations.isEmpty())) { - // if instance has no schema available, it is not possible to parse against - return null; - } - - Schema schema = null; - try { - SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); - StreamSource[] streamSources = new StreamSource[schemaLocations.size()]; - for (int i = 0; i < schemaLocations.size(); i++) { - String sourceString = schemaLocations.get(i); - InputStream is = SPJaxbObject.class.getResourceAsStream(sourceString); - StreamSource streamSource = new StreamSource(is); - streamSources[i] = streamSource; - } - schema = sf.newSchema(streamSources); - } catch (Exception ex) { - throw new SAXException("Cannot convert to object. Reason: " + ex.getMessage(), ex); - } - return schema; - } - - public void setValue(String valueString) throws JAXBException, SAXException { - SPJaxbObject.getJaxbContext(); - Schema schema = getSchema(); - Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); - if (schema != null) { - unmarshaller.setSchema(schema); - unmarshaller.setEventHandler(new SPValidationEventHandler()); - } - StringReader reader = new StringReader(valueString); - value = (T) unmarshaller.unmarshal(reader); - } - - public void setValue(T value) { - this.value = value; - } - - public String getValueXmlString() throws JAXBException, SAXException { - SPJaxbObject.getJaxbContext(); - Schema schema = getSchema(); - Marshaller marshaller = jaxbContext.createMarshaller(); - if (schema != null) { - marshaller.setSchema(schema); - marshaller.setEventHandler(new SPValidationEventHandler()); - } - StringWriter writer = new StringWriter(); - marshaller.marshal(getValue(), writer); - - return writer.toString(); - } - - public Node createSharePointCAMLNode() throws ParserConfigurationException, SAXException, IOException, JAXBException { - String xmlString = getValueXmlString(); - return AbstractSpJaxbObject.createSharePointCAMLNode(xmlString); - } - - protected T getValue() { - if (value == null) { - try { - value = cl.newInstance(); - } catch (InstantiationException | IllegalAccessException ex) { - LOGGER.debug (ex.toString(), ex); - return null; - } - } - return value; - } - -} diff --git a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/SPObject.java b/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/SPObject.java deleted file mode 100644 index ace4c5a..0000000 --- a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/SPObject.java +++ /dev/null @@ -1,93 +0,0 @@ -package de.muehlencord.shared.sharepoint.api; - -import java.io.StringWriter; -import javax.xml.transform.OutputKeys; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.w3c.dom.Document; -import org.w3c.dom.Node; - -/** - * - * @author jomu - */ -public abstract class SPObject { - - private final static Logger LOGGER = LoggerFactory.getLogger(SPObject.class.getName()); - - private SPContext context; - - public SPObject(SPContext context) { - this.context = context; - } - - public SPContext getContext() { - return context; - } - - /** - * Creates a string from an XML file with start and end indicators - * - * @param docToString document to convert - * @return string of the xml document - */ - public static String xmlToString(Document docToString) { - String returnString = ""; - try { - //create string from xml tree - //Output the XML - //set up a transformer - TransformerFactory transfac = TransformerFactory.newInstance(); - Transformer trans; - trans = transfac.newTransformer(); - trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); - trans.setOutputProperty(OutputKeys.INDENT, "yes"); - StringWriter sw = new StringWriter(); - StreamResult streamResult = new StreamResult(sw); - DOMSource source = new DOMSource(docToString); - trans.transform(source, streamResult); - String xmlString = sw.toString(); - //print the XML - returnString = returnString + xmlString; - } catch (TransformerException ex) { - LOGGER.error (ex.toString(), ex); - } - return returnString; - } - - /** - * Creates a string from an XML file with start and end indicators - * - * @param node node to convert - * @return string of the xml document - */ - public static String xmlToString(Node node) { - String returnString = ""; - try { - //create string from xml tree - //Output the XML - //set up a transformer - TransformerFactory transfac = TransformerFactory.newInstance(); - Transformer trans; - trans = transfac.newTransformer(); - trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); - trans.setOutputProperty(OutputKeys.INDENT, "yes"); - StringWriter sw = new StringWriter(); - StreamResult streamResult = new StreamResult(sw); - DOMSource source = new DOMSource(node); - trans.transform(source, streamResult); - String xmlString = sw.toString(); - //print the XML - returnString = returnString + xmlString; - } catch (TransformerException ex) { - LOGGER.error (ex.toString(), ex); - } - return returnString; - } - -} diff --git a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/SPValidationEventHandler.java b/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/SPValidationEventHandler.java deleted file mode 100644 index ee5fce5..0000000 --- a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/SPValidationEventHandler.java +++ /dev/null @@ -1,45 +0,0 @@ -package de.muehlencord.shared.sharepoint.api; - -import javax.xml.bind.ValidationEvent; -import javax.xml.bind.ValidationEventHandler; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - - -/** - * - * @author joern.muehlencord - */ -public class SPValidationEventHandler implements ValidationEventHandler { - - private final static Logger LOGGER = LoggerFactory.getLogger(SPValidationEventHandler.class); - - @Override - public boolean handleEvent(ValidationEvent event) { - - if (event == null) { - throw new IllegalArgumentException(); - } - - LOGGER.error("\nEVENT"); - LOGGER.error("SEVERITY: " + event.getSeverity()); - LOGGER.error("MESSAGE: " + event.getMessage()); - LOGGER.error("LOCATOR"); - LOGGER.error(" LINE NUMBER: " + event.getLocator().getLineNumber()); - LOGGER.error(" COLUMN NUMBER: " + event.getLocator().getColumnNumber()); - LOGGER.error(" OFFSET: " + event.getLocator().getOffset()); - LOGGER.error(" OBJECT: " + event.getLocator().getObject()); - LOGGER.error(" NODE: " + event.getLocator().getNode()); - LOGGER.error(" URL: " + event.getLocator().getURL()); - - switch (event.getSeverity()) { - case ValidationEvent.WARNING: - return true; // continue after warinings - case ValidationEvent.ERROR: // terminate after errors - case ValidationEvent.FATAL_ERROR: // terminate after fatal errors - default: - return false; - } - } - -} diff --git a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/SPVersion.java b/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/SPVersion.java deleted file mode 100644 index a8a4555..0000000 --- a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/SPVersion.java +++ /dev/null @@ -1,10 +0,0 @@ -package de.muehlencord.shared.sharepoint.api; - -/** - * - * @author jomu - */ -public enum SPVersion { - SP2010; - -} diff --git a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/ServiceLogHandler.java b/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/ServiceLogHandler.java deleted file mode 100644 index 819d5c5..0000000 --- a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/ServiceLogHandler.java +++ /dev/null @@ -1,72 +0,0 @@ -package de.muehlencord.shared.sharepoint.api; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.util.Set; -import javax.xml.namespace.QName; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; -import javax.xml.ws.handler.MessageContext; -import javax.xml.ws.handler.soap.SOAPHandler; -import javax.xml.ws.handler.soap.SOAPMessageContext; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * - * @author joern.muehlencord - */ -public class ServiceLogHandler implements SOAPHandler { - - /** - * the logging object. - */ - private final static Logger LOGGER = LoggerFactory.getLogger(ServiceLogHandler.class); - - @Override - public Set getHeaders() { - // TODO Auto-generated method stub - return null; - } - - @Override - public void close(MessageContext arg0) { - // TODO Auto-generated method stub - - } - - @Override - public boolean handleFault(SOAPMessageContext arg0) { - SOAPMessage message = arg0.getMessage(); - try (ByteArrayOutputStream os = new ByteArrayOutputStream()) { - message.writeTo(os); - LOGGER.error(os.toString("UTF-8")); - } catch (SOAPException | IOException e) { - LOGGER.debug(e.toString(), e); - return false; - } - return true; - } - - @Override - public boolean handleMessage(SOAPMessageContext arg0) { - SOAPMessage message = arg0.getMessage(); - boolean isOutboundMessage = (Boolean) arg0.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY); - if (LOGGER.isTraceEnabled()) { - if (isOutboundMessage) { - LOGGER.trace( "OUTBOUND MESSAGE"); - } else { - LOGGER.trace( "INBOUND MESSAGE"); - } - } - try (ByteArrayOutputStream os = new ByteArrayOutputStream()) { - message.writeTo(os); - LOGGER.trace(os.toString("UTF-8")); - } catch (SOAPException | IOException e) { - LOGGER.debug(e.toString(), e); - } - - return true; - } - -} diff --git a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/SharepointConfig.java b/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/SharepointConfig.java deleted file mode 100644 index 3e6d37a..0000000 --- a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/SharepointConfig.java +++ /dev/null @@ -1,74 +0,0 @@ -package de.muehlencord.shared.sharepoint.api; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.Properties; - -/** - * - * @author joern.muehlencord - */ -public class SharepointConfig { - - private Properties properties; - - public void loadFromFile() throws IOException { - File configFile = new File(getConfigFile()); - if (!configFile.exists()) { - properties = createDefaultConfig(); - storeToFile("sample"); - - System.out.println(createDefaultConfig()); - throw new FileNotFoundException("Config file " + configFile.toString() + " not found. Please create it"); - } - - FileInputStream fin = new FileInputStream(configFile); - properties = new Properties(); - properties.loadFromXML(fin); - } - - public void storeToFile() throws IOException { - storeToFile(null); - } - - public String getProperty(String key) { - if (properties.containsKey(key)) { - return properties.getProperty(key); - } else { - return null; - } - } - - private void storeToFile(String postfix) throws IOException { - String configFileName = getConfigFile(); - if (postfix != null) { - configFileName += "." + postfix; - } - File configFile = new File(configFileName); - FileOutputStream fos = new FileOutputStream(configFile); - properties.storeToXML(fos, "Example config", "UTF-8"); - } - - private Properties createDefaultConfig() { - Properties p = new Properties(); - p.put("domainname", "domainname"); - p.put("username", "username"); - p.put("password", "password"); - p.put("sharepointurl", "http://server/path/to/root"); - p.put("workdir", "workdir"); - - return p; - } - - - private String getConfigFile() { - String configPath = System.getProperty("user.home"); - configPath = (configPath.endsWith(File.separator) ? configPath : configPath + File.separator); - configPath += ".sharepointapi/sharepoint.properties"; - return configPath; - } - -} diff --git a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/authentication/SPAuthentication.java b/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/authentication/SPAuthentication.java deleted file mode 100644 index 1657fad..0000000 --- a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/authentication/SPAuthentication.java +++ /dev/null @@ -1,26 +0,0 @@ -package de.muehlencord.shared.sharepoint.api.authentication; - -import de.muehlencord.shared.sharepoint.api.SPContext; -import de.muehlencord.shared.sharepoint.api.SPObject; - -/** - * - * @author jomu - */ -public class SPAuthentication extends SPObject { - - public SPAuthentication(SPContext context) { - super(context); - } - - /* - private AuthenticationSoap getAuthenticationPort() throws NoSuchAlgorithmException, KeyManagementException, MalformedURLException { - URL wsURL = new URL(getContext().getSiteURL().toString() + "/_vti_bin/Authentication.asmx"); - URL wsdlURL = new URL(SPContext.class.getResource("/wsdl/authentication.wsdl").toExternalForm()); - Authentication service = new Authentication(wsdlURL); - AuthenticationSoap alertsPort = service.getAuthenticationSoap(); - ((BindingProvider) alertsPort).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, wsURL.toString()); - return alertsPort; - } - */ -} diff --git a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/camlquery/SPCamlQuery.java b/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/camlquery/SPCamlQuery.java deleted file mode 100644 index b222599..0000000 --- a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/camlquery/SPCamlQuery.java +++ /dev/null @@ -1,32 +0,0 @@ -package de.muehlencord.shared.sharepoint.api.camlquery; - -/** - * - * @author joern.muehlencord - */ -public class SPCamlQuery { - - -/*extends SPJaxbObject { - - public SPCamlQuery(SPContext context) throws JAXBException { - super(CamlQueryRoot.class, context); - } - - - @Override - protected java.util.List getSchemaLocation() { - java.util.List schemaList = new ArrayList(); - schemaList.add("/xsd/camlquery.xsd"); - schemaList.add("/xsd/coredefinitions.xsd"); - return schemaList; - } -*/ -} - -/** - * History: - * - * $$Log$$ - * - */ diff --git a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/lists/SPBatch.java b/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/lists/SPBatch.java deleted file mode 100644 index 56efd94..0000000 --- a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/lists/SPBatch.java +++ /dev/null @@ -1,39 +0,0 @@ -package de.muehlencord.shared.sharepoint.api.lists; - -import de.muehlencord.shared.sharepoint.api.SPContext; -import de.muehlencord.shared.sharepoint.api.SPJaxbObject; -import de.muehlencord.shared.sharepoint.api.batch.Batch; -import de.muehlencord.shared.sharepoint.api.batch.Method; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBException; - -/** - * - * @author joern.muehlencord - */ -public class SPBatch extends SPJaxbObject { - - public SPBatch(SPContext context) throws JAXBException { - super(Batch.class, context); - } - - @Override - protected List getSchemaLocation() { - List schemaList = new ArrayList(); - schemaList.add("/xsd/batch.xsd"); - return schemaList; - } - - public void addMethod(Method method) { - getValue().getMethod().add(method); - } - -} - -/** - * History: - * - * $$Log$$ - * - */ diff --git a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/lists/SPList.java b/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/lists/SPList.java deleted file mode 100644 index 2ede649..0000000 --- a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/lists/SPList.java +++ /dev/null @@ -1,308 +0,0 @@ -package de.muehlencord.shared.sharepoint.api.lists; - -import com.microsoft.schemas.sharepoint.soap.lists.GetListItems; -import com.microsoft.schemas.sharepoint.soap.lists.GetListItems.QueryOptions; -import com.microsoft.schemas.sharepoint.soap.lists.GetListItemsResponse; -import com.microsoft.schemas.sharepoint.soap.lists.GetListResponse; -import com.microsoft.schemas.sharepoint.soap.lists.ListsSoap; -import com.microsoft.schemas.sharepoint.soap.lists.UpdateListItems; -import de.muehlencord.shared.sharepoint.api.AbstractSpJaxbObject; -import de.muehlencord.shared.sharepoint.api.SPContext; -import de.muehlencord.shared.sharepoint.api.SPJaxbObject; -import de.muehlencord.shared.sharepoint.api.SPObject; -import de.muehlencord.shared.sharepoint.api.ServiceLogHandler; -import de.muehlencord.shared.sharepoint.api.batch.Field; -import de.muehlencord.shared.sharepoint.api.batch.Method; -import de.muehlencord.shared.sharepoint.api.batch.MethodType; -import java.io.IOException; -import java.net.MalformedURLException; -import java.security.KeyManagementException; -import java.security.NoSuchAlgorithmException; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import javax.xml.bind.JAXBException; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.ws.BindingProvider; -import javax.xml.ws.handler.Handler; -import org.w3c.dom.Element; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.SAXException; - -/** - * - * @author joern.muehlencord - */ -public class SPList extends SPJaxbObject { - - public SPList(SPContext context, String listName) throws JAXBException { - super(List.class, context); - getValue().name = listName; - } - - @Override - protected java.util.List getSchemaLocation() { - java.util.List schemaList = new ArrayList(); - schemaList.add("/xsd/lists.xsd"); - return schemaList; - } - - - /* *** list information *** */ - public String getListName() { - return getValue().name; - } - - public String getListTitle() throws NoSuchAlgorithmException, KeyManagementException, JAXBException, MalformedURLException, SAXException { - if (getValue().title == null) { - getListFromSharepoint(); - } - return getValue().title; - } - - /* *** queries *** */ - public java.util.List> getListItems(java.util.List listColumnNames, int rowLimit) throws NoSuchAlgorithmException, - KeyManagementException, JAXBException, MalformedURLException, - SAXException, ParserConfigurationException, IOException { - return getListItems(listColumnNames, rowLimit, null); - } - - public java.util.List> getListItems(java.util.List listColumnNames, int rowLimit, String queryString) throws - NoSuchAlgorithmException, KeyManagementException, JAXBException, MalformedURLException, - SAXException, ParserConfigurationException, IOException { - - //Here are additional parameters that may be set - String viewName = null; - GetListItems.ViewFields viewFields = null; - - GetListItems.Query query = null; - if (queryString != null) { - query = new GetListItems.Query(); - query.getContent().add(AbstractSpJaxbObject.createSharePointCAMLNode(queryString)); - } - QueryOptions queryOptions = new QueryOptions(); - String webId = null; - String rowLimitString = Integer.toString(rowLimit); - - GetListItemsResponse.GetListItemsResult result = getListsPort(). - getListItems(getValue().name, viewName, query, viewFields, rowLimitString, queryOptions, webId); - - java.util.List> returnList = new LinkedList<>(); - if (result != null && result.getContent() != null) { - for (Object content : result.getContent()) { - // TODO - handdling more than one result / should not occur - if (content instanceof Element) { - - // parse XML manually. Attribute list is generated automatically as the columns - // are stored as attribute with ows_. This makes an easy to use - // XSD generated java object unhandy. - Element rootElement = (Element) content; - - NodeList list = rootElement.getElementsByTagName("z:row"); - for (int i = 0; i < list.getLength(); i++) { - java.util.List rowList = new LinkedList<>(); - //Gets the attributes of the current row/element - NamedNodeMap attributes = list.item(i).getAttributes(); - // include all attributes which are requested by the given column names - // important - blank codes to _x0020_ as blank is not allowed in XML attribute names - - for (String columnName : listColumnNames) { - String internalColumnName = "ows_" + columnName.replace(" ", "_x0020_"); - if (attributes.getNamedItem(internalColumnName) != null) { - rowList.add(attributes.getNamedItem(internalColumnName).getNodeValue()); - } else { - // TODO create better exception handling - throw new JAXBException("Couldn't find the '" + columnName + "' column in the '" + getValue().name + "' list in SharePoint.\n"); - } - } - returnList.add(rowList); - } - } - } - } - return returnList; // TODO either return null or return empty lists, currently handled differently - } - - - /* *** manipulating list items *** */ - public void addListItem(Map data) throws NoSuchAlgorithmException, KeyManagementException, - JAXBException, MalformedURLException, SAXException, ParserConfigurationException, IOException { - java.util.List> dataList = new LinkedList<>(); - dataList.add(data); - addListItems(dataList); - } - - public void addListItems(java.util.List> dataList) throws NoSuchAlgorithmException, - KeyManagementException, JAXBException, MalformedURLException, SAXException, ParserConfigurationException, IOException { - - SPBatch batch = new SPBatch(getContext()); - for (Integer batchId = 1; batchId <= dataList.size(); batchId++) { - Method method = new Method(); - method.setID(batchId); - method.setCmd(MethodType.NEW); - Map data = dataList.get(batchId - 1); - data.keySet().stream(). - map((String key) -> { - Field field = new Field(); - field.setName(key.replace(" ", "_x0020_")); - field.setContent(data.get(key)); - return field; - }). - forEach((Field field) -> { - method.getField().add(field); - }); - batch.addMethod(method); - } - - executeUpdate(batch); - - } - - public void updateListItem(Map data) throws JAXBException, ParserConfigurationException, NoSuchAlgorithmException, - SAXException, KeyManagementException, IOException { - java.util.List> dataList = new ArrayList<>(); - dataList.add(data); - updateListItems(dataList); - } - - public void updateListItems(java.util.List> dataList) throws JAXBException, ParserConfigurationException, NoSuchAlgorithmException, - SAXException, KeyManagementException, IOException { - SPBatch batch = createBatch(dataList, MethodType.UPDATE); - executeUpdate(batch); - } - - public void removeListItem(Map dataMap) throws JAXBException, ParserConfigurationException, NoSuchAlgorithmException, - SAXException, KeyManagementException, IOException { - java.util.List> dataList = new ArrayList<>(); - dataList.add(dataMap); - removeListItems(dataList); - } - - public void removeListItems(java.util.List> dataList) throws JAXBException, ParserConfigurationException, NoSuchAlgorithmException, - SAXException, KeyManagementException, IOException { - SPBatch batch = createBatch(dataList, MethodType.DELETE); - executeUpdate(batch); - } - - /* *** information & tools *** */ - public Map getLookupValueMap(String value, int rowLimit) throws NoSuchAlgorithmException, - KeyManagementException, JAXBException, MalformedURLException, SAXException, ParserConfigurationException, IOException { - - // get list values from sharepoint - java.util.List listColumnNames = new ArrayList<>(); - listColumnNames.add("ID"); - listColumnNames.add(value); - java.util.List> listItems = getListItems(listColumnNames, rowLimit); - - // convert to map from value to ;# - Map returnMap = new ConcurrentHashMap<>(); - - for (java.util.List row : listItems) { - String rowId = row.get(0); - String rowValue = row.get(1); - String rowLookupValue = rowId + ";#" + rowValue; - if (returnMap.containsKey(rowValue)) { - throw new SAXException("Key " + rowValue + " already exists - key values must be unique"); - } else { - returnMap.put(rowValue, rowLookupValue); - } - } - return returnMap; - } - - public String getColumnNameByDisplayName(String columnDisplayName) throws NoSuchAlgorithmException, - KeyManagementException, JAXBException, MalformedURLException, SAXException { - if (getValue().fields == null) { - getListFromSharepoint(); - } - - Fields fields = getValue().fields; - for (de.muehlencord.shared.sharepoint.api.lists.Field field : fields.getField()) { - if (field.getDisplayName().equals(columnDisplayName)) { - return field.getName(); - } - } - return null; - } - - public int getItemCount() throws NoSuchAlgorithmException, - KeyManagementException, JAXBException, MalformedURLException, SAXException { - - // refresh list to have current value - getListFromSharepoint(); - return getValue().itemCount; - } - /* *** private helper methods *** */ - - private ListsSoap getListsPort() throws NoSuchAlgorithmException, KeyManagementException, MalformedURLException { - java.net.URL contextURL = getContext().getSiteURL(); - java.net.URL wsURL = new java.net.URL(contextURL.toString() + "/_vti_bin/Lists.asmx"); - java.net.URL wsdlURL = new java.net.URL(SPContext.class - .getResource("/2010/wsdl/lists.wsdl").toExternalForm()); - com.microsoft.schemas.sharepoint.soap.lists.Lists service = new com.microsoft.schemas.sharepoint.soap.lists.Lists(wsdlURL); - ListsSoap listsPort = service.getListsSoap(); - - ((BindingProvider) listsPort).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, wsURL.toString()); - - // log all incoming and outgoing communication - TODO make this configurable by DEBUG switch - java.util.List handlers = ((BindingProvider) listsPort).getBinding().getHandlerChain(); - - handlers.add( - new ServiceLogHandler()); - ((BindingProvider) listsPort).getBinding().setHandlerChain(handlers); - - return listsPort; - } - - private void getListFromSharepoint() throws NoSuchAlgorithmException, KeyManagementException, JAXBException, MalformedURLException, - SAXException { - GetListResponse.GetListResult result = getListsPort().getList(getValue().name); - if (result.getContent() != null) { - for (Object content : result.getContent()) { - // TODO - handdling more than one result / should not occur - if (content instanceof Element) { - // Parse XML file - Element rootElement = (Element) content; - String listsString = SPObject.xmlToString(rootElement.getOwnerDocument()); - this.setValue(listsString); - } - } - } - } - - private SPBatch createBatch(java.util.List> dataList, MethodType methodType) throws JAXBException { - SPBatch batch = new SPBatch(getContext()); - for (Integer batchId = 1; batchId <= dataList.size(); batchId++) { - Method method = new Method(); - method.setID(batchId); - method.setCmd(methodType); - Map data = dataList.get(batchId - 1); - data.keySet().stream(). - map((String key) -> { - Field field = new Field(); - field.setName(key.replace(" ", "_x0020_")); - field.setContent(data.get(key)); - return field; - }). - forEach((Field field) -> { - method.getField().add(field); - }); - batch.addMethod(method); - } - return batch; - } - - private void executeUpdate(SPBatch batch) throws ParserConfigurationException, NoSuchAlgorithmException, SAXException, KeyManagementException, IOException, - JAXBException { - UpdateListItems.Updates updates = new UpdateListItems.Updates(); - Node node = batch.createSharePointCAMLNode(); - updates.getContent().add(node); - - getListsPort().updateListItems(getValue().name, updates); - } - - /* *** unsorted *** */ -} diff --git a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/lists/SPLists.java b/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/lists/SPLists.java deleted file mode 100644 index c5952d3..0000000 --- a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/lists/SPLists.java +++ /dev/null @@ -1,138 +0,0 @@ -package de.muehlencord.shared.sharepoint.api.lists; - -import com.microsoft.schemas.sharepoint.soap.lists.GetListCollectionResponse; -import com.microsoft.schemas.sharepoint.soap.lists.Lists; -import com.microsoft.schemas.sharepoint.soap.lists.ListsSoap; -import de.muehlencord.shared.sharepoint.api.SPContext; -import de.muehlencord.shared.sharepoint.api.SPJaxbObject; -import de.muehlencord.shared.sharepoint.api.SPObject; -import de.muehlencord.shared.sharepoint.api.ServiceLogHandler; -import java.net.MalformedURLException; -import java.net.URL; -import java.security.KeyManagementException; -import java.security.NoSuchAlgorithmException; -import java.text.ParseException; -import java.util.ArrayList; -import java.util.LinkedList; -import javax.xml.bind.JAXBException; -import javax.xml.ws.BindingProvider; -import javax.xml.ws.handler.Handler; -import org.w3c.dom.Element; -import org.xml.sax.SAXException; - -/** - * - * @author jomu - */ -public class SPLists extends SPJaxbObject { - - /* *** constructors & object methods needed *** */ - public SPLists(SPContext context) throws JAXBException { - super(de.muehlencord.shared.sharepoint.api.lists.Lists.class, context); - } - - @Override - protected java.util.List getSchemaLocation() { - java.util.List schemaList = new ArrayList(); - schemaList.add("/xsd/lists.xsd"); - return schemaList; - } - - /* ** get list objects *** */ - public SPList getSpListByTitle(String listName) throws NoSuchAlgorithmException, KeyManagementException, JAXBException, MalformedURLException, SAXException { - if (this.getValue().getList() == null) { - getValueFromSharepoint(); - } - List list = getListByTitle(listName); // TODO throw exception if not found - SPList returnList = new SPList(getContext(), listName); - returnList.setValue(list); - - return returnList; - } - - /* *** get lists information *** */ - public java.util.List getListNames() throws NoSuchAlgorithmException, KeyManagementException, MalformedURLException, ParseException, JAXBException, - SAXException { - if (this.getValue().getList() == null) { - getValueFromSharepoint(); - } - java.util.List returnList = new LinkedList<>(); - this.getValue().getList().stream(). - forEach((currentList) -> { - returnList.add(currentList.name); - }); - return returnList; - } - - public String getListNameByTitle(String listTitle) throws NoSuchAlgorithmException, KeyManagementException, JAXBException, - MalformedURLException, SAXException { - - if (this.getValue().getList() == null) { - getValueFromSharepoint(); - } - - for (List list : getValue().getList()) { - if (list.title.equals(listTitle)) { - return list.name; - } - } - return null; - } - - - /* *** private helper methods *** */ - private ListsSoap getListsPort() throws NoSuchAlgorithmException, KeyManagementException, MalformedURLException { - - URL wsURL = new URL(getContext().getSiteURL().toString() + "/_vti_bin/Lists.asmx"); - URL wsdlURL = new URL(SPContext.class.getResource("/2010/wsdl/lists.wsdl").toExternalForm()); - Lists service = new Lists(wsdlURL); - ListsSoap listsPort = service.getListsSoap(); - ((BindingProvider) listsPort).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, wsURL.toString()); - - // log all incoming and outgoing communication - TODO make this configurable by DEBUG switch - java.util.List handlers = ((BindingProvider) listsPort).getBinding().getHandlerChain(); - handlers.add(new ServiceLogHandler()); - ((BindingProvider) listsPort).getBinding().setHandlerChain(handlers); - - return listsPort; - } - - private void getValueFromSharepoint() throws NoSuchAlgorithmException, KeyManagementException, JAXBException, MalformedURLException, SAXException { - GetListCollectionResponse.GetListCollectionResult result = getListsPort().getListCollection(); - - if (result.getContent() != null) { - for (Object content : result.getContent()) { - // TODO - handdling more than one result / should not occur - if (content instanceof Element) { - // Parse XML file - Element rootElement = (Element) content; - String listsString = SPObject.xmlToString(rootElement.getOwnerDocument()); - this.setValue(listsString); - } - } - } - } - - private List getListByTitle(String listTitle) { - for (List list : this.getValue().getList()) { - if (list.getTitle().equals(listTitle)) { - return list; - } - } - // return null, if list is not found - return null; - } - - /* - private List getListByName(String listName) { - for (List list : this.getValue().lists) { - if (list.getName().equals(listName)) { - return list; - } - } - // return null, if list is not found - return null; - } - */ - -} diff --git a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/lists/SPMethod.java b/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/lists/SPMethod.java deleted file mode 100644 index 2a0ad4f..0000000 --- a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/lists/SPMethod.java +++ /dev/null @@ -1,48 +0,0 @@ -package de.muehlencord.shared.sharepoint.api.lists; - -import de.muehlencord.shared.sharepoint.api.SPContext; -import de.muehlencord.shared.sharepoint.api.SPJaxbObject; -import de.muehlencord.shared.sharepoint.api.batch.Field; -import de.muehlencord.shared.sharepoint.api.batch.Method; -import de.muehlencord.shared.sharepoint.api.batch.MethodType; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBException; - -/** - * - * @author joern.muehlencord - */ -public class SPMethod extends SPJaxbObject { - - public SPMethod(SPContext context) throws JAXBException { - super(Method.class, context); - } - - @Override - protected List getSchemaLocation() { - List schemaList = new ArrayList(); - schemaList.add("/xsd/batch.xsd"); - return schemaList; - } - - public void setID(Integer batchId) { - getValue().setID(batchId); - } - - public void setCmd(MethodType methodType) { - getValue().setCmd(methodType); - } - - public List getFields() { - return getValue().getField(); - } - -} - -/** - * History: - * - * $$Log$$ - * - */ diff --git a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/sites/SPSite.java b/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/sites/SPSite.java deleted file mode 100644 index 4cddfe9..0000000 --- a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/sites/SPSite.java +++ /dev/null @@ -1,31 +0,0 @@ -package de.muehlencord.shared.sharepoint.api.sites; - -import de.muehlencord.shared.sharepoint.api.SPContext; -import de.muehlencord.shared.sharepoint.api.SPObject; - -/** - * - * @author jomu - */ -public class SPSite extends SPObject { - - public SPSite(SPContext context) { - super(context); - } - - /* - public void getRootWeb() throws NoSuchAlgorithmException, KeyManagementException, MalformedURLException { - String rootWebUrl = StringUtils.removeEndIgnoreCase(getContext().getSiteURL().toString(), "/"); - GetWebResponse.GetWebResult result = getWebsPort(getContext().getSiteURL()).getWeb(rootWebUrl); - } - - private WebsSoap getWebsPort(URL webUrl) throws NoSuchAlgorithmException, KeyManagementException, MalformedURLException { - URL wsURL = new URL(webUrl.toString() + "/_vti_bin/Webs.asmx"); - URL wsdlURL = new URL(SPSite.class.getResource("/2010/wsdl/webs.wsdl").toExternalForm()); - Webs service = new Webs(wsdlURL); - WebsSoap websPort = service.getWebsSoap(); - ((BindingProvider) websPort).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, wsURL.toString()); - return websPort; - } - */ -} diff --git a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/usergroup/SPUser.java b/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/usergroup/SPUser.java deleted file mode 100644 index a7dcdfe..0000000 --- a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/usergroup/SPUser.java +++ /dev/null @@ -1,71 +0,0 @@ -package de.muehlencord.shared.sharepoint.api.usergroup; - -import de.muehlencord.shared.sharepoint.api.SPContext; -import de.muehlencord.shared.sharepoint.api.SPJaxbObject; -import java.util.ArrayList; -import javax.xml.bind.JAXBException; - -/** - * - * @author joern.muehlencord - */ -public class SPUser extends SPJaxbObject { - - public SPUser(SPContext context) throws JAXBException { - super(User.class, context); - } - - @Override - protected java.util.List getSchemaLocation() { - java.util.List schemaList = new ArrayList(); - schemaList.add("/xsd/usergroup.xsd"); - return schemaList; - } - - public String getUserID() { - return getValue().id.toString(); - } - - public String getUserName() { - return getValue().name; - } - - public String getUserLoginName() { - String returnValue = null; - if (getValue().loginName != null) { - returnValue = getValue().loginName; - } else if (getValue().login != null) { - returnValue = getValue().login; - } - - if ((returnValue == null) || (returnValue.equals (""))) { - return null; - } else { - return returnValue.substring(7); // drop [i:0#.w| - } - } - - public String getUserEmail() { - return getValue().email; - } - - public String getUserNotes() { - return getValue().notes; - } - - public String getDisplayName() { - return getValue().displayName; - } - - public String getEmail() { - return getValue().email; - } - -} - -/** - * History: - * - * $$Log$$ - * - */ diff --git a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/usergroup/SPUserGroup.java b/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/usergroup/SPUserGroup.java deleted file mode 100644 index 65bcad7..0000000 --- a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/usergroup/SPUserGroup.java +++ /dev/null @@ -1,196 +0,0 @@ -package de.muehlencord.shared.sharepoint.api.usergroup; - -import com.microsoft.schemas.sharepoint.soap.usergroup.GetUserCollectionFromGroupResponse; -import com.microsoft.schemas.sharepoint.soap.usergroup.GetUserInfoResponse; -import com.microsoft.schemas.sharepoint.soap.usergroup.GetUserLoginFromEmail; -import com.microsoft.schemas.sharepoint.soap.usergroup.GetUserLoginFromEmail.EmailXml; -import com.microsoft.schemas.sharepoint.soap.usergroup.GetUserLoginFromEmailResponse; -import com.microsoft.schemas.sharepoint.soap.usergroup.UserGroup; -import com.microsoft.schemas.sharepoint.soap.usergroup.UserGroupSoap; -import de.muehlencord.shared.sharepoint.api.SPContext; -import de.muehlencord.shared.sharepoint.api.SPJaxbObject; -import de.muehlencord.shared.sharepoint.api.SPObject; -import de.muehlencord.shared.sharepoint.api.ServiceLogHandler; -import java.io.IOException; -import java.net.MalformedURLException; -import java.security.KeyManagementException; -import java.security.NoSuchAlgorithmException; -import javax.xml.bind.JAXBException; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.ws.BindingProvider; -import javax.xml.ws.handler.Handler; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.w3c.dom.Element; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.SAXException; - -/** - * - * @author joern.muehlencord - */ -public class SPUserGroup extends SPObject { - - private final static Logger LOGGER = LoggerFactory.getLogger(SPUserGroup.class.getName()); - - public SPUserGroup(SPContext context) { - super(context); - } - - public void addUserToGroup(String userLoginName, String groupName) throws JAXBException, SAXException, ParserConfigurationException, - NoSuchAlgorithmException, IOException, KeyManagementException { - SPUser user = getUser("i:0#.w|", userLoginName); - if (user == null) { - throw new SAXException("User not found"); - } - getUserGroupPort().addUserToGroup(groupName, user.getUserName(), user.getUserLoginName(), user.getUserEmail(), user.getUserNotes()); - LOGGER.info("User " + user.getUserName() + " added to group " + groupName); - } - - public void removeUserFromGroup(String userLoginName, String groupName) throws NoSuchAlgorithmException, KeyManagementException, MalformedURLException, - JAXBException, SAXException { - SPUser user = getUser("i:0#.w|", userLoginName); - if (user == null) { - throw new SAXException("User not found"); - } - if (userLoginName.startsWith("i:0#.w|")) { - getUserGroupPort().removeUserFromGroup(groupName, user.getUserLoginName()); - } else { - getUserGroupPort().removeUserFromGroup(groupName, "i:0#.w|" + user.getUserLoginName()); - } - LOGGER.info("User " + user.getUserName() + " removed from group " + groupName); - } - - public boolean isUserMemberOfGroup(String userLoginName, String groupName) throws NoSuchAlgorithmException, KeyManagementException, MalformedURLException { - GetUserCollectionFromGroupResponse.GetUserCollectionFromGroupResult result = getUserGroupPort().getUserCollectionFromGroup(groupName); - - if ((result != null) && (result.getContent() != null) && (!result.getContent().isEmpty())) { - Object value = result.getContent().get(0); - if (value instanceof Element) { - Element rootElement = (Element) value; - Node usersNode = rootElement.getFirstChild(); // users node - NodeList userNodeList = usersNode.getChildNodes(); // all user nodes - for (int i = 0; i < userNodeList.getLength(); i++) { - Node userNode = userNodeList.item(i); - NamedNodeMap attributes = userNode.getAttributes(); - if ((attributes.getNamedItem("LoginName") != null) - && (attributes.getNamedItem("LoginName").getNodeValue().equals("i:0#.w|" + userLoginName))) { - if (LOGGER.isDebugEnabled()) { - LOGGER.debug("User " + userLoginName + " is member of group " + groupName); - } - return true; // user found - } - } - } - if (LOGGER.isDebugEnabled()) { - LOGGER.debug("User " + userLoginName + " is not a member of group " + groupName); - } - return false; - } else { - if (LOGGER.isDebugEnabled()) { - LOGGER.debug("User " + userLoginName + " not found"); - } - return false; - } - } - - public SPUsers getUsersFromGroup(String groupName) throws NoSuchAlgorithmException, KeyManagementException, MalformedURLException, JAXBException, SAXException { - GetUserCollectionFromGroupResponse.GetUserCollectionFromGroupResult result = getUserGroupPort().getUserCollectionFromGroup(groupName); - if ((result != null) && (result.getContent() != null) && (!result.getContent().isEmpty())) { - Object value = result.getContent().get(0); - if (value instanceof Element) { - Element rootElement = (Element) value; - SPUsers users = new SPUsers(getContext()); - String usersString = SPUsers.xmlToString(rootElement.getFirstChild()); - users.setValue(usersString); - return users; - } - } - - return null; - - } - - public String getUserId(String userLoginName) throws NoSuchAlgorithmException, KeyManagementException, MalformedURLException, JAXBException, SAXException { - SPUser user = getUser("i:0#.w|", userLoginName); - if (user == null) { - return null; - } else { - return user.getUserID(); - } - } - - public String getUserName(String userLoginName) throws NoSuchAlgorithmException, KeyManagementException, MalformedURLException, JAXBException, SAXException { - SPUser user = getUser("i:0#.w|", userLoginName); - if (user == null) { - return null; - } else { - return user.getUserName(); - } - } - - // TODO does not return full object, how to refresh the object to get all attributes? - public SPUser getUserFromEmail(String emailAddress) throws JAXBException, ParserConfigurationException, SAXException, IOException, - NoSuchAlgorithmException, KeyManagementException { - - String xml = ""; - EmailXml emailXml = new GetUserLoginFromEmail.EmailXml(); - emailXml.getContent().add(SPJaxbObject.createSharePointCAMLNode(xml)); - // Node userNode = user.createSharePointCAMLNode(); - GetUserLoginFromEmailResponse.GetUserLoginFromEmailResult result = getUserGroupPort().getUserLoginFromEmail(emailXml); - if ((result != null) && (!result.getContent().isEmpty())) { - Object content = result.getContent().get(0); - if (content instanceof Element) { - Element rootElement = (Element) content; - SPUser user = new SPUser(getContext()); - user.setValue(SPJaxbObject.xmlToString(rootElement.getFirstChild())); - return user; - } - } - - return null; - } - - public SPUser getUserFromId(String userId) throws NoSuchAlgorithmException, KeyManagementException, MalformedURLException, JAXBException, SAXException { - return getUser ("i:0#.w|", userId); - } - - private SPUser getUser(Object prefix, String userLoginName) throws NoSuchAlgorithmException, KeyManagementException, MalformedURLException, JAXBException, SAXException { - GetUserInfoResponse.GetUserInfoResult result = getUserGroupPort().getUserInfo(prefix + userLoginName); - // TODO why is i:0#.w| in front? - - if (result.getContent() != null) { - for (Object content : result.getContent()) { - // TODO - handdling more than one result / should not occur - // Parse XML file - Element rootElement = (Element) content; - String userString = SPObject.xmlToString(rootElement.getFirstChild()); - SPUser user = new SPUser(getContext()); - user.setValue(userString); - return user; - } - } - return null; // not found, return null - } - - private UserGroupSoap getUserGroupPort() throws NoSuchAlgorithmException, KeyManagementException, MalformedURLException { - java.net.URL contextURL = getContext().getSiteURL(); - java.net.URL wsURL = new java.net.URL(contextURL.toString() + "_vti_bin/usergroup.asmx"); - java.net.URL wsdlURL = new java.net.URL(SPContext.class.getResource("/2010/wsdl/usergroup.wsdl").toExternalForm()); - UserGroup service = new UserGroup(wsdlURL); - UserGroupSoap userGroupPort = service.getUserGroupSoap(); - ((BindingProvider) userGroupPort).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, wsURL.toString()); - - // log all incoming and outgoing communication - TODO make this configurable by DEBUG switch - java.util.List handlers = ((BindingProvider) userGroupPort).getBinding().getHandlerChain(); - handlers.add(new ServiceLogHandler()); - ((BindingProvider) userGroupPort).getBinding().setHandlerChain(handlers); - - return userGroupPort; - } - - /* *** unsorted *** */ - -} diff --git a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/usergroup/SPUsers.java b/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/usergroup/SPUsers.java deleted file mode 100644 index 45ca33e..0000000 --- a/sharepoint/api/src/main/java/de/muehlencord/shared/sharepoint/api/usergroup/SPUsers.java +++ /dev/null @@ -1,35 +0,0 @@ -package de.muehlencord.shared.sharepoint.api.usergroup; - -import de.muehlencord.shared.sharepoint.api.SPContext; -import de.muehlencord.shared.sharepoint.api.SPJaxbObject; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBException; - -/** - * - * @author joern.muehlencord - */ -public class SPUsers extends SPJaxbObject { - - public SPUsers(SPContext context) throws JAXBException { - super(Users.class, context); - } - - @Override - protected java.util.List getSchemaLocation() { - java.util.List schemaList = new ArrayList(); - schemaList.add("/xsd/usergroup.xsd"); - return schemaList; - } - - public List getEmailAddresses() { - List returnList = new ArrayList<>(); - for (User user : getValue().getUser()) { - returnList.add (user.email); - } - - return returnList; - } - -} diff --git a/sharepoint/api/src/main/resources/2010/wsdl/alerts.wsdl b/sharepoint/api/src/main/resources/2010/wsdl/alerts.wsdl deleted file mode 100644 index 29b60b6..0000000 --- a/sharepoint/api/src/main/resources/2010/wsdl/alerts.wsdl +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sharepoint/api/src/main/resources/2010/wsdl/authentication.wsdl b/sharepoint/api/src/main/resources/2010/wsdl/authentication.wsdl deleted file mode 100644 index f8c69a5..0000000 --- a/sharepoint/api/src/main/resources/2010/wsdl/authentication.wsdl +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sharepoint/api/src/main/resources/2010/wsdl/lists.wsdl b/sharepoint/api/src/main/resources/2010/wsdl/lists.wsdl deleted file mode 100644 index 12da63a..0000000 --- a/sharepoint/api/src/main/resources/2010/wsdl/lists.wsdl +++ /dev/null @@ -1,1515 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sharepoint/api/src/main/resources/2010/wsdl/search.wsdl b/sharepoint/api/src/main/resources/2010/wsdl/search.wsdl deleted file mode 100644 index 281091d..0000000 --- a/sharepoint/api/src/main/resources/2010/wsdl/search.wsdl +++ /dev/null @@ -1,366 +0,0 @@ - - - Microsoft SharePoint Server 2013 Preview Search Query Web Service - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Microsoft SharePoint Server 2013 Preview Search Query Web Service - - - - - - - - diff --git a/sharepoint/api/src/main/resources/2010/wsdl/sites.wsdl b/sharepoint/api/src/main/resources/2010/wsdl/sites.wsdl deleted file mode 100644 index 28017b5..0000000 --- a/sharepoint/api/src/main/resources/2010/wsdl/sites.wsdl +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sharepoint/api/src/main/resources/2010/wsdl/usergroup.wsdl b/sharepoint/api/src/main/resources/2010/wsdl/usergroup.wsdl deleted file mode 100644 index e393884..0000000 --- a/sharepoint/api/src/main/resources/2010/wsdl/usergroup.wsdl +++ /dev/null @@ -1,1926 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sharepoint/api/src/main/resources/2010/wsdl/webs.wsdl b/sharepoint/api/src/main/resources/2010/wsdl/webs.wsdl deleted file mode 100644 index b2bc514..0000000 --- a/sharepoint/api/src/main/resources/2010/wsdl/webs.wsdl +++ /dev/null @@ -1,969 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sharepoint/api/src/main/resources/jaxb/batch.xml b/sharepoint/api/src/main/resources/jaxb/batch.xml deleted file mode 100644 index 6190c27..0000000 --- a/sharepoint/api/src/main/resources/jaxb/batch.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/sharepoint/api/src/main/resources/jaxb/camlquery.xml b/sharepoint/api/src/main/resources/jaxb/camlquery.xml deleted file mode 100644 index 1152714..0000000 --- a/sharepoint/api/src/main/resources/jaxb/camlquery.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/sharepoint/api/src/main/resources/jaxb/listitems.xml b/sharepoint/api/src/main/resources/jaxb/listitems.xml deleted file mode 100644 index e87cd0a..0000000 --- a/sharepoint/api/src/main/resources/jaxb/listitems.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/sharepoint/api/src/main/resources/jaxb/lists.xml b/sharepoint/api/src/main/resources/jaxb/lists.xml deleted file mode 100644 index 5177d7a..0000000 --- a/sharepoint/api/src/main/resources/jaxb/lists.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/sharepoint/api/src/main/resources/jaxb/usergroup.xml b/sharepoint/api/src/main/resources/jaxb/usergroup.xml deleted file mode 100644 index 5b75c82..0000000 --- a/sharepoint/api/src/main/resources/jaxb/usergroup.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/sharepoint/api/src/main/resources/xsd/batch.xsd b/sharepoint/api/src/main/resources/xsd/batch.xsd deleted file mode 100644 index 634bea7..0000000 --- a/sharepoint/api/src/main/resources/xsd/batch.xsd +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sharepoint/api/src/main/resources/xsd/camlquery.xsd b/sharepoint/api/src/main/resources/xsd/camlquery.xsd deleted file mode 100644 index 04b1037..0000000 --- a/sharepoint/api/src/main/resources/xsd/camlquery.xsd +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sharepoint/api/src/main/resources/xsd/coredefinitions.xsd b/sharepoint/api/src/main/resources/xsd/coredefinitions.xsd deleted file mode 100644 index e9fa0e0..0000000 --- a/sharepoint/api/src/main/resources/xsd/coredefinitions.xsd +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sharepoint/api/src/main/resources/xsd/lists.xsd b/sharepoint/api/src/main/resources/xsd/lists.xsd deleted file mode 100644 index 872b74c..0000000 --- a/sharepoint/api/src/main/resources/xsd/lists.xsd +++ /dev/null @@ -1,749 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sharepoint/api/src/main/resources/xsd/usergroup.xsd b/sharepoint/api/src/main/resources/xsd/usergroup.xsd deleted file mode 100644 index 3f491a8..0000000 --- a/sharepoint/api/src/main/resources/xsd/usergroup.xsd +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sharepoint/api/src/test/java/de/muehlencord/shared/sharepoint/api/BaseTest.java b/sharepoint/api/src/test/java/de/muehlencord/shared/sharepoint/api/BaseTest.java deleted file mode 100644 index fbfab91..0000000 --- a/sharepoint/api/src/test/java/de/muehlencord/shared/sharepoint/api/BaseTest.java +++ /dev/null @@ -1,102 +0,0 @@ -package de.muehlencord.shared.sharepoint.api; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.UnsupportedEncodingException; -import java.net.MalformedURLException; -import java.security.KeyManagementException; -import java.security.NoSuchAlgorithmException; -import javax.xml.bind.JAXBException; -import org.junit.BeforeClass; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * - * @author joern@muehlencord.de - */ -public abstract class BaseTest { - - private final static Logger LOGGER = LoggerFactory.getLogger(BaseTest.class.getName()); - private static SPContext context = null; - - @BeforeClass - public static void init() throws MalformedURLException, NoSuchAlgorithmException, KeyManagementException, JAXBException, IOException { - SharepointConfig config = new SharepointConfig(); - config.loadFromFile(); - - String domainname = config.getProperty("domainname"); - String username = config.getProperty("username"); - String password = config.getProperty("password"); - String sharepointurl = config.getProperty("sharepointurl"); - // String workDir = config.getProperty("workdir"); - - NtlmAuthenticator credentials = new NtlmAuthenticator(domainname, username, password); - context = new SPContext(new java.net.URL(sharepointurl), credentials, SPVersion.SP2010, true); - LOGGER.info("Sharepoint context initialized"); - - // userGroup = new SPUserGroup(context); - } - - public SPContext getContext() { - return context; - } - - /** - * reads a file availabe in the test source path and returns its content - * - * @param fileName fhe filename to read. This is the name realative to the path of class calling this method (the JUnit testclass) - * @param encoding the encoding to use while reading - * @return the filecontent as string - * - * @throws java.io.UnsupportedEncodingException - */ - public static String readFileContentFromTest(String fileName, String encoding) throws UnsupportedEncodingException, IOException { - StringBuilder sb = new StringBuilder(); - InputStreamReader irs = null; - InputStream is = null; - BufferedReader br = null; - String line = null; - try { - is = BaseTest.class.getResourceAsStream(fileName); - irs = new InputStreamReader(is, encoding); - br = new BufferedReader(irs); - while (null != (line = br.readLine())) { - sb.append(line); - sb.append("\n"); - } - } catch (UnsupportedEncodingException ex) { - throw ex; - } catch (IOException ioex) { - throw ioex; - } finally { - try { - if (br != null) { - br.close(); - } - } catch (IOException ex) { - LOGGER.error (ex.toString(), ex); - } - - try { - if (irs != null) { - irs.close(); - } - } catch (IOException ex) { - LOGGER.error (ex.toString(), ex); - } - try { - if (is != null) { - is.close(); - } - } catch (IOException ex) { - LOGGER.error (ex.toString(), ex); - } - } - - return sb.toString(); - } - -} diff --git a/sharepoint/api/src/test/java/de/muehlencord/shared/sharepoint/api/NtlmAuthenticatorTest.java b/sharepoint/api/src/test/java/de/muehlencord/shared/sharepoint/api/NtlmAuthenticatorTest.java deleted file mode 100644 index c52cedc..0000000 --- a/sharepoint/api/src/test/java/de/muehlencord/shared/sharepoint/api/NtlmAuthenticatorTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package de.muehlencord.shared.sharepoint.api; - -import de.muehlencord.shared.sharepoint.api.sites.SPSite; -import java.net.MalformedURLException; -import java.security.KeyManagementException; -import java.security.NoSuchAlgorithmException; -import org.junit.Ignore; -import org.junit.Test; - -/** - * - * @author jomu - */ -public class NtlmAuthenticatorTest extends BaseTest { - - - @Test - @Disabled // Depends on available sharepoint currently - public void testAuthentication() throws MalformedURLException, NoSuchAlgorithmException, KeyManagementException { - SPSite instance = new SPSite(getContext()); - // instance.getRootWeb(); - } - -} diff --git a/sharepoint/api/src/test/java/de/muehlencord/shared/sharepoint/api/SharepointConfigTest.java b/sharepoint/api/src/test/java/de/muehlencord/shared/sharepoint/api/SharepointConfigTest.java deleted file mode 100644 index 9909b3f..0000000 --- a/sharepoint/api/src/test/java/de/muehlencord/shared/sharepoint/api/SharepointConfigTest.java +++ /dev/null @@ -1,23 +0,0 @@ - -package de.muehlencord.shared.sharepoint.api; - -import org.junit.Ignore; -import org.junit.Test; - -/** - * - * @author joern.muehlencord - */ -public class SharepointConfigTest { - - public SharepointConfigTest() { - } - - @Test - @Disabled // Depends on available sharepoint currently - public void testLoadFromFile() throws Exception { - SharepointConfig c = new SharepointConfig(); - c.loadFromFile(); - } - -} diff --git a/sharepoint/api/src/test/java/de/muehlencord/shared/sharepoint/api/lists/SPListTest.java b/sharepoint/api/src/test/java/de/muehlencord/shared/sharepoint/api/lists/SPListTest.java deleted file mode 100644 index 0da310a..0000000 --- a/sharepoint/api/src/test/java/de/muehlencord/shared/sharepoint/api/lists/SPListTest.java +++ /dev/null @@ -1,162 +0,0 @@ -package de.muehlencord.shared.sharepoint.api.lists; - -import de.muehlencord.shared.sharepoint.api.BaseTest; -import java.io.IOException; -import java.security.KeyManagementException; -import java.security.NoSuchAlgorithmException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import javax.xml.bind.JAXBException; -import javax.xml.parsers.ParserConfigurationException; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import org.junit.Ignore; -import org.junit.Test; -import org.xml.sax.SAXException; - -/** - * - * @author joern.muehlencord - */ -public class SPListTest extends BaseTest { - - @Test - @Disabled // Depends on available sharepoint currently - public void testFromXML() throws Exception { - String xmlString = readFileContentFromTest("lists/testlist.xml", "UTF-8"); - SPList list = new SPList(getContext(), "{924883B9-41B7-430C-8206-151786A67319}"); - assertNotNull(xmlString); - list.setValue(xmlString); - } - - @Test - @Disabled // Depends on available sharepoint currently - public void addListItemByTitle() throws NoSuchAlgorithmException, KeyManagementException, JAXBException, SAXException, ParserConfigurationException, - IOException { - - SPLists instance = new SPLists(getContext()); - SPList list = instance.getSpListByTitle("Test"); - assertNotNull(list); - String listName = list.getListName(); - assertEquals("Listname", "{D8C8D97E-1065-4674-A8F2-026D6D478794}", listName); - - // get list of all country codes - java.util.List columns = new ArrayList<>(); - columns.add("Title"); - columns.add("ID"); - java.util.List> countryCodes = list.getListItems(columns, 300); - - Map data = new HashMap<>(); - data.put("Title", "Test"); - data.put("Choice", "Enter Choice #1"); // is not checked, possible to add wrong value - data.put("Country", "357;#DE"); // reference taken from testGetLookupValuesMap - data.put("Number", "17"); // is validating - data.put("Lines", "Long text
with line breaks"); // line breaks using
- list.addListItem(data); - } - - @Test - @Disabled // Depends on available sharepoint currently - public void addListItemBigList() throws NoSuchAlgorithmException, KeyManagementException, JAXBException, SAXException, ParserConfigurationException, - IOException { - - SPLists instance = new SPLists(getContext()); - SPList list = instance.getSpListByTitle("Questionnaire"); - assertNotNull(list); - String listName = list.getListName(); - assertEquals("Listname", "{4728157C-CFA4-447E-8863-170133FDC351}", listName); - - Map data = new HashMap<>(); - data.put(list.getColumnNameByDisplayName("Country"), "357;#DE"); - data.put(list.getColumnNameByDisplayName("WNRegion"), "DACH"); - data.put(list.getColumnNameByDisplayName("AccountManager"), "Jörn"); - data.put(list.getColumnNameByDisplayName("Customer"), "Mühlencord"); - data.put(list.getColumnNameByDisplayName("Current OS"), "Windows XP"); - data.put(list.getColumnNameByDisplayName("PlannedOS"), "migrate to Windows 7"); - data.put(list.getColumnNameByDisplayName("RolloutStart"), "in 2014"); - data.put(list.getColumnNameByDisplayName("RolloutEnd"), "in 2015"); - data.put(list.getColumnNameByDisplayName("InstalledBase"), "2000"); - data.put(list.getColumnNameByDisplayName("IbaseMigrated"), "1000"); - data.put(list.getColumnNameByDisplayName("IbaseOrdered"), "500"); - data.put(list.getColumnNameByDisplayName("IbaseNotOrdered"), "500"); - data.put(list.getColumnNameByDisplayName("IbaseNotMigrated"), "0"); - data.put(list.getColumnNameByDisplayName("ReaseonNotMigrated"), ""); - data.put(list.getColumnNameByDisplayName("Platform"), "ProBase/C"); - data.put(list.getColumnNameByDisplayName("IbaseOldPlatform"), "0"); - data.put(list.getColumnNameByDisplayName("Application"), "ProFlex4"); - data.put(list.getColumnNameByDisplayName("IbaseOldApplication"), "0"); - data.put(list.getColumnNameByDisplayName("MaintenanceContract"), "none"); - data.put(list.getColumnNameByDisplayName("Comments"), "This is a test"); - list.addListItem(data); - } - - @Test - @Disabled // Depends on available sharepoint currently - public void testGetListItems() throws Exception { - SPLists instance = new SPLists(getContext()); - SPList list = instance.getSpListByTitle("Questionnaire_Countries"); - assertNotNull(list); - java.util.List columns = new ArrayList<>(); - // columns.add("CountryCode"); - columns.add("Title"); - columns.add("ID"); - java.util.List> smallList = list.getListItems(columns, 30); - assertNotNull(smallList); - assertEquals("Size smallList", 30, smallList.size()); - java.util.List> bigList = list.getListItems(columns, 300); - assertNotNull(bigList); - assertEquals("Size bigList", 249, bigList.size()); - } - - @Test - @Disabled // Depends on available sharepoint currently - public void testGetListItemsQuery() throws Exception { - SPLists instance = new SPLists(getContext()); - SPList list = instance.getSpListByTitle("Questionnaire_Countries"); - assertNotNull(list); - java.util.List columns = new ArrayList<>(); - columns.add("Title"); - columns.add("ID"); - - // create query - String queryString = "" - + "" - + "DE" - + ""; - - java.util.List> smallList = list.getListItems(columns, 30, queryString); - // the list contains more than one item but title is a unique value, so it can only - // return one row if filtered to one country - assertNotNull(smallList); - assertEquals("Size smallList", 1, smallList.size()); - - } - - @Test - @Disabled // Depends on available sharepoint currently - public void testGetLookupValueMap() throws Exception { - SPLists instance = new SPLists(getContext()); - SPList list = instance.getSpListByTitle("Questionnaire_Countries"); - Map lookupValues = list.getLookupValueMap("Title", 0); - System.out.println(lookupValues); - - } - - @Test - @Disabled // Depends on available sharepoint currently - public void testGetColumnNameByDisplayName() throws Exception { - SPLists instance = new SPLists(getContext()); - SPList list = instance.getSpListByTitle("Questionnaire"); - assertEquals("Displayname of Current OS", "Current_x0020_OS", list.getColumnNameByDisplayName("Current OS")); - } - - @Test - @Disabled // Depends on available sharepoint currently - public void testGetItemCount() throws Exception { - SPLists instance = new SPLists(getContext()); - SPList list = instance.getSpListByTitle("Questionnaire"); - assertTrue(list.getItemCount() > 0); - } -} diff --git a/sharepoint/api/src/test/java/de/muehlencord/shared/sharepoint/api/lists/SPListsTest.java b/sharepoint/api/src/test/java/de/muehlencord/shared/sharepoint/api/lists/SPListsTest.java deleted file mode 100644 index c6f4263..0000000 --- a/sharepoint/api/src/test/java/de/muehlencord/shared/sharepoint/api/lists/SPListsTest.java +++ /dev/null @@ -1,37 +0,0 @@ -package de.muehlencord.shared.sharepoint.api.lists; - -import de.muehlencord.shared.sharepoint.api.BaseTest; -import static de.muehlencord.shared.sharepoint.api.BaseTest.readFileContentFromTest; -import java.io.IOException; -import javax.xml.bind.JAXBException; -import static org.junit.Assert.assertEquals; -import org.junit.Ignore; -import org.junit.Test; -import org.xml.sax.SAXException; - -/** - * - * @author joern.muehlencord - */ -public class SPListsTest extends BaseTest { - - - - @Test - @Disabled // Depends on available sharepoint currently - public void testFromXML() throws IOException, JAXBException, SAXException { - String xmlString = readFileContentFromTest("lists/testlists.xml", "UTF-8"); - SPLists lists = new SPLists(getContext()); - lists.setValue (xmlString); - System.out.println(xmlString); - } - - @Test - @Disabled // Depends on available sharepoint currently - public void testGetListName() throws Exception { - SPLists instance = new SPLists(getContext()); - String listName = instance.getListNameByTitle("Questionnaire"); - assertEquals("Listname", "{4728157C-CFA4-447E-8863-170133FDC351}", listName); - } - -} diff --git a/sharepoint/api/src/test/java/de/muehlencord/shared/sharepoint/api/usergroup/SPUserGroupTest.java b/sharepoint/api/src/test/java/de/muehlencord/shared/sharepoint/api/usergroup/SPUserGroupTest.java deleted file mode 100644 index 378fc2c..0000000 --- a/sharepoint/api/src/test/java/de/muehlencord/shared/sharepoint/api/usergroup/SPUserGroupTest.java +++ /dev/null @@ -1,83 +0,0 @@ -package de.muehlencord.shared.sharepoint.api.usergroup; - -import de.muehlencord.shared.sharepoint.api.BaseTest; -import static de.muehlencord.shared.sharepoint.api.BaseTest.readFileContentFromTest; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import org.junit.Ignore; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * - * @author joern.muehlencord - */ -public class SPUserGroupTest extends BaseTest { - - private final static Logger LOGGER = LoggerFactory.getLogger(SPUserGroupTest.class.getName()); - - @Test - @Disabled - public void testFromXML() throws Exception { - String xmlString = readFileContentFromTest("usergroups/user.xml", "UTF-8"); - SPUser user = new SPUser(getContext()); - assertNotNull(xmlString); - user.setValue(xmlString); - } - - @Test - @Disabled // Depends on available sharepoint currently - public void testGetUserInfo() throws Exception { - SPUserGroup ug = new SPUserGroup(getContext()); - String userId = ug.getUserId("wincor-nixdorf\\joern.muehlencord"); - assertEquals("Userid", "16", userId); - } - - @Test - @Disabled // Depends on available sharepoint currently - public void testAddUserToGroup() throws Exception { - SPUserGroup ug = new SPUserGroup(getContext()); - ug.addUserToGroup("wincor-nixdorf\\joern.muehlencord", "Test Group"); - } - - @Test - @Disabled // Depends on available sharepoint currently - public void testIsUserMemberOfGroup() throws Exception { - SPUserGroup ug = new SPUserGroup(getContext()); - boolean result = ug.isUserMemberOfGroup("wincor-nixdorf\\joern.muehlencord", "HQ All Members"); - assertEquals("HQ All membership", true, result); - } - - @Test - @Disabled // Depends on available sharepoint currently - public void getUserLoginNameFromEmail() throws Exception { - SPUserGroup ug = new SPUserGroup(getContext()); - SPUser user = ug.getUserFromEmail("joern.muehlencord@wincor-nixdorf.com"); - assertEquals("UserLogin", "wincor-nixdorf\\joern.muehlencord", user.getUserLoginName()); - } - - @Test - @Disabled // Depends on available sharepoint currently - public void getUserFromEmail() throws Exception { - SPUserGroup ug = new SPUserGroup(getContext()); - String user1Email = "nicole.cravo@wincor-nixdorf.com"; - SPUser user1 = ug.getUserFromEmail(user1Email); - String user2Email = "joern.muehlencord@wincor-nixdorf.com"; - SPUser user2 = ug.getUserFromEmail(user2Email); - - - LOGGER.info ("loginName1={}", user1.getUserLoginName()); - LOGGER.info ("userId1={}", ug.getUserId(user1.getUserLoginName())); - LOGGER.info ("loginName2={}", user2.getUserLoginName()); - LOGGER.info ("userId2={}", ug.getUserId(user2.getUserLoginName())); - // String userId1 = ug.getUserId(user1.getUserName()); - // userId1 = user1.getUserID(); - - // SPUser user2 = ug.getUserFromEmail(email); - // assertNotNull (user2); - // String userId2 = user2.getUserID(); - // assertEquals("userid", "wincor-nixdorf\\joern.muehlencord", userId2); - } - -} diff --git a/sharepoint/api/src/test/resources/de/muehlencord/shared/sharepoint/api/camlquery/basicquery.xml b/sharepoint/api/src/test/resources/de/muehlencord/shared/sharepoint/api/camlquery/basicquery.xml deleted file mode 100644 index bf9007e..0000000 --- a/sharepoint/api/src/test/resources/de/muehlencord/shared/sharepoint/api/camlquery/basicquery.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - Chandler - - - - AuditDeleteTesting - - - - - 2013-09-11 - - - - -
\ No newline at end of file diff --git a/sharepoint/api/src/test/resources/de/muehlencord/shared/sharepoint/api/lists/batchimporttest.xml b/sharepoint/api/src/test/resources/de/muehlencord/shared/sharepoint/api/lists/batchimporttest.xml deleted file mode 100644 index eec1f87..0000000 --- a/sharepoint/api/src/test/resources/de/muehlencord/shared/sharepoint/api/lists/batchimporttest.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - 6 - Modified sixth item - - - 7 - Modified seventh item - - - 5 - - - Added item - - \ No newline at end of file diff --git a/sharepoint/api/src/test/resources/de/muehlencord/shared/sharepoint/api/lists/batchtest.xml b/sharepoint/api/src/test/resources/de/muehlencord/shared/sharepoint/api/lists/batchtest.xml deleted file mode 100644 index 0a040b4..0000000 --- a/sharepoint/api/src/test/resources/de/muehlencord/shared/sharepoint/api/lists/batchtest.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - 6 - Modified sixth item - - - 7 - Modified seventh item - - - 5 - - - Added item - - \ No newline at end of file diff --git a/sharepoint/api/src/test/resources/de/muehlencord/shared/sharepoint/api/lists/testlist.xml b/sharepoint/api/src/test/resources/de/muehlencord/shared/sharepoint/api/lists/testlist.xml deleted file mode 100644 index 82b380a..0000000 --- a/sharepoint/api/src/test/resources/de/muehlencord/shared/sharepoint/api/lists/testlist.xml +++ /dev/null @@ -1,811 +0,0 @@ - - diff --git a/sharepoint/api/src/test/resources/de/muehlencord/shared/sharepoint/api/lists/testlists.xml b/sharepoint/api/src/test/resources/de/muehlencord/shared/sharepoint/api/lists/testlists.xml deleted file mode 100644 index 1c3dbf7..0000000 --- a/sharepoint/api/src/test/resources/de/muehlencord/shared/sharepoint/api/lists/testlists.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - diff --git a/sharepoint/api/src/test/resources/de/muehlencord/shared/sharepoint/api/usergroups/user.xml b/sharepoint/api/src/test/resources/de/muehlencord/shared/sharepoint/api/usergroups/user.xml deleted file mode 100644 index 889cba7..0000000 --- a/sharepoint/api/src/test/resources/de/muehlencord/shared/sharepoint/api/usergroups/user.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/sharepoint/api/src/test/resources/log4j.xml b/sharepoint/api/src/test/resources/log4j.xml deleted file mode 100644 index 5ca8a78..0000000 --- a/sharepoint/api/src/test/resources/log4j.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sharepoint/mock/pom.xml b/sharepoint/mock/pom.xml deleted file mode 100644 index 85b41c9..0000000 --- a/sharepoint/mock/pom.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - 4.0.0 - - de.muehlencord.shared - shared-sharepoint - 1.2-SNAPSHOT - - de.muehlencord.shared.sharepoint - sharepoint-mock - jar - - shared-sharepoint-mock - \ No newline at end of file diff --git a/sharepoint/pom.xml b/sharepoint/pom.xml deleted file mode 100644 index f60f8ba..0000000 --- a/sharepoint/pom.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - 4.0.0 - - de.muehlencord - shared - 1.2-SNAPSHOT - - de.muehlencord.shared - shared-sharepoint - pom - - api - mock - - - UTF-8 - - \ No newline at end of file diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/filter/FacesAjaxAwarePassThruAuthenticationFilter.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/filter/FacesAjaxAwarePassThruAuthenticationFilter.java index d14e48a..c9be041 100644 --- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/filter/FacesAjaxAwarePassThruAuthenticationFilter.java +++ b/shiro-faces/src/main/java/de/muehlencord/shirofaces/filter/FacesAjaxAwarePassThruAuthenticationFilter.java @@ -10,7 +10,7 @@ import org.apache.shiro.web.filter.authc.PassThruAuthenticationFilter; * found at http://balusc.omnifaces.org/2013/01/apache-shiro-is-it-ready-for-java-ee-6.html#MakeShiroJSFAjaxAware) * source by BalusC, adjusted to PassThruAuthenticationFilter by Joern Muehlencord * @author BalusC - * @author Joern Muehlencord + * @author Joern Muehlencord (joern at muehlencord.de) */ public class FacesAjaxAwarePassThruAuthenticationFilter extends PassThruAuthenticationFilter { diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AbstractAccessControlTag.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AbstractAccessControlTag.java index 3ed81b1..a7991ff 100644 --- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AbstractAccessControlTag.java +++ b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AbstractAccessControlTag.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Joern Muehlencord . + * Copyright 2016 Joern Muehlencord (joern at muehlencord.de). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ import javax.faces.view.facelets.TagConfig; /** * - * @author Joern Muehlencord + * @author Joern Muehlencord (joern at muehlencord.de) */ public abstract class AbstractAccessControlTag extends AbstractTag { diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AbstractAuthenticationTag.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AbstractAuthenticationTag.java index 4347134..1a1df07 100644 --- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AbstractAuthenticationTag.java +++ b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AbstractAuthenticationTag.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Joern Muehlencord . + * Copyright 2016 Joern Muehlencord (joern at muehlencord.de). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ import javax.faces.view.facelets.TagConfig; /** * - * @author Joern Muehlencord + * @author Joern Muehlencord (joern at muehlencord.de) */ public abstract class AbstractAuthenticationTag extends AbstractTag { diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AbstractPermissionTag.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AbstractPermissionTag.java index 35b50a6..3705ce2 100644 --- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AbstractPermissionTag.java +++ b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AbstractPermissionTag.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Joern Muehlencord . + * Copyright 2016 Joern Muehlencord (joern at muehlencord.de). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ import javax.faces.view.facelets.TagConfig; /** * - * @author Joern Muehlencord + * @author Joern Muehlencord (joern at muehlencord.de) */ public abstract class AbstractPermissionTag extends AbstractAccessControlTag { diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AbstractRoleTag.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AbstractRoleTag.java index dafa919..f86c693 100644 --- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AbstractRoleTag.java +++ b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AbstractRoleTag.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Joern Muehlencord . + * Copyright 2016 Joern Muehlencord (joern at muehlencord.de). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ import javax.faces.view.facelets.TagConfig; /** * - * @author Joern Muehlencord + * @author Joern Muehlencord (joern at muehlencord.de) */ public abstract class AbstractRoleTag extends AbstractAccessControlTag { diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AbstractTag.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AbstractTag.java index 68b06e5..06fc662 100644 --- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AbstractTag.java +++ b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AbstractTag.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Joern Muehlencord . + * Copyright 2016 Joern Muehlencord (joern at muehlencord.de). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ import org.slf4j.LoggerFactory; /** * - * @author Joern Muehlencord + * @author Joern Muehlencord (joern at muehlencord.de) */ public abstract class AbstractTag extends TagHandler { diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AuthenticatedTag.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AuthenticatedTag.java index 8b8331c..dddf525 100644 --- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AuthenticatedTag.java +++ b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/AuthenticatedTag.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Joern Muehlencord . + * Copyright 2016 Joern Muehlencord (joern at muehlencord.de). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ import javax.faces.view.facelets.TagConfig; /** * - * @author Joern Muehlencord + * @author Joern Muehlencord (joern at muehlencord.de) */ public class AuthenticatedTag extends AbstractAuthenticationTag { diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/GuestTag.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/GuestTag.java index 3908882..c8a2102 100644 --- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/GuestTag.java +++ b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/GuestTag.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Joern Muehlencord . + * Copyright 2016 Joern Muehlencord (joern at muehlencord.de). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ import javax.faces.view.facelets.TagConfig; /** * - * @author Joern Muehlencord + * @author Joern Muehlencord (joern at muehlencord.de) */ public class GuestTag extends AbstractAuthenticationTag { diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/HasAnyPermissionTag.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/HasAnyPermissionTag.java index abbb558..17f43b6 100644 --- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/HasAnyPermissionTag.java +++ b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/HasAnyPermissionTag.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Joern Muehlencord . + * Copyright 2016 Joern Muehlencord (joern at muehlencord.de). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ import org.apache.shiro.subject.Subject; /** * - * @author Joern Muehlencord + * @author Joern Muehlencord (joern at muehlencord.de) */ public class HasAnyPermissionTag extends AbstractPermissionTag { diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/HasAnyRolesTag.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/HasAnyRolesTag.java index 4285ae7..1ab2827 100644 --- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/HasAnyRolesTag.java +++ b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/HasAnyRolesTag.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Joern Muehlencord . + * Copyright 2016 Joern Muehlencord (joern at muehlencord.de). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ import org.apache.shiro.subject.Subject; /** * - * @author Joern Muehlencord + * @author Joern Muehlencord (joern at muehlencord.de) */ public class HasAnyRolesTag extends AbstractRoleTag { diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/HasPermissionTag.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/HasPermissionTag.java index 6c2899d..545299c 100644 --- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/HasPermissionTag.java +++ b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/HasPermissionTag.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Joern Muehlencord . + * Copyright 2016 Joern Muehlencord (joern at muehlencord.de). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ import javax.faces.view.facelets.TagConfig; /** * - * @author Joern Muehlencord + * @author Joern Muehlencord (joern at muehlencord.de) */ public class HasPermissionTag extends AbstractPermissionTag { diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/HasRoleTag.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/HasRoleTag.java index 5595fe9..43b625b 100644 --- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/HasRoleTag.java +++ b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/HasRoleTag.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Joern Muehlencord . + * Copyright 2016 Joern Muehlencord (joern at muehlencord.de). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ import javax.faces.view.facelets.TagConfig; /** * - * @author Joern Muehlencord + * @author Joern Muehlencord (joern at muehlencord.de) */ public class HasRoleTag extends AbstractRoleTag { diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/LacksPermissionTag.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/LacksPermissionTag.java index 3f312ae..925d27a 100644 --- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/LacksPermissionTag.java +++ b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/LacksPermissionTag.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Joern Muehlencord . + * Copyright 2016 Joern Muehlencord (joern at muehlencord.de). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ import javax.faces.view.facelets.TagConfig; /** * - * @author Joern Muehlencord + * @author Joern Muehlencord (joern at muehlencord.de) */ public class LacksPermissionTag extends AbstractPermissionTag { diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/LacksRoleTag.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/LacksRoleTag.java index 085385b..527ccb6 100644 --- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/LacksRoleTag.java +++ b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/LacksRoleTag.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Joern Muehlencord . + * Copyright 2016 Joern Muehlencord (joern at muehlencord.de). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ import javax.faces.view.facelets.TagConfig; /** * - * @author Joern Muehlencord + * @author Joern Muehlencord (joern at muehlencord.de) */ public class LacksRoleTag extends AbstractRoleTag { diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/NotAuthenticatedTag.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/NotAuthenticatedTag.java index 03added..9d4aff2 100644 --- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/NotAuthenticatedTag.java +++ b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/NotAuthenticatedTag.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Joern Muehlencord . + * Copyright 2016 Joern Muehlencord (joern at muehlencord.de). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ import javax.faces.view.facelets.TagConfig; /** * - * @author Joern Muehlencord + * @author Joern Muehlencord (joern at muehlencord.de) */ public class NotAuthenticatedTag extends AbstractAuthenticationTag { diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/UserTag.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/UserTag.java index 9badcdb..0d52500 100644 --- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/UserTag.java +++ b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/UserTag.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Joern Muehlencord . + * Copyright 2016 Joern Muehlencord (joern at muehlencord.de). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ import javax.faces.view.facelets.TagConfig; /** * - * @author Joern Muehlencord + * @author Joern Muehlencord (joern at muehlencord.de) */ public class UserTag extends AbstractAuthenticationTag { diff --git a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/unsupported/PrincipalTag.java b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/unsupported/PrincipalTag.java index eba0b9e..bed72b7 100644 --- a/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/unsupported/PrincipalTag.java +++ b/shiro-faces/src/main/java/de/muehlencord/shirofaces/tags/unsupported/PrincipalTag.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Joern Muehlencord . + * Copyright 2016 Joern Muehlencord (joern at muehlencord.de). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ import javax.faces.view.facelets.TagConfig; * is not authenticated, the tag displays nothing unless a defaultValue * is specified.

* - * @author Joern Muehlencord + * @author Joern Muehlencord (joern at muehlencord.de) */ public class PrincipalTag extends AbstractTag { diff --git a/shiro-faces/src/main/resources/META-INF/shiro-faces.taglib.xml b/shiro-faces/src/main/resources/META-INF/shiro-faces.taglib.xml index 6750002..7d60112 100644 --- a/shiro-faces/src/main/resources/META-INF/shiro-faces.taglib.xml +++ b/shiro-faces/src/main/resources/META-INF/shiro-faces.taglib.xml @@ -1,6 +1,6 @@