This commit is contained in:
hasuniea 2016-08-26 17:48:39 +05:30
commit 5753c5107f
144 changed files with 930 additions and 978 deletions

View File

@ -122,9 +122,10 @@ public class AndroidAPIUtils {
throw new BadRequestException( throw new BadRequestException(
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build()); new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
} }
DeviceIdentifier deviceIdentifier = new DeviceIdentifier(); DeviceIdentifier deviceIdentifier;
List<DeviceIdentifier> deviceids = new ArrayList<>(); List<DeviceIdentifier> deviceids = new ArrayList<>();
for (String deviceId : deviceIDs) { for (String deviceId : deviceIDs) {
deviceIdentifier = new DeviceIdentifier();
deviceIdentifier.setId(deviceId); deviceIdentifier.setId(deviceId);
deviceIdentifier.setType(AndroidConstants.DEVICE_TYPE_ANDROID); deviceIdentifier.setType(AndroidConstants.DEVICE_TYPE_ANDROID);
deviceids.add(deviceIdentifier); deviceids.add(deviceIdentifier);

View File

@ -17,7 +17,7 @@
}} }}
{{#zone "navMenu-icon"}} {{#zone "navMenu-icon"}}
<span class="icon fw-stack"> <span class="icon fw-stack">
<i class="fw fw-tiles fw-stack-1x toggle-icon-up"></i> <i class="fw fw-menu fw-stack-1x toggle-icon-down"></i>
</span> </span>
{{/zone}} {{/zone}}
@ -98,8 +98,7 @@
data-offset-top="80"> data-offset-top="80">
<ul class="sidebar-messages"> <ul class="sidebar-messages">
</ul> </ul>
<h4 class="text-center"><a href="{{appContext}}notification-listing" class="text-center">Show all notifications</a> <div class="text-center"><a href="{{appContext}}notification-listing" class="btn btn-primary">Show all notifications</a></div>
</h4>
</div> </div>
{{/zone}} {{/zone}}
{{#zone "bottomJs"}} {{#zone "bottomJs"}}

View File

@ -129,7 +129,7 @@ function loadNewNotifications() {
viewModel["notifications"] = responsePayload["notifications"]; viewModel["notifications"] = responsePayload["notifications"];
$(messageSideBar).html(template(viewModel)); $(messageSideBar).html(template(viewModel));
} else { } else {
$(messageSideBar).html("<h4 class='text-center'>No new notifications found...</h4>"); $(messageSideBar).html('<div class="message message-info message-no-new"><h4><i class="icon fw fw-info"></i>No new notifications found...</h4></div>');
} }
} else { } else {
$(messageSideBar).html("<h4 class ='message-danger'>Unexpected error " + $(messageSideBar).html("<h4 class ='message-danger'>Unexpected error " +

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common; package org.wso2.carbon.device.mgt.mobile.windows.api.common;
/** /**
* PluginConstants class for Windows plugin. This class has inner classes for containing constants for * PluginConstants class for Windows plugin. This class has inner classes for containing constants for
@ -26,11 +26,11 @@ public final class PluginConstants {
//Service endpoints //Service endpoints
public static final String DISCOVERY_SERVICE_ENDPOINT = public static final String DISCOVERY_SERVICE_ENDPOINT =
"org.wso2.carbon.mdm.mobileservices.windows.services.discovery.DiscoveryService"; "org.wso2.carbon.device.mgt.mobile.windows.api.services.discovery.DiscoveryService";
public static final String CERTIFICATE_ENROLLMENT_SERVICE_ENDPOINT = public static final String CERTIFICATE_ENROLLMENT_SERVICE_ENDPOINT =
"org.wso2.carbon.mdm.mobileservices.windows.services.wstep.CertificateEnrollmentService"; "org.wso2.carbon.device.mgt.mobile.windows.api.services.wstep.CertificateEnrollmentService";
public static final String CERTIFICATE_ENROLLMENT_POLICY_SERVICE_ENDPOINT = public static final String CERTIFICATE_ENROLLMENT_POLICY_SERVICE_ENDPOINT =
"org.wso2.carbon.mdm.mobileservices.windows.services.xcep.CertificateEnrollmentPolicyService"; "org.wso2.carbon.device.mgt.mobile.windows.api.services.xcep.CertificateEnrollmentPolicyService";
//Services' target namespaces //Services' target namespaces
public static final String DISCOVERY_SERVICE_TARGET_NAMESPACE = public static final String DISCOVERY_SERVICE_TARGET_NAMESPACE =

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common; package org.wso2.carbon.device.mgt.mobile.windows.api.common;
public enum SyncmlCommandType { public enum SyncmlCommandType {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
@ -16,10 +16,10 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.authenticator; package org.wso2.carbon.device.mgt.mobile.windows.api.common.authenticator;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.OAuthTokenValidationException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.OAuthTokenValidationException;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.OAuthValidationResponse; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.OAuthValidationResponse;
/** /**
* Declares the contract for OAuth2TokenValidator implementations. * Declares the contract for OAuth2TokenValidator implementations.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.authenticator; package org.wso2.carbon.device.mgt.mobile.windows.api.common.authenticator;
import org.wso2.carbon.utils.CarbonUtils; import org.wso2.carbon.utils.CarbonUtils;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.authenticator; package org.wso2.carbon.device.mgt.mobile.windows.api.common.authenticator;
import org.apache.axis2.AxisFault; import org.apache.axis2.AxisFault;
import org.apache.axis2.client.Options; import org.apache.axis2.client.Options;
@ -33,9 +33,9 @@ import org.apache.commons.logging.LogFactory;
import org.apache.commons.pool.PoolableObjectFactory; import org.apache.commons.pool.PoolableObjectFactory;
import org.apache.http.conn.HttpClientConnectionManager; import org.apache.http.conn.HttpClientConnectionManager;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.OAuthTokenValidationException;
import org.wso2.carbon.identity.oauth2.stub.OAuth2TokenValidationServiceStub; import org.wso2.carbon.identity.oauth2.stub.OAuth2TokenValidationServiceStub;
import org.wso2.carbon.mdm.mobileservices.windows.common.PluginConstants;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.OAuthTokenValidationException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -46,7 +46,8 @@ public class OAuthTokenValidationStubFactory implements PoolableObjectFactory {
private String basicAuthHeader; private String basicAuthHeader;
private HttpClient httpClient; private HttpClient httpClient;
private static final Log log = LogFactory.getLog(OAuthTokenValidationStubFactory.class); private static final Log log = LogFactory.getLog(
org.wso2.carbon.device.mgt.mobile.windows.api.common.authenticator.OAuthTokenValidationStubFactory.class);
public OAuthTokenValidationStubFactory(String url, String adminUsername, String adminPassword, public OAuthTokenValidationStubFactory(String url, String adminUsername, String adminPassword,
Properties properties) { Properties properties) {
@ -188,7 +189,7 @@ public class OAuthTokenValidationStubFactory implements PoolableObjectFactory {
client.setOptions(options); client.setOptions(options);
} catch (AxisFault axisFault) { } catch (AxisFault axisFault) {
throw new OAuthTokenValidationException("Error occurred while creating the " + throw new OAuthTokenValidationException("Error occurred while creating the " +
"OAuth2TokenValidationServiceStub.", axisFault); "OAuth2TokenValidationServiceStub.", axisFault);
} }
return stub; return stub;
} }

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,11 +16,11 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.authenticator; package org.wso2.carbon.device.mgt.mobile.windows.api.common.authenticator;
import org.wso2.carbon.mdm.mobileservices.windows.common.authenticator.impl.LocalOAuthValidator; import org.wso2.carbon.device.mgt.mobile.windows.api.common.authenticator.impl.LocalOAuthValidator;
import org.wso2.carbon.mdm.mobileservices.windows.common.authenticator.impl.RemoteOAuthValidator; import org.wso2.carbon.device.mgt.mobile.windows.api.common.authenticator.impl.RemoteOAuthValidator;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.WindowsAPIUtils; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.WindowsAPIUtils;
import org.wso2.carbon.webapp.authenticator.framework.config.AuthenticatorConfig; import org.wso2.carbon.webapp.authenticator.framework.config.AuthenticatorConfig;
import java.util.Properties; import java.util.Properties;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,14 +16,14 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.authenticator.impl; package org.wso2.carbon.device.mgt.mobile.windows.api.common.authenticator.impl;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.authenticator.OAuth2TokenValidator;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.authenticator.OAuthConstants;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.OAuthTokenValidationException;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.OAuthValidationResponse;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.WindowsAPIUtils;
import org.wso2.carbon.identity.oauth2.dto.OAuth2TokenValidationRequestDTO; import org.wso2.carbon.identity.oauth2.dto.OAuth2TokenValidationRequestDTO;
import org.wso2.carbon.mdm.mobileservices.windows.common.authenticator.OAuth2TokenValidator;
import org.wso2.carbon.mdm.mobileservices.windows.common.authenticator.OAuthConstants;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.OAuthTokenValidationException;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.OAuthValidationResponse;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.WindowsAPIUtils;
import org.wso2.carbon.utils.multitenancy.MultitenantUtils; import org.wso2.carbon.utils.multitenancy.MultitenantUtils;
/** /**

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,20 +16,20 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.authenticator.impl; package org.wso2.carbon.device.mgt.mobile.windows.api.common.authenticator.impl;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.apache.commons.pool.impl.GenericObjectPool; import org.apache.commons.pool.impl.GenericObjectPool;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.authenticator.OAuth2TokenValidator;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.authenticator.OAuthTokenValidationStubFactory;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.OAuthTokenValidationException;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.OAuthValidationResponse;
import org.wso2.carbon.identity.oauth2.stub.OAuth2TokenValidationServiceStub; import org.wso2.carbon.identity.oauth2.stub.OAuth2TokenValidationServiceStub;
import org.wso2.carbon.identity.oauth2.stub.dto.OAuth2TokenValidationRequestDTO; import org.wso2.carbon.identity.oauth2.stub.dto.OAuth2TokenValidationRequestDTO;
import org.wso2.carbon.identity.oauth2.stub.dto.OAuth2TokenValidationRequestDTO_OAuth2AccessToken; import org.wso2.carbon.identity.oauth2.stub.dto.OAuth2TokenValidationRequestDTO_OAuth2AccessToken;
import org.wso2.carbon.identity.oauth2.stub.dto.OAuth2TokenValidationRequestDTO_TokenValidationContextParam; import org.wso2.carbon.identity.oauth2.stub.dto.OAuth2TokenValidationRequestDTO_TokenValidationContextParam;
import org.wso2.carbon.identity.oauth2.stub.dto.OAuth2TokenValidationResponseDTO; import org.wso2.carbon.identity.oauth2.stub.dto.OAuth2TokenValidationResponseDTO;
import org.wso2.carbon.mdm.mobileservices.windows.common.authenticator.OAuth2TokenValidator;
import org.wso2.carbon.mdm.mobileservices.windows.common.authenticator.OAuthTokenValidationStubFactory;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.OAuthTokenValidationException;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.OAuthValidationResponse;
import org.wso2.carbon.utils.multitenancy.MultitenantUtils; import org.wso2.carbon.utils.multitenancy.MultitenantUtils;
import java.rmi.RemoteException; import java.rmi.RemoteException;
@ -41,7 +41,8 @@ import java.util.Properties;
public class RemoteOAuthValidator implements OAuth2TokenValidator { public class RemoteOAuthValidator implements OAuth2TokenValidator {
private GenericObjectPool stubs; private GenericObjectPool stubs;
private static final Log log = LogFactory.getLog(RemoteOAuthValidator.class); private static final Log log = LogFactory.getLog(
org.wso2.carbon.device.mgt.mobile.windows.api.common.authenticator.impl.RemoteOAuthValidator.class);
public RemoteOAuthValidator(String hostURL, String adminUsername, String adminPassword, Properties properties) { public RemoteOAuthValidator(String hostURL, String adminUsername, String adminPassword, Properties properties) {
this.stubs = this.stubs =
@ -60,10 +61,10 @@ public class RemoteOAuthValidator implements OAuth2TokenValidator {
stub.findOAuthConsumerIfTokenIsValid(validationRequest).getAccessTokenValidationResponse(); stub.findOAuthConsumerIfTokenIsValid(validationRequest).getAccessTokenValidationResponse();
} catch (RemoteException e) { } catch (RemoteException e) {
throw new OAuthTokenValidationException("Remote Exception occurred while invoking the Remote " + throw new OAuthTokenValidationException("Remote Exception occurred while invoking the Remote " +
"IS server for OAuth2 token validation.", e); "IS server for OAuth2 token validation.", e);
} catch (Exception e) { } catch (Exception e) {
throw new OAuthTokenValidationException("Error occurred while borrowing an oauth token validation " + throw new OAuthTokenValidationException("Error occurred while borrowing an oauth token validation " +
"service stub from the pool", e); "service stub from the pool", e);
} finally { } finally {
try { try {
this.stubs.returnObject(stub); this.stubs.returnObject(stub);

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.beans; package org.wso2.carbon.device.mgt.mobile.windows.api.common.beans;
import java.io.Serializable; import java.io.Serializable;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.adminoperations.beans; package org.wso2.carbon.device.mgt.mobile.windows.api.common.beans;
/** /**
* Class for get device IDS. * Class for get device IDS.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,9 +16,9 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.adminoperations.beans; package org.wso2.carbon.device.mgt.mobile.windows.api.common.beans;
import org.wso2.carbon.mdm.mobileservices.windows.services.syncml.beans.BasicOperation; import org.wso2.carbon.device.mgt.mobile.windows.api.services.syncml.beans.BasicOperation;
import java.util.List; import java.util.List;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.beans; package org.wso2.carbon.device.mgt.mobile.windows.api.common.beans;
/** /**
* Class for challenge token * Class for challenge token

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.exceptions; package org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions;
/** /**
* Exception class for authentication failures in windows device enrollment. * Exception class for authentication failures in windows device enrollment.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,9 +16,9 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.exceptions; package org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.Message; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.Message;
import javax.ws.rs.WebApplicationException; import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.exceptions; package org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions;
/** /**
* Exception class for Certificate generation failures in WSTEP stage. * Exception class for Certificate generation failures in WSTEP stage.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.exceptions; package org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions;
/** /**
* Exception class for file reading/writing failures. * Exception class for file reading/writing failures.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.exceptions; package org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions;
/** /**
* Exception class for Keystore generation failures. * Exception class for Keystore generation failures.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.exceptions; package org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions;
/** /**
* MDMAPIUtils class provides utility function which are used by CDM REST-API classes. * MDMAPIUtils class provides utility function which are used by CDM REST-API classes.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.exceptions; package org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions;
/** /**
* Custom exception to be thrown inside OAuthTokenValidation related functionality. * Custom exception to be thrown inside OAuthTokenValidation related functionality.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.exceptions; package org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions;
/** /**
* Exception class for bad format syncml message exceptions. * Exception class for bad format syncml message exceptions.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.exceptions; package org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions;
/** /**
* Exception class for syncml Operation and policy related errors. * Exception class for syncml Operation and policy related errors.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.exceptions; package org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions;
/** /**
* Exception class for property/provisioning XML file reading failures. * Exception class for property/provisioning XML file reading failures.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.exceptions; package org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions;
/** /**
* Custom class for windows device configurations. * Custom class for windows device configurations.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.exceptions; package org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions;
/** /**
* Exception class for general WSTEP messaging/message generation failures. * Exception class for general WSTEP messaging/message generation failures.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
@ -16,9 +16,9 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.exceptions; package org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.Message; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.Message;
import javax.ws.rs.WebApplicationException; import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.util; package org.wso2.carbon.device.mgt.mobile.windows.api.common.util;
/** /**
* DTO class to hold the information of authenticated user. * DTO class to hold the information of authenticated user.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.util; package org.wso2.carbon.device.mgt.mobile.windows.api.common.util;
import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.binary.Base64;
import org.apache.ws.security.WSSecurityException; import org.apache.ws.security.WSSecurityException;
@ -26,12 +26,12 @@ import org.apache.ws.security.validate.Credential;
import org.apache.ws.security.validate.Validator; import org.apache.ws.security.validate.Validator;
import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.mdm.mobileservices.windows.common.PluginConstants; import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
import org.wso2.carbon.mdm.mobileservices.windows.common.authenticator.OAuthValidatorFactory; import org.wso2.carbon.device.mgt.mobile.windows.api.common.authenticator.OAuthValidatorFactory;
import org.wso2.carbon.mdm.mobileservices.windows.common.beans.CacheEntry; import org.wso2.carbon.device.mgt.mobile.windows.api.common.beans.CacheEntry;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.AuthenticationException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.AuthenticationException;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.OAuthTokenValidationException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.OAuthTokenValidationException;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.WindowsDeviceEnrolmentException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDeviceEnrolmentException;
import java.util.HashMap; import java.util.HashMap;
@ -92,7 +92,7 @@ public class BSTValidator implements Validator {
* @throws AuthenticationException * @throws AuthenticationException
*/ */
private boolean authenticate(String binarySecurityToken, AuthenticationInfo authenticationInfo) throws private boolean authenticate(String binarySecurityToken, AuthenticationInfo authenticationInfo) throws
AuthenticationException { AuthenticationException {
WindowsAPIUtils.startTenantFlow(authenticationInfo); WindowsAPIUtils.startTenantFlow(authenticationInfo);
if (DeviceUtil.getCacheEntry(binarySecurityToken) != null) { if (DeviceUtil.getCacheEntry(binarySecurityToken) != null) {
CacheEntry cacheentry = (CacheEntry) DeviceUtil.getCacheEntry(binarySecurityToken); CacheEntry cacheentry = (CacheEntry) DeviceUtil.getCacheEntry(binarySecurityToken);

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,9 +16,9 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.util; package org.wso2.carbon.device.mgt.mobile.windows.api.common.util;
import org.wso2.carbon.mdm.mobileservices.windows.common.PluginConstants; import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
import javax.servlet.ServletContext; import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextEvent;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.util; package org.wso2.carbon.device.mgt.mobile.windows.api.common.util;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceIdentifier;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,9 +16,9 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.util; package org.wso2.carbon.device.mgt.mobile.windows.api.common.util;
import org.wso2.carbon.mdm.mobileservices.windows.common.beans.CacheEntry; import org.wso2.carbon.device.mgt.mobile.windows.api.common.beans.CacheEntry;
import javax.cache.Cache; import javax.cache.Cache;
import javax.cache.CacheConfiguration; import javax.cache.CacheConfiguration;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,9 +16,9 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.util; package org.wso2.carbon.device.mgt.mobile.windows.api.common.util;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.WindowsConfigurationException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsConfigurationException;
import javax.ws.rs.Produces; import javax.ws.rs.Produces;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -19,7 +19,7 @@
/** /**
* Generate Error Messages for responses. * Generate Error Messages for responses.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.util; package org.wso2.carbon.device.mgt.mobile.windows.api.common.util;
public class ErrorMessage { public class ErrorMessage {

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.util; package org.wso2.carbon.device.mgt.mobile.windows.api.common.util;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.util; package org.wso2.carbon.device.mgt.mobile.windows.api.common.util;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.util; package org.wso2.carbon.device.mgt.mobile.windows.api.common.util;
/** /**
* Class for OAuthValidation Response. * Class for OAuthValidation Response.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,10 +16,9 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.util; package org.wso2.carbon.device.mgt.mobile.windows.api.common.util;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
import org.wso2.carbon.mdm.mobileservices.windows.common.PluginConstants;
import javax.xml.namespace.QName; import javax.xml.namespace.QName;
import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.MessageContext;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,15 +16,15 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.util; package org.wso2.carbon.device.mgt.mobile.windows.api.common.util;
import org.apache.ws.security.WSSecurityException; import org.apache.ws.security.WSSecurityException;
import org.apache.ws.security.handler.RequestData; import org.apache.ws.security.handler.RequestData;
import org.apache.ws.security.validate.Credential; import org.apache.ws.security.validate.Credential;
import org.apache.ws.security.validate.Validator; import org.apache.ws.security.validate.Validator;
import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.AuthenticationException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.AuthenticationException;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.WindowsDeviceEnrolmentException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDeviceEnrolmentException;
import org.wso2.carbon.user.api.UserRealm; import org.wso2.carbon.user.api.UserRealm;
import org.wso2.carbon.user.api.UserStoreException; import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.user.core.service.RealmService; import org.wso2.carbon.user.core.service.RealmService;
@ -82,7 +82,7 @@ public class UsernameTokenValidator implements Validator {
* @throws AuthenticationException * @throws AuthenticationException
*/ */
public boolean authenticate(String username, String password, String tenantDomain) throws public boolean authenticate(String username, String password, String tenantDomain) throws
AuthenticationException { AuthenticationException {
try { try {
PrivilegedCarbonContext.startTenantFlow(); PrivilegedCarbonContext.startTenantFlow();

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.util; package org.wso2.carbon.device.mgt.mobile.windows.api.common.util;
import org.wso2.carbon.base.MultitenantConstants; import org.wso2.carbon.base.MultitenantConstants;
import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.context.PrivilegedCarbonContext;
@ -29,9 +29,9 @@ import org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagement
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
import org.wso2.carbon.identity.core.util.IdentityTenantUtil; import org.wso2.carbon.identity.core.util.IdentityTenantUtil;
import org.wso2.carbon.identity.oauth2.OAuth2TokenValidationService; import org.wso2.carbon.identity.oauth2.OAuth2TokenValidationService;
import org.wso2.carbon.mdm.mobileservices.windows.common.PluginConstants;
import org.wso2.carbon.policy.mgt.core.PolicyManagerService; import org.wso2.carbon.policy.mgt.core.PolicyManagerService;
import org.wso2.carbon.user.api.TenantManager; import org.wso2.carbon.user.api.TenantManager;
import org.wso2.carbon.user.api.UserStoreException; import org.wso2.carbon.user.api.UserStoreException;
@ -125,8 +125,9 @@ public class WindowsAPIUtils {
public static List<? extends Operation> getPendingOperations(DeviceIdentifier deviceIdentifier) public static List<? extends Operation> getPendingOperations(DeviceIdentifier deviceIdentifier)
throws OperationManagementException, DeviceManagementException { throws OperationManagementException, DeviceManagementException {
List<? extends Operation> pendingDataOperations; List<? extends Operation> pendingDataOperations;
pendingDataOperations = WindowsAPIUtils.getDeviceManagementService().getOperationsByDeviceAndStatus( pendingDataOperations = org.wso2.carbon.device.mgt.mobile.windows.api.common.util.WindowsAPIUtils.
deviceIdentifier, Operation.Status.PENDING); getDeviceManagementService().getOperationsByDeviceAndStatus(
deviceIdentifier, Operation.Status.PENDING);
return pendingDataOperations; return pendingDataOperations;
} }
@ -201,7 +202,8 @@ public class WindowsAPIUtils {
*/ */
public static List<ConfigurationEntry> getTenantConfigurationData() throws DeviceManagementException { public static List<ConfigurationEntry> getTenantConfigurationData() throws DeviceManagementException {
PlatformConfiguration tenantConfiguration; PlatformConfiguration tenantConfiguration;
if ((tenantConfiguration = WindowsAPIUtils.getTenantConfiguration()) != null) { if ((tenantConfiguration = org.wso2.carbon.device.mgt.mobile.windows.api.common.util.WindowsAPIUtils
.getTenantConfiguration()) != null) {
return tenantConfiguration.getConfiguration(); return tenantConfiguration.getConfiguration();
} else { } else {
return null; return null;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,15 +16,15 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.common.util; package org.wso2.carbon.device.mgt.mobile.windows.api.common.util;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.DeviceManagementConstants; import org.wso2.carbon.device.mgt.common.DeviceManagementConstants;
import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.mdm.mobileservices.windows.common.PluginConstants; import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.BadRequestException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.BadRequestException;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import java.util.ArrayList; import java.util.ArrayList;
@ -51,7 +51,7 @@ public class WindowsDeviceUtils {
deviceIDCounter++; deviceIDCounter++;
if (deviceID == null || deviceID.isEmpty()) { if (deviceID == null || deviceID.isEmpty()) {
errorDeviceIdList.add(String.format(PluginConstants.DeviceConstants.DEVICE_ID_NOT_FOUND, errorDeviceIdList.add(String.format(PluginConstants.DeviceConstants.DEVICE_ID_NOT_FOUND,
deviceIDCounter)); deviceIDCounter));
continue; continue;
} }
try { try {
@ -64,13 +64,13 @@ public class WindowsDeviceUtils {
if (device == null || device.getDeviceIdentifier() == null || if (device == null || device.getDeviceIdentifier() == null ||
device.getDeviceIdentifier().isEmpty()) { device.getDeviceIdentifier().isEmpty()) {
errorDeviceIdList.add(String.format(PluginConstants.DeviceConstants.DEVICE_ID_NOT_FOUND, errorDeviceIdList.add(String.format(PluginConstants.DeviceConstants.DEVICE_ID_NOT_FOUND,
deviceIDCounter)); deviceIDCounter));
continue; continue;
} }
validDeviceIDList.add(deviceIdentifier); validDeviceIDList.add(deviceIdentifier);
} catch (DeviceManagementException e) { } catch (DeviceManagementException e) {
errorDeviceIdList.add(String.format(PluginConstants.DeviceConstants.DEVICE_ID_SERVICE_NOT_FOUND, errorDeviceIdList.add(String.format(PluginConstants.DeviceConstants.DEVICE_ID_SERVICE_NOT_FOUND,
deviceIDCounter)); deviceIDCounter));
} }
} }
DeviceIDHolder deviceIDHolder = new DeviceIDHolder(); DeviceIDHolder deviceIDHolder = new DeviceIDHolder();

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,11 +16,11 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations; package org.wso2.carbon.device.mgt.mobile.windows.api.operations;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.wso2.carbon.mdm.mobileservices.windows.operations.util.Constants; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.Constants;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,11 +16,11 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations; package org.wso2.carbon.device.mgt.mobile.windows.api.operations;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.wso2.carbon.mdm.mobileservices.windows.operations.util.Constants; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.Constants;
/** /**
* Inform an event occurred from device to server. * Inform an event occurred from device to server.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,11 +16,11 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations; package org.wso2.carbon.device.mgt.mobile.windows.api.operations;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.wso2.carbon.mdm.mobileservices.windows.operations.util.Constants; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.Constants;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,11 +16,11 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations; package org.wso2.carbon.device.mgt.mobile.windows.api.operations;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.wso2.carbon.mdm.mobileservices.windows.operations.util.Constants; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.Constants;
/** /**
* Challenge data pass through the device and Device Management server for the security purpose. * Challenge data pass through the device and Device Management server for the security purpose.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,11 +16,11 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations; package org.wso2.carbon.device.mgt.mobile.windows.api.operations;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.wso2.carbon.mdm.mobileservices.windows.operations.util.Constants; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.Constants;
/** /**
* Credentials passed between the device and the server for security purposes. * Credentials passed between the device and the server for security purposes.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,11 +16,11 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations; package org.wso2.carbon.device.mgt.mobile.windows.api.operations;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.wso2.carbon.mdm.mobileservices.windows.operations.util.Constants; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.Constants;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,11 +16,11 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations; package org.wso2.carbon.device.mgt.mobile.windows.api.operations;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.wso2.carbon.mdm.mobileservices.windows.operations.util.Constants; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.Constants;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,11 +16,11 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations; package org.wso2.carbon.device.mgt.mobile.windows.api.operations;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.wso2.carbon.mdm.mobileservices.windows.operations.util.Constants; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.Constants;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,11 +16,11 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations; package org.wso2.carbon.device.mgt.mobile.windows.api.operations;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.wso2.carbon.mdm.mobileservices.windows.operations.util.Constants; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.Constants;
/** /**
* Represents an items that should be retrieved from the device or a command. * Represents an items that should be retrieved from the device or a command.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,12 +16,12 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations; package org.wso2.carbon.device.mgt.mobile.windows.api.operations;
import org.w3c.dom.Attr; import org.w3c.dom.Attr;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.wso2.carbon.mdm.mobileservices.windows.operations.util.Constants; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.Constants;
/** /**
* MetaTag data related to credentials. * MetaTag data related to credentials.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,11 +16,11 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations; package org.wso2.carbon.device.mgt.mobile.windows.api.operations;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.wso2.carbon.mdm.mobileservices.windows.operations.util.Constants; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.Constants;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,11 +16,11 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations; package org.wso2.carbon.device.mgt.mobile.windows.api.operations;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.wso2.carbon.mdm.mobileservices.windows.operations.util.Constants; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.Constants;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,11 +16,11 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations; package org.wso2.carbon.device.mgt.mobile.windows.api.operations;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.wso2.carbon.mdm.mobileservices.windows.operations.util.Constants; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.Constants;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,11 +16,11 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations; package org.wso2.carbon.device.mgt.mobile.windows.api.operations;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.wso2.carbon.mdm.mobileservices.windows.operations.util.Constants; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.Constants;
/** /**
* Source details of syncml header's. * Source details of syncml header's.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,11 +16,11 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations; package org.wso2.carbon.device.mgt.mobile.windows.api.operations;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.wso2.carbon.mdm.mobileservices.windows.operations.util.Constants; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.Constants;
/** /**
* Status of a previously sent message to device; * Status of a previously sent message to device;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,11 +16,11 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations; package org.wso2.carbon.device.mgt.mobile.windows.api.operations;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.wso2.carbon.mdm.mobileservices.windows.operations.util.Constants; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.Constants;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations; package org.wso2.carbon.device.mgt.mobile.windows.api.operations;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,11 +16,11 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations; package org.wso2.carbon.device.mgt.mobile.windows.api.operations;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.wso2.carbon.mdm.mobileservices.windows.operations.util.Constants; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.Constants;
/** /**
* Represents the header details of a syncml. * Represents the header details of a syncml.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,11 +16,11 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations; package org.wso2.carbon.device.mgt.mobile.windows.api.operations;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.wso2.carbon.mdm.mobileservices.windows.operations.util.Constants; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.Constants;
/** /**
* Target details of syncml header's. * Target details of syncml header's.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations; package org.wso2.carbon.device.mgt.mobile.windows.api.operations;
/** /**
* Exceptions related to operation retrieval and syncml generation * Exceptions related to operation retrieval and syncml generation

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations.util; package org.wso2.carbon.device.mgt.mobile.windows.api.operations.util;
/** /**
* Constant values used in syncml generator. * Constant values used in syncml generator.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,10 +16,10 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations.util; package org.wso2.carbon.device.mgt.mobile.windows.api.operations.util;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
import org.wso2.carbon.mdm.mobileservices.windows.common.PluginConstants; import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations.util; package org.wso2.carbon.device.mgt.mobile.windows.api.operations.util;
/** /**
* Maps operation codes to device specific format. * Maps operation codes to device specific format.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations.util; package org.wso2.carbon.device.mgt.mobile.windows.api.operations.util;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
@ -29,10 +29,10 @@ import org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagement
import org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagementService; import org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagementService;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
import org.wso2.carbon.mdm.mobileservices.windows.common.PluginConstants; import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.WindowsAPIUtils; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.WindowsAPIUtils;
import org.wso2.carbon.mdm.mobileservices.windows.operations.*; import org.wso2.carbon.device.mgt.mobile.windows.api.services.syncml.beans.Profile;
import org.wso2.carbon.mdm.mobileservices.windows.services.syncml.beans.Profile; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.*;
import org.wso2.carbon.policy.mgt.common.PolicyManagementException; import org.wso2.carbon.policy.mgt.common.PolicyManagementException;
import org.wso2.carbon.policy.mgt.common.ProfileFeature; import org.wso2.carbon.policy.mgt.common.ProfileFeature;
import org.wso2.carbon.policy.mgt.common.monitor.ComplianceFeature; import org.wso2.carbon.policy.mgt.common.monitor.ComplianceFeature;
@ -41,13 +41,14 @@ import org.wso2.carbon.policy.mgt.common.monitor.PolicyComplianceException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static org.wso2.carbon.mdm.mobileservices.windows.common.util.WindowsAPIUtils.convertToDeviceIdentifierObject; import static org.wso2.carbon.device.mgt.mobile.windows.api.common.util.WindowsAPIUtils.convertToDeviceIdentifierObject;
/** /**
* This class is used to handle pending operations of the device. * This class is used to handle pending operations of the device.
*/ */
public class OperationHandler { public class OperationHandler {
private static Log log = LogFactory.getLog(OperationHandler.class); private static Log log = LogFactory.getLog(
org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.OperationHandler.class);
/** /**
@ -352,7 +353,7 @@ public class OperationHandler {
for (ItemTag item : results) { for (ItemTag item : results) {
for (OperationCode.Info info : OperationCode.Info.values()) { for (OperationCode.Info info : OperationCode.Info.values()) {
if (item.getSource().getLocURI().equals(info.getCode()) && if (item.getSource().getLocURI().equals(info.getCode()) &&
PluginConstants.OperationCodes.CAMERA_STATUS.equals(info.name())) { PluginConstants.OperationCodes.CAMERA_STATUS.equals(info.name())) {
Profile cameraProfile = new Profile(); Profile cameraProfile = new Profile();
cameraProfile.setFeatureCode(PluginConstants.OperationCodes.CAMERA); cameraProfile.setFeatureCode(PluginConstants.OperationCodes.CAMERA);
cameraProfile.setData(item.getData()); cameraProfile.setData(item.getData());
@ -364,7 +365,7 @@ public class OperationHandler {
profiles.add(cameraProfile); profiles.add(cameraProfile);
} }
if (item.getSource().getLocURI().equals(info.getCode()) && if (item.getSource().getLocURI().equals(info.getCode()) &&
PluginConstants.OperationCodes.ENCRYPT_STORAGE_STATUS.equals(info.name())) { PluginConstants.OperationCodes.ENCRYPT_STORAGE_STATUS.equals(info.name())) {
Profile encryptStorage = new Profile(); Profile encryptStorage = new Profile();
encryptStorage.setFeatureCode(PluginConstants.OperationCodes.ENCRYPT_STORAGE); encryptStorage.setFeatureCode(PluginConstants.OperationCodes.ENCRYPT_STORAGE);
encryptStorage.setData(item.getData()); encryptStorage.setData(item.getData());
@ -376,7 +377,7 @@ public class OperationHandler {
profiles.add(encryptStorage); profiles.add(encryptStorage);
} }
if (item.getSource().getLocURI().equals(info.getCode()) && if (item.getSource().getLocURI().equals(info.getCode()) &&
PluginConstants.OperationCodes.DEVICE_PASSWORD_STATUS.equals(info.name())) { PluginConstants.OperationCodes.DEVICE_PASSWORD_STATUS.equals(info.name())) {
Profile encryptStorage = new Profile(); Profile encryptStorage = new Profile();
encryptStorage.setFeatureCode(PluginConstants.OperationCodes.PASSCODE_POLICY); encryptStorage.setFeatureCode(PluginConstants.OperationCodes.PASSCODE_POLICY);
encryptStorage.setData(item.getData()); encryptStorage.setData(item.getData());
@ -475,7 +476,7 @@ public class OperationHandler {
} }
} }
WindowsAPIUtils.getPolicyManagerService().checkPolicyCompliance(deviceIdentifier, WindowsAPIUtils.getPolicyManagerService().checkPolicyCompliance(deviceIdentifier,
complianceFeatures); complianceFeatures);
} }
} catch (JSONException e) { } catch (JSONException e) {
throw new WindowsOperationException("Error occurred while parsing json object.", e); throw new WindowsOperationException("Error occurred while parsing json object.", e);

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,21 +16,21 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations.util; package org.wso2.carbon.device.mgt.mobile.windows.api.operations.util;
import com.google.gson.Gson; import com.google.gson.Gson;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
import org.wso2.carbon.mdm.mobileservices.windows.common.PluginConstants; import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
import org.wso2.carbon.mdm.mobileservices.windows.common.SyncmlCommandType; import org.wso2.carbon.device.mgt.mobile.windows.api.common.SyncmlCommandType;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.SyncmlMessageFormatException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.SyncmlMessageFormatException;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.SyncmlOperationException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.SyncmlOperationException;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.WindowsAPIUtils; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.WindowsAPIUtils;
import org.wso2.carbon.mdm.mobileservices.windows.operations.*; import org.wso2.carbon.device.mgt.mobile.windows.api.services.syncml.beans.PasscodePolicy;
import org.wso2.carbon.mdm.mobileservices.windows.services.syncml.beans.PasscodePolicy; import org.wso2.carbon.device.mgt.mobile.windows.api.services.syncml.beans.Wifi;
import org.wso2.carbon.mdm.mobileservices.windows.services.syncml.beans.Wifi; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.*;
import org.wso2.carbon.policy.mgt.common.FeatureManagementException; import org.wso2.carbon.policy.mgt.common.FeatureManagementException;
import org.wso2.carbon.policy.mgt.common.PolicyManagementException; import org.wso2.carbon.policy.mgt.common.PolicyManagementException;
import org.wso2.carbon.policy.mgt.common.ProfileFeature; import org.wso2.carbon.policy.mgt.common.ProfileFeature;
@ -38,8 +38,8 @@ import org.wso2.carbon.policy.mgt.common.ProfileFeature;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static org.wso2.carbon.mdm.mobileservices.windows.common.util.WindowsAPIUtils.convertToDeviceIdentifierObject; import static org.wso2.carbon.device.mgt.mobile.windows.api.common.util.WindowsAPIUtils.convertToDeviceIdentifierObject;
import static org.wso2.carbon.mdm.mobileservices.windows.operations.util.OperationCode.*; import static org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.OperationCode.*;
/** /**
* Used to generate a reply to a receiving syncml from a device. * Used to generate a reply to a receiving syncml from a device.
@ -199,7 +199,8 @@ public class OperationReply {
} }
private void appendOperations(SyncmlBody syncmlBody) throws PolicyManagementException, private void appendOperations(SyncmlBody syncmlBody) throws PolicyManagementException,
FeatureManagementException, JSONException, SyncmlOperationException { FeatureManagementException, JSONException,
SyncmlOperationException {
GetTag getElement = new GetTag(); GetTag getElement = new GetTag();
List<ItemTag> getElements = new ArrayList<>(); List<ItemTag> getElements = new ArrayList<>();
List<ExecuteTag> executeElements = new ArrayList<>(); List<ExecuteTag> executeElements = new ArrayList<>();
@ -340,7 +341,7 @@ public class OperationReply {
} }
} }
if ((operationCode != null) && if ((operationCode != null) &&
PluginConstants.OperationCodes.LOCK_RESET.equals(operationCode)) { PluginConstants.OperationCodes.LOCK_RESET.equals(operationCode)) {
operation.setCode(PluginConstants.OperationCodes.PIN_CODE); operation.setCode(PluginConstants.OperationCodes.PIN_CODE);
for (Info getInfo : Info.values()) { for (Info getInfo : Info.values()) {
if (operation.getCode().equals(getInfo.name())) { if (operation.getCode().equals(getInfo.name())) {
@ -513,7 +514,8 @@ public class OperationReply {
} }
public SequenceTag buildSequence(Operation operation, SequenceTag sequenceElement) throws public SequenceTag buildSequence(Operation operation, SequenceTag sequenceElement) throws
JSONException, SyncmlOperationException { JSONException,
SyncmlOperationException {
sequenceElement.setCommandId(operation.getId()); sequenceElement.setCommandId(operation.getId());
List<ReplaceTag> replaceItems = new ArrayList<>(); List<ReplaceTag> replaceItems = new ArrayList<>();

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,10 +16,10 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations.util; package org.wso2.carbon.device.mgt.mobile.windows.api.operations.util;
import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.binary.Base64;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.SyncmlMessageFormatException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.SyncmlMessageFormatException;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.security.MessageDigest; import java.security.MessageDigest;
@ -45,7 +45,7 @@ public class SyncmlCredentialUtil {
throw new SyncmlMessageFormatException("Problem occurred while decoding credentials data.", e); throw new SyncmlMessageFormatException("Problem occurred while decoding credentials data.", e);
} catch (NoSuchAlgorithmException e) { } catch (NoSuchAlgorithmException e) {
throw new SyncmlMessageFormatException("Application environment does not have an implementation " + throw new SyncmlMessageFormatException("Application environment does not have an implementation " +
"available/configured for the requested algorithm", e); "available/configured for the requested algorithm", e);
} }
return usrPwdNonceHash; return usrPwdNonceHash;
} }
@ -65,7 +65,7 @@ public class SyncmlCredentialUtil {
throw new SyncmlMessageFormatException("Problem occurred while decoding credentials data.", e); throw new SyncmlMessageFormatException("Problem occurred while decoding credentials data.", e);
} catch (NoSuchAlgorithmException e) { } catch (NoSuchAlgorithmException e) {
throw new SyncmlMessageFormatException("Application environment does not have an implementation " + throw new SyncmlMessageFormatException("Application environment does not have an implementation " +
"available/configured for the requested algorithm", e); "available/configured for the requested algorithm", e);
} }
return usrPwdNonceHash; return usrPwdNonceHash;
} }

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,14 +16,14 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations.util; package org.wso2.carbon.device.mgt.mobile.windows.api.operations.util;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.SyncmlOperationException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.SyncmlOperationException;
import org.wso2.carbon.mdm.mobileservices.windows.operations.SyncmlBody; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.SyncmlDocument;
import org.wso2.carbon.mdm.mobileservices.windows.operations.SyncmlDocument; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.SyncmlHeader;
import org.wso2.carbon.mdm.mobileservices.windows.operations.SyncmlHeader; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.SyncmlBody;
import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,13 +16,13 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations.util; package org.wso2.carbon.device.mgt.mobile.windows.api.operations.util;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Node; import org.w3c.dom.Node;
import org.w3c.dom.NodeList; import org.w3c.dom.NodeList;
import org.wso2.carbon.mdm.mobileservices.windows.common.PluginConstants; import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
import org.wso2.carbon.mdm.mobileservices.windows.operations.*; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -4,7 +4,7 @@
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,13 +16,13 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.operations.util; package org.wso2.carbon.device.mgt.mobile.windows.api.operations.util;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
import org.wso2.carbon.mdm.mobileservices.windows.operations.AddTag; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.AddTag;
import org.wso2.carbon.mdm.mobileservices.windows.operations.ItemTag; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.ItemTag;
import org.wso2.carbon.mdm.mobileservices.windows.operations.MetaTag; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.MetaTag;
import org.wso2.carbon.mdm.mobileservices.windows.operations.TargetTag; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.TargetTag;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,21 +16,16 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.configurationmgtservice; package org.wso2.carbon.device.mgt.mobile.windows.api.services;
import org.wso2.carbon.apimgt.annotations.api.API; import org.wso2.carbon.apimgt.annotations.api.API;
import org.wso2.carbon.apimgt.annotations.api.Scope; import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.WindowsConfigurationException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsConfigurationException;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.Message; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.Message;
import javax.jws.WebService; import javax.jws.WebService;
import javax.ws.rs.Consumes; import javax.ws.rs.*;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
/** /**
* Windows Platform Configuration REST-API implementation. * Windows Platform Configuration REST-API implementation.

View File

@ -0,0 +1,60 @@
/*
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* you may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.wso2.carbon.device.mgt.mobile.windows.api.services;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDeviceEnrolmentException;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.List;
/**
* Interface for Admin operations persisting. This interface accepts operations added via UI.
*/
@Path("/admin/devices")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public interface DeviceManagementAdminService {
@POST
@Path("/lock-devices")
Response lock(@HeaderParam("Accept") String headerParam, List<String> deviceIds) throws
WindowsDeviceEnrolmentException;
@POST
@Path("/disenroll-devices")
Response disenroll(@HeaderParam("Accept") String headerParam, List<String> deviceIds) throws
WindowsDeviceEnrolmentException;
@POST
@Path("/wipe-devices")
Response wipe(@HeaderParam("Accept") String headerParam, List<String> deviceIds) throws
WindowsDeviceEnrolmentException;
@POST
@Path("/ring-devices")
Response ring(@HeaderParam("Accept") String headerParam, List<String> deviceIds) throws
WindowsDeviceEnrolmentException;
@POST
@Path("/lockreset-devices")
Response lockReset(@HeaderParam("Accept") String acceptHeader, List<String> deviceIds)
throws WindowsDeviceEnrolmentException;
}

View File

@ -4,7 +4,7 @@
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,12 +16,12 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.devicemgtservice; package org.wso2.carbon.device.mgt.mobile.windows.api.services;
import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.license.mgt.License; import org.wso2.carbon.device.mgt.common.license.mgt.License;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.WindowsConfigurationException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsConfigurationException;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.Message; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.Message;
import javax.jws.WebService; import javax.jws.WebService;
import javax.ws.rs.*; import javax.ws.rs.*;
@ -50,25 +50,25 @@ public interface DeviceManagementService {
/** /**
* Fetch Windows device details of a given device Id. * Fetch Windows device details of a given device Id.
* *
* @param id Device Id * @param deviceId Device Id
* @return Returns retrieved device. * @return Returns retrieved device.
* @throws WindowsConfigurationException occurred while getting device from DB. * @throws WindowsConfigurationException occurred while getting device from DB.
*/ */
@GET @GET
@Path("{id}") @Path("{id}")
Device getDevice(@PathParam("id") String id) throws WindowsConfigurationException; Device getDevice(@PathParam("id") String deviceId) throws WindowsConfigurationException;
/** /**
* Update Windows device details of given device id. * Update Windows device details of given device id.
* *
* @param id Device Id. * @param deviceId Device Id.
* @param device Device details to be updated. * @param device Device details to be updated.
* @return Returns the message whether device update or not. * @return Returns the message whether device update or not.
* @throws WindowsConfigurationException occurred while updating the Device Info. * @throws WindowsConfigurationException occurred while updating the Device Info.
*/ */
@PUT @PUT
@Path("{id}") @Path("{id}")
Message updateDevice(@PathParam("id") String id, Device device) throws WindowsConfigurationException; Message updateDevice(@PathParam("id") String deviceId, Device device) throws WindowsConfigurationException;
/** /**
* Fetch the Licence agreement for specific windows platform. * Fetch the Licence agreement for specific windows platform.
* *

View File

@ -0,0 +1,46 @@
/*
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* you may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.wso2.carbon.device.mgt.mobile.windows.api.services;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsConfigurationException;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.Message;
import javax.jws.WebService;
import javax.ws.rs.*;
/**
* Endpoint for Enforce Effective Policy.
*/
@WebService
@Produces({ "application/json", "application/xml"})
@Consumes({"application/json", "application/xml"})
public interface PolicyManagementService {
/**
* Get the applicable effective policy for an enrolled windows device.
*
* @param deviceId Device Id
* @return Returns retrieved devices.
* @throws WindowsConfigurationException occurred while retrieving all the devices from DB.
*/
@GET
@Path("{deviceId}")
Message getEffectivePolicy(@HeaderParam("Accept") String acceptHeader,
@PathParam("deviceId") String deviceId) throws WindowsConfigurationException;
}

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,10 +16,10 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.authbst; package org.wso2.carbon.device.mgt.mobile.windows.api.services.authbst;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.WindowsDeviceEnrolmentException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDeviceEnrolmentException;
import org.wso2.carbon.mdm.mobileservices.windows.services.authbst.beans.Credentials; import org.wso2.carbon.device.mgt.mobile.windows.api.services.authbst.beans.Credentials;
import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.POST; import javax.ws.rs.POST;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.authbst.beans; package org.wso2.carbon.device.mgt.mobile.windows.api.services.authbst.beans;
import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,18 +16,18 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.authbst.impl; package org.wso2.carbon.device.mgt.mobile.windows.api.services.authbst.impl;
import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.binary.Base64;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.mdm.mobileservices.windows.common.beans.Token; import org.wso2.carbon.device.mgt.mobile.windows.api.common.beans.Token;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.AuthenticationException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.AuthenticationException;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.WindowsDeviceEnrolmentException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDeviceEnrolmentException;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.DeviceUtil; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.DeviceUtil;
import org.wso2.carbon.mdm.mobileservices.windows.services.authbst.BSTProvider; import org.wso2.carbon.device.mgt.mobile.windows.api.services.authbst.BSTProvider;
import org.wso2.carbon.mdm.mobileservices.windows.services.authbst.beans.Credentials; import org.wso2.carbon.device.mgt.mobile.windows.api.services.authbst.beans.Credentials;
import org.wso2.carbon.user.api.UserRealm; import org.wso2.carbon.user.api.UserRealm;
import org.wso2.carbon.user.api.UserStoreException; import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.user.core.service.RealmService; import org.wso2.carbon.user.core.service.RealmService;
@ -78,7 +78,7 @@ public class BSTProviderImpl implements BSTProvider {
* @throws AuthenticationException * @throws AuthenticationException
*/ */
private boolean authenticate(String username, String password, String tenantDomain) throws private boolean authenticate(String username, String password, String tenantDomain) throws
AuthenticationException { AuthenticationException {
try { try {
PrivilegedCarbonContext.startTenantFlow(); PrivilegedCarbonContext.startTenantFlow();

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,12 +16,12 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.discovery; package org.wso2.carbon.device.mgt.mobile.windows.api.services.discovery;
import org.wso2.carbon.mdm.mobileservices.windows.common.PluginConstants; import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.WindowsDeviceEnrolmentException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDeviceEnrolmentException;
import org.wso2.carbon.mdm.mobileservices.windows.services.discovery.beans.DiscoveryRequest; import org.wso2.carbon.device.mgt.mobile.windows.api.services.discovery.beans.DiscoveryRequest;
import org.wso2.carbon.mdm.mobileservices.windows.services.discovery.beans.DiscoveryResponse; import org.wso2.carbon.device.mgt.mobile.windows.api.services.discovery.beans.DiscoveryResponse;
import javax.jws.WebMethod; import javax.jws.WebMethod;
import javax.jws.WebParam; import javax.jws.WebParam;
@ -49,10 +49,10 @@ public interface DiscoveryService {
@ResponseWrapper(localName = "DiscoverResponse", targetNamespace = PluginConstants.DISCOVERY_SERVICE_TARGET_NAMESPACE) @ResponseWrapper(localName = "DiscoverResponse", targetNamespace = PluginConstants.DISCOVERY_SERVICE_TARGET_NAMESPACE)
void discover( void discover(
@WebParam(name = "request", targetNamespace = PluginConstants.DISCOVERY_SERVICE_TARGET_NAMESPACE) @WebParam(name = "request", targetNamespace = PluginConstants.DISCOVERY_SERVICE_TARGET_NAMESPACE)
DiscoveryRequest request, DiscoveryRequest request,
@WebParam(mode = WebParam.Mode.OUT, name = "DiscoverResult", @WebParam(mode = WebParam.Mode.OUT, name = "DiscoverResult",
targetNamespace = PluginConstants.DISCOVERY_SERVICE_TARGET_NAMESPACE) targetNamespace = PluginConstants.DISCOVERY_SERVICE_TARGET_NAMESPACE)
javax.xml.ws.Holder<DiscoveryResponse> response javax.xml.ws.Holder<DiscoveryResponse> response
) throws WindowsDeviceEnrolmentException; ) throws WindowsDeviceEnrolmentException;
@GET @GET

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.discovery.beans; package org.wso2.carbon.device.mgt.mobile.windows.api.services.discovery.beans;
import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.discovery.beans; package org.wso2.carbon.device.mgt.mobile.windows.api.services.discovery.beans;
import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;

View File

@ -0,0 +1,22 @@
/*
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* you may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
@javax.xml.bind.annotation.XmlSchema(namespace =
"http://schemas.microsoft.com/windows/management/2012/01/enrollment",
elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package org.wso2.carbon.device.mgt.mobile.windows.api.services.discovery.beans;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,18 +16,18 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.discovery.impl; package org.wso2.carbon.device.mgt.mobile.windows.api.services.discovery.impl;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry;
import org.wso2.carbon.mdm.mobileservices.windows.common.PluginConstants; import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.WindowsDeviceEnrolmentException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDeviceEnrolmentException;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.WindowsAPIUtils; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.WindowsAPIUtils;
import org.wso2.carbon.mdm.mobileservices.windows.services.discovery.DiscoveryService; import org.wso2.carbon.device.mgt.mobile.windows.api.services.discovery.DiscoveryService;
import org.wso2.carbon.mdm.mobileservices.windows.services.discovery.beans.DiscoveryRequest; import org.wso2.carbon.device.mgt.mobile.windows.api.services.discovery.beans.DiscoveryRequest;
import org.wso2.carbon.mdm.mobileservices.windows.services.discovery.beans.DiscoveryResponse; import org.wso2.carbon.device.mgt.mobile.windows.api.services.discovery.beans.DiscoveryResponse;
import javax.jws.WebService; import javax.jws.WebService;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
@ -50,7 +50,8 @@ public class DiscoveryServiceImpl implements DiscoveryService {
public static final String FEDERATED = "Federated"; public static final String FEDERATED = "Federated";
private static final String DELIMITER = "@"; private static final String DELIMITER = "@";
private static final int DOMAIN_SEGMENT = 1; private static final int DOMAIN_SEGMENT = 1;
private static Log log = LogFactory.getLog(DiscoveryServiceImpl.class); private static Log log = LogFactory.getLog(
org.wso2.carbon.device.mgt.mobile.windows.api.services.discovery.impl.DiscoveryServiceImpl.class);
/** /**
* This method returns the OnPremise AuthPolicy and next two endpoint the mobile device should * This method returns the OnPremise AuthPolicy and next two endpoint the mobile device should
@ -72,13 +73,13 @@ public class DiscoveryServiceImpl implements DiscoveryService {
if (FEDERATED.equals(getAuthPolicy())) { if (FEDERATED.equals(getAuthPolicy())) {
discoveryResponse.setAuthPolicy(FEDERATED); discoveryResponse.setAuthPolicy(FEDERATED);
discoveryResponse.setEnrollmentPolicyServiceUrl(PluginConstants.Discovery.DEVICE_ENROLLMENT_SUBDOMAIN + discoveryResponse.setEnrollmentPolicyServiceUrl(PluginConstants.Discovery.DEVICE_ENROLLMENT_SUBDOMAIN +
domain + PluginConstants.Discovery. domain + PluginConstants.Discovery.
CERTIFICATE_ENROLLMENT_POLICY_SERVICE_URL); CERTIFICATE_ENROLLMENT_POLICY_SERVICE_URL);
discoveryResponse.setEnrollmentServiceUrl(PluginConstants.Discovery.DEVICE_ENROLLMENT_SUBDOMAIN + discoveryResponse.setEnrollmentServiceUrl(PluginConstants.Discovery.DEVICE_ENROLLMENT_SUBDOMAIN +
domain + PluginConstants.Discovery. domain + PluginConstants.Discovery.
CERTIFICATE_ENROLLMENT_SERVICE_URL); CERTIFICATE_ENROLLMENT_SERVICE_URL);
discoveryResponse.setAuthenticationServiceUrl(PluginConstants.Discovery.DEVICE_ENROLLMENT_SUBDOMAIN + discoveryResponse.setAuthenticationServiceUrl(PluginConstants.Discovery.DEVICE_ENROLLMENT_SUBDOMAIN +
domain + PluginConstants.Discovery.WAB_URL); domain + PluginConstants.Discovery.WAB_URL);
} }
response.value = discoveryResponse; response.value = discoveryResponse;
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.configurationmgtservice; package org.wso2.carbon.device.mgt.mobile.windows.api.services.impl;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
@ -25,10 +25,11 @@ import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry; import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry;
import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration;
import org.wso2.carbon.device.mgt.common.license.mgt.License; import org.wso2.carbon.device.mgt.common.license.mgt.License;
import org.wso2.carbon.mdm.mobileservices.windows.common.PluginConstants; import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.WindowsConfigurationException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsConfigurationException;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.Message; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.Message;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.WindowsAPIUtils; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.WindowsAPIUtils;
import org.wso2.carbon.device.mgt.mobile.windows.api.services.ConfigurationMgtService;
import javax.jws.WebService; import javax.jws.WebService;
import javax.ws.rs.*; import javax.ws.rs.*;
@ -40,9 +41,10 @@ import java.util.List;
@Produces({"application/json", "application/xml"}) @Produces({"application/json", "application/xml"})
@Consumes({"application/json", "application/xml"}) @Consumes({"application/json", "application/xml"})
@Path("/") @Path("/")
public class ConfigurationMgtServiceImpl implements ConfigurationMgtService{ public class ConfigurationMgtServiceImpl implements ConfigurationMgtService {
private static Log log = LogFactory.getLog(ConfigurationMgtServiceImpl.class); private static Log log = LogFactory.getLog(
org.wso2.carbon.device.mgt.mobile.windows.api.services.impl.ConfigurationMgtServiceImpl.class);
/** /**
* Save Tenant configurations. * Save Tenant configurations.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.adminoperations.impl; package org.wso2.carbon.device.mgt.mobile.windows.api.services.impl;
import com.ibm.wsdl.OperationImpl; import com.ibm.wsdl.OperationImpl;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
@ -25,12 +25,12 @@ import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
import org.wso2.carbon.device.mgt.core.operation.mgt.CommandOperation; import org.wso2.carbon.device.mgt.core.operation.mgt.CommandOperation;
import org.wso2.carbon.mdm.mobileservices.windows.common.PluginConstants; import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.WindowsDeviceEnrolmentException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDeviceEnrolmentException;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.WindowsOperationsException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsOperationsException;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.Message; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.Message;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.WindowsAPIUtils; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.WindowsAPIUtils;
import org.wso2.carbon.mdm.mobileservices.windows.services.adminoperations.Operations; import org.wso2.carbon.device.mgt.mobile.windows.api.services.DeviceManagementAdminService;
import javax.ws.rs.HeaderParam; import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST; import javax.ws.rs.POST;
@ -43,7 +43,7 @@ import java.util.List;
* Implementation class of operations interface. Each method in this class receives the operations comes via UI * Implementation class of operations interface. Each method in this class receives the operations comes via UI
* and persists those in the correct format. * and persists those in the correct format.
*/ */
public class OperationsImpl implements Operations { public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminService {
private static Log log = LogFactory.getLog(OperationImpl.class); private static Log log = LogFactory.getLog(OperationImpl.class);
@ -56,7 +56,7 @@ public class OperationsImpl implements Operations {
* @throws WindowsDeviceEnrolmentException * @throws WindowsDeviceEnrolmentException
*/ */
@POST @POST
@Path("/lock") @Path("/lock-devices")
public Response lock(@HeaderParam("Accept") String acceptHeader, List<String> deviceIDs) public Response lock(@HeaderParam("Accept") String acceptHeader, List<String> deviceIDs)
throws WindowsDeviceEnrolmentException { throws WindowsDeviceEnrolmentException {
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {

View File

@ -4,7 +4,7 @@
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.devicemgtservice.impl; package org.wso2.carbon.device.mgt.mobile.windows.api.services.impl;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
@ -25,10 +25,10 @@ import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.DeviceManagementConstants; import org.wso2.carbon.device.mgt.common.DeviceManagementConstants;
import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.license.mgt.License; import org.wso2.carbon.device.mgt.common.license.mgt.License;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.WindowsConfigurationException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsConfigurationException;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.Message; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.Message;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.WindowsAPIUtils; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.WindowsAPIUtils;
import org.wso2.carbon.mdm.mobileservices.windows.services.devicemgtservice.DeviceManagementService; import org.wso2.carbon.device.mgt.mobile.windows.api.services.DeviceManagementService;
import javax.jws.WebService; import javax.jws.WebService;
import javax.ws.rs.*; import javax.ws.rs.*;
@ -46,7 +46,8 @@ import java.util.List;
public class DeviceManagementServiceImpl implements DeviceManagementService { public class DeviceManagementServiceImpl implements DeviceManagementService {
private static Log log = LogFactory.getLog(DeviceManagementServiceImpl.class); private static Log log = LogFactory.getLog(
org.wso2.carbon.device.mgt.mobile.windows.api.services.impl.DeviceManagementServiceImpl.class);
/** /**
* Get all devices.Returns list of Windows devices registered in MDM. * Get all devices.Returns list of Windows devices registered in MDM.
@ -72,17 +73,17 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
/** /**
* Fetch Windows device details of a given device Id. * Fetch Windows device details of a given device Id.
* *
* @param id Device Id * @param deviceId Device Id
* @return Returns retrieved device. * @return Returns retrieved device.
* @throws WindowsConfigurationException occurred while getting device from DB. * @throws WindowsConfigurationException occurred while getting device from DB.
*/ */
@GET @GET
@Path("{id}") @Path("{id}")
public Device getDevice(@PathParam("id") String id) throws WindowsConfigurationException { public Device getDevice(@PathParam("id") String deviceId) throws WindowsConfigurationException {
String msg; String msg;
Device device; Device device;
try { try {
DeviceIdentifier deviceIdentifier = WindowsAPIUtils.convertToDeviceIdentifierObject(id); DeviceIdentifier deviceIdentifier = WindowsAPIUtils.convertToDeviceIdentifierObject(deviceId);
device = WindowsAPIUtils.getDeviceManagementService().getDevice(deviceIdentifier); device = WindowsAPIUtils.getDeviceManagementService().getDevice(deviceIdentifier);
if (device == null) { if (device == null) {
Response.status(Response.Status.NOT_FOUND); Response.status(Response.Status.NOT_FOUND);
@ -98,18 +99,18 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
/** /**
* Update Windows device details of given device id. * Update Windows device details of given device id.
* *
* @param id Device Id. * @param deviceId Device Id.
* @param device Device details to be updated. * @param device Device details to be updated.
* @return Returns the message whether device update or not. * @return Returns the message whether device update or not.
* @throws WindowsConfigurationException occurred while updating the Device Info. * @throws WindowsConfigurationException occurred while updating the Device Info.
*/ */
@PUT @PUT
@Path("{id}") @Path("{id}")
public Message updateDevice(@PathParam("id") String id, Device device) throws WindowsConfigurationException { public Message updateDevice(@PathParam("id") String deviceId, Device device) throws WindowsConfigurationException {
String msg; String msg;
Message responseMessage = new Message(); Message responseMessage = new Message();
DeviceIdentifier deviceIdentifier = new DeviceIdentifier(); DeviceIdentifier deviceIdentifier = new DeviceIdentifier();
deviceIdentifier.setId(id); deviceIdentifier.setId(deviceId);
deviceIdentifier.setType(DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_WINDOWS); deviceIdentifier.setType(DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_WINDOWS);
boolean isUpdated; boolean isUpdated;
try { try {

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,37 +16,37 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.policymgtservice; package org.wso2.carbon.device.mgt.mobile.windows.api.services.impl;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.WindowsConfigurationException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsConfigurationException;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.Message; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.Message;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.WindowsAPIUtils; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.WindowsAPIUtils;
import org.wso2.carbon.device.mgt.mobile.windows.api.services.PolicyManagementService;
import org.wso2.carbon.policy.mgt.common.Policy; import org.wso2.carbon.policy.mgt.common.Policy;
import org.wso2.carbon.policy.mgt.common.PolicyManagementException; import org.wso2.carbon.policy.mgt.common.PolicyManagementException;
import org.wso2.carbon.policy.mgt.core.PolicyManagerService; import org.wso2.carbon.policy.mgt.core.PolicyManagerService;
import javax.jws.WebService; import javax.jws.WebService;
import javax.ws.rs.*; import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
/**
* Endpoint for Enforce Effective Policy.
*/
@WebService @WebService
@Produces({"application/json", "application/xml"}) @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
@Consumes({"application/json", "application/xml"}) @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
public class PolicyMgtService { public class PolicyManagementServiceImpl implements PolicyManagementService {
private static Log log = LogFactory.getLog(PolicyMgtService.class); private static Log log = LogFactory.getLog(
org.wso2.carbon.device.mgt.mobile.windows.api.services.impl.PolicyManagementServiceImpl.class);
@GET @GET
@Path("{id}") @Path("{deviceId}")
public Message getEffectivePolicy(@HeaderParam("Accept") String acceptHeader, public Message getEffectivePolicy(@HeaderParam("Accept") String acceptHeader,
@PathParam("id") String id) throws WindowsConfigurationException { @PathParam("deviceId") String deviceId) throws WindowsConfigurationException {
DeviceIdentifier deviceIdentifier = WindowsAPIUtils.convertToDeviceIdentifierObject(id); DeviceIdentifier deviceIdentifier = WindowsAPIUtils.convertToDeviceIdentifierObject(deviceId);
Message responseMessage = new Message(); Message responseMessage = new Message();
Policy policy; Policy policy;
try { try {

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,14 +16,14 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.syncml; package org.wso2.carbon.device.mgt.mobile.windows.api.services.syncml;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagementException; import org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagementException;
import org.wso2.carbon.mdm.mobileservices.windows.common.PluginConstants; import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.WindowsConfigurationException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsConfigurationException;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.WindowsDeviceEnrolmentException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDeviceEnrolmentException;
import org.wso2.carbon.mdm.mobileservices.windows.operations.WindowsOperationException; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.WindowsOperationException;
import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.POST; import javax.ws.rs.POST;
@ -40,9 +40,9 @@ public interface SyncmlService {
@Path("/request") @Path("/request")
@POST @POST
@Consumes({PluginConstants.SYNCML_MEDIA_TYPE, MediaType.APPLICATION_XML}) @Consumes({ PluginConstants.SYNCML_MEDIA_TYPE, MediaType.APPLICATION_XML})
@Produces(PluginConstants.SYNCML_MEDIA_TYPE) @Produces(PluginConstants.SYNCML_MEDIA_TYPE)
Response getResponse(Document request) throws WindowsDeviceEnrolmentException, WindowsOperationException, Response getResponse(Document request) throws WindowsDeviceEnrolmentException, WindowsOperationException,
NotificationManagementException, WindowsConfigurationException; NotificationManagementException, WindowsConfigurationException;
} }

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.syncml.beans; package org.wso2.carbon.device.mgt.mobile.windows.api.services.syncml.beans;
/** /**
* Bean for get basic operations. * Bean for get basic operations.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.syncml.beans; package org.wso2.carbon.device.mgt.mobile.windows.api.services.syncml.beans;
/** /**
* Bean for device updateLockOperation screen passcode policy. * Bean for device updateLockOperation screen passcode policy.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.syncml.beans; package org.wso2.carbon.device.mgt.mobile.windows.api.services.syncml.beans;
/** /**
* Class for contains device active policy. * Class for contains device active policy.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.syncml.beans; package org.wso2.carbon.device.mgt.mobile.windows.api.services.syncml.beans;
/** /**
* Bean for WIFI configurations. * Bean for WIFI configurations.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.syncml.beans; package org.wso2.carbon.device.mgt.mobile.windows.api.services.syncml.beans;
/** /**
* Class for get windows device properties. * Class for get windows device properties.

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.syncml.impl; package org.wso2.carbon.device.mgt.mobile.windows.api.services.syncml.impl;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
@ -26,19 +26,19 @@ import org.wso2.carbon.device.mgt.common.*;
import org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagementException; import org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagementException;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
import org.wso2.carbon.mdm.mobileservices.windows.common.PluginConstants; import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
import org.wso2.carbon.mdm.mobileservices.windows.common.beans.CacheEntry; import org.wso2.carbon.device.mgt.mobile.windows.api.common.beans.CacheEntry;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.SyncmlMessageFormatException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.SyncmlMessageFormatException;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.SyncmlOperationException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.SyncmlOperationException;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.WindowsConfigurationException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsConfigurationException;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.WindowsDeviceEnrolmentException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDeviceEnrolmentException;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.AuthenticationInfo; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.AuthenticationInfo;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.DeviceUtil; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.DeviceUtil;
import org.wso2.carbon.mdm.mobileservices.windows.common.util.WindowsAPIUtils; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.WindowsAPIUtils;
import org.wso2.carbon.mdm.mobileservices.windows.operations.*; import org.wso2.carbon.device.mgt.mobile.windows.api.services.syncml.SyncmlService;
import org.wso2.carbon.mdm.mobileservices.windows.operations.util.*; import org.wso2.carbon.device.mgt.mobile.windows.api.services.syncml.beans.WindowsDevice;
import org.wso2.carbon.mdm.mobileservices.windows.services.syncml.SyncmlService; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.*;
import org.wso2.carbon.mdm.mobileservices.windows.services.syncml.beans.WindowsDevice; import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.*;
import org.wso2.carbon.policy.mgt.common.PolicyManagementException; import org.wso2.carbon.policy.mgt.common.PolicyManagementException;
import org.wso2.carbon.policy.mgt.core.PolicyManagerService; import org.wso2.carbon.policy.mgt.core.PolicyManagerService;
@ -46,14 +46,15 @@ import javax.ws.rs.core.Response;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static org.wso2.carbon.mdm.mobileservices.windows.common.util.WindowsAPIUtils.convertToDeviceIdentifierObject; import static org.wso2.carbon.device.mgt.mobile.windows.api.common.util.WindowsAPIUtils.convertToDeviceIdentifierObject;
/** /**
* Implementing class of SyncmlImpl interface. * Implementing class of SyncmlImpl interface.
*/ */
public class SyncmlServiceImpl implements SyncmlService { public class SyncmlServiceImpl implements SyncmlService {
private static Log log = LogFactory.getLog(SyncmlServiceImpl.class); private static Log log = LogFactory.getLog(
org.wso2.carbon.device.mgt.mobile.windows.api.services.syncml.impl.SyncmlServiceImpl.class);
/** /**
* This method is used to generate and return Device object from the received information at * This method is used to generate and return Device object from the received information at
@ -118,7 +119,7 @@ public class SyncmlServiceImpl implements SyncmlService {
@Override @Override
public Response getResponse(Document request) public Response getResponse(Document request)
throws WindowsDeviceEnrolmentException, WindowsOperationException, NotificationManagementException, throws WindowsDeviceEnrolmentException, WindowsOperationException, NotificationManagementException,
WindowsConfigurationException { WindowsConfigurationException {
int msgId; int msgId;
int sessionId; int sessionId;
String user; String user;
@ -140,7 +141,7 @@ public class SyncmlServiceImpl implements SyncmlService {
getLocURI()); getLocURI());
msgId = syncmlHeader.getMsgID(); msgId = syncmlHeader.getMsgID();
if ((PluginConstants.SyncML.SYNCML_FIRST_MESSAGE_ID == msgId) && if ((PluginConstants.SyncML.SYNCML_FIRST_MESSAGE_ID == msgId) &&
(PluginConstants.SyncML.SYNCML_FIRST_SESSION_ID == sessionId)) { (PluginConstants.SyncML.SYNCML_FIRST_SESSION_ID == sessionId)) {
token = syncmlHeader.getCredential().getData(); token = syncmlHeader.getCredential().getData();
CacheEntry cacheToken = (CacheEntry) DeviceUtil.getCacheEntry(token); CacheEntry cacheToken = (CacheEntry) DeviceUtil.getCacheEntry(token);
@ -161,7 +162,7 @@ public class SyncmlServiceImpl implements SyncmlService {
return Response.status(Response.Status.UNAUTHORIZED).entity(msg).build(); return Response.status(Response.Status.UNAUTHORIZED).entity(msg).build();
} }
} else if (PluginConstants.SyncML.SYNCML_SECOND_MESSAGE_ID == msgId && } else if (PluginConstants.SyncML.SYNCML_SECOND_MESSAGE_ID == msgId &&
PluginConstants.SyncML.SYNCML_FIRST_SESSION_ID == sessionId) { PluginConstants.SyncML.SYNCML_FIRST_SESSION_ID == sessionId) {
if (enrollDevice(request)) { if (enrollDevice(request)) {
return Response.ok().entity(generateReply(syncmlDocument, null)).build(); return Response.ok().entity(generateReply(syncmlDocument, null)).build();
} else { } else {
@ -223,7 +224,7 @@ public class SyncmlServiceImpl implements SyncmlService {
* @throws WindowsOperationException * @throws WindowsOperationException
*/ */
private boolean enrollDevice(Document request) throws WindowsDeviceEnrolmentException, private boolean enrollDevice(Document request) throws WindowsDeviceEnrolmentException,
WindowsOperationException { WindowsOperationException {
String osVersion; String osVersion;
String imsi = null; String imsi = null;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -15,13 +15,13 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.wstep; package org.wso2.carbon.device.mgt.mobile.windows.api.services.wstep;
import org.wso2.carbon.mdm.mobileservices.windows.common.PluginConstants; import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.WAPProvisioningException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WAPProvisioningException;
import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.WindowsDeviceEnrolmentException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDeviceEnrolmentException;
import org.wso2.carbon.mdm.mobileservices.windows.services.wstep.beans.AdditionalContext; import org.wso2.carbon.device.mgt.mobile.windows.api.services.wstep.beans.AdditionalContext;
import org.wso2.carbon.mdm.mobileservices.windows.services.wstep.beans.RequestSecurityTokenResponse; import org.wso2.carbon.device.mgt.mobile.windows.api.services.wstep.beans.RequestSecurityTokenResponse;
import javax.jws.WebMethod; import javax.jws.WebMethod;
import javax.jws.WebParam; import javax.jws.WebParam;
@ -44,19 +44,20 @@ public interface CertificateEnrollmentService {
@WebMethod(operationName = "RequestSecurityToken") @WebMethod(operationName = "RequestSecurityToken")
@ResponseWrapper(localName = "RequestSecurityTokenResponseCollection", targetNamespace = @ResponseWrapper(localName = "RequestSecurityTokenResponseCollection", targetNamespace =
PluginConstants.WS_TRUST_TARGET_NAMESPACE) PluginConstants.WS_TRUST_TARGET_NAMESPACE)
public void requestSecurityToken( void requestSecurityToken(
@WebParam(name = "TokenType", targetNamespace = PluginConstants.WS_TRUST_TARGET_NAMESPACE) @WebParam(name = "TokenType", targetNamespace = PluginConstants.WS_TRUST_TARGET_NAMESPACE)
String tokenType, String tokenType,
@WebParam(name = "RequestType", targetNamespace = PluginConstants.WS_TRUST_TARGET_NAMESPACE) @WebParam(name = "RequestType", targetNamespace = PluginConstants.WS_TRUST_TARGET_NAMESPACE)
String requestType, String requestType,
@WebParam(name = "BinarySecurityToken", targetNamespace = PluginConstants @WebParam(name = "BinarySecurityToken", targetNamespace = PluginConstants
.WS_SECURITY_TARGET_NAMESPACE) .WS_SECURITY_TARGET_NAMESPACE)
String binarySecurityToken, String binarySecurityToken,
@WebParam(name = "AdditionalContext", targetNamespace = PluginConstants @WebParam(name = "AdditionalContext", targetNamespace = PluginConstants
.SOAP_AUTHORIZATION_TARGET_NAMESPACE) .SOAP_AUTHORIZATION_TARGET_NAMESPACE)
AdditionalContext additionalContext, AdditionalContext additionalContext,
@WebParam(mode = WebParam.Mode.OUT, name = "RequestSecurityTokenResponse", @WebParam(mode = WebParam.Mode.OUT, name = "RequestSecurityTokenResponse",
targetNamespace = PluginConstants.WS_TRUST_TARGET_NAMESPACE) targetNamespace = PluginConstants.WS_TRUST_TARGET_NAMESPACE)
javax.xml.ws.Holder<RequestSecurityTokenResponse> response) throws javax.xml.ws.Holder<RequestSecurityTokenResponse> response) throws
WindowsDeviceEnrolmentException, UnsupportedEncodingException, WAPProvisioningException; WindowsDeviceEnrolmentException, UnsupportedEncodingException,
WAPProvisioningException;
} }

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,9 +16,9 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.wstep.beans; package org.wso2.carbon.device.mgt.mobile.windows.api.services.wstep.beans;
import org.wso2.carbon.mdm.mobileservices.windows.common.PluginConstants; import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,9 +16,9 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.wstep.beans; package org.wso2.carbon.device.mgt.mobile.windows.api.services.wstep.beans;
import org.wso2.carbon.mdm.mobileservices.windows.common.PluginConstants; import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.*;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,9 +16,9 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.wstep.beans; package org.wso2.carbon.device.mgt.mobile.windows.api.services.wstep.beans;
import org.wso2.carbon.mdm.mobileservices.windows.common.PluginConstants; import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,9 +16,9 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.wstep.beans; package org.wso2.carbon.device.mgt.mobile.windows.api.services.wstep.beans;
import org.wso2.carbon.mdm.mobileservices.windows.common.PluginConstants; import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;

View File

@ -1,10 +1,10 @@
/* /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * you may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
@ -16,9 +16,9 @@
* under the License. * under the License.
*/ */
package org.wso2.carbon.mdm.mobileservices.windows.services.wstep.beans; package org.wso2.carbon.device.mgt.mobile.windows.api.services.wstep.beans;
import org.wso2.carbon.mdm.mobileservices.windows.common.PluginConstants; import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
@ -37,7 +37,7 @@ public class RequestSecurityTokenResponse implements Serializable {
@XmlElement(name = "RequestedSecurityToken", required = true, @XmlElement(name = "RequestedSecurityToken", required = true,
namespace = PluginConstants.WS_TRUST_TARGET_NAMESPACE) namespace = PluginConstants.WS_TRUST_TARGET_NAMESPACE)
private org.wso2.carbon.mdm.mobileservices.windows.services.wstep.beans.RequestedSecurityToken RequestedSecurityToken; private org.wso2.carbon.device.mgt.mobile.windows.api.services.wstep.beans.RequestedSecurityToken RequestedSecurityToken;
@XmlElement(name = "RequestID", namespace = PluginConstants.ENROLLMENT_POLICY_TARGET_NAMESPACE) @XmlElement(name = "RequestID", namespace = PluginConstants.ENROLLMENT_POLICY_TARGET_NAMESPACE)
private int RequestID; private int RequestID;
@ -50,11 +50,12 @@ public class RequestSecurityTokenResponse implements Serializable {
TokenType = tokenType; TokenType = tokenType;
} }
public org.wso2.carbon.mdm.mobileservices.windows.services.wstep.beans.RequestedSecurityToken getRequestedSecurityToken() { public org.wso2.carbon.device.mgt.mobile.windows.api.services.wstep.beans.RequestedSecurityToken getRequestedSecurityToken() {
return RequestedSecurityToken; return RequestedSecurityToken;
} }
public void setRequestedSecurityToken(org.wso2.carbon.mdm.mobileservices.windows.services.wstep.beans.RequestedSecurityToken requestedSecurityToken) { public void setRequestedSecurityToken(org.wso2.carbon.device.mgt.mobile.windows.api.services.wstep.beans.RequestedSecurityToken
requestedSecurityToken) {
RequestedSecurityToken = requestedSecurityToken; RequestedSecurityToken = requestedSecurityToken;
} }

Some files were not shown because too many files have changed in this diff Show More