License Management

revert-dabc3590
manoj 10 years ago
parent 40489f986d
commit 329f956f3d

@ -1,16 +1,19 @@
<?xml version="1.0"?>
<artifactType type="application/vnd.wso2-license+xml" shortName="license" singularLabel="License" pluralLabel="Licenses"
hasNamespace="false" iconSet="10">
<storagePath>/license/@{overview_provider}/@{overview_name}/@{overview_version}</storagePath>
<storagePath>/license/@{overview_provider}/@{overview_name}/@{overview_language}/@{overview_version}</storagePath>
<nameAttribute>overview_name</nameAttribute>
<ui>
<list>
<column name="Provider">
<column name="Device Type">
<data type="path" value="overview_provider" href="@{storagePath}"/>
</column>
<column name="Name">
<data type="path" value="overview_name" href="@{storagePath}"/>
</column>
<column name="Language">
<data type="path" value="overview_language" href="@{storagePath}"/>
</column>
<column name="Version">
<data type="path" value="overview_version" href="@{storagePath}"/>
</column>
@ -24,11 +27,17 @@
<field type="text" required="true">
<name>Name</name>
</field>
<field type="text" required="true">
<name>Language</name>
</field>
<field type="text" required="true">
<name>Version</name>
</field>
<field type="text">
<name>Createdtime</name>
<name>Validity From</name>
</field>
<field type="text">
<name>Validity To</name>
</field>
<field type="text-area">
<name>License</name>

@ -131,10 +131,9 @@ public class Device {
}
@GET
@Path("/device/license")
@Path("/license")
@Produces("text/plain")
public String getLicense() {
//TODO: need to implement fetch license from core
License license = null;
try {
try {
@ -147,7 +146,6 @@ public class Device {
}catch(DeviceManagementServiceException deviceMgtEx){
deviceMgtEx.printStackTrace();
}
return license.getLicenseText();
}
}

@ -69,7 +69,8 @@ public class CertificateEnrollmentServiceImpl implements CertificateEnrollmentSe
String wapProvisioningXmlFile;
DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
@Override public void RequestSecurityToken(String TokenType, String RequestType,
//@Override
public void RequestSecurityToken(String TokenType, String RequestType,
String BinarySecurityToken,
AdditionalContext AdditionalContext,
Holder<RequestSecurityTokenResponse> response) {
@ -109,18 +110,20 @@ public class CertificateEnrollmentServiceImpl implements CertificateEnrollmentSe
NodeList wapParm = dDoc.getElementsByTagName("parm");
/////////
wapParm.item(0).getParentNode().getAttributes().getNamedItem("type").setTextContent(String.valueOf(
/* wapParm.item(0).getParentNode().getAttributes().getNamedItem("type").setTextContent(String.valueOf(
DigestUtils.sha1Hex(rooCACertificate.getEncoded())));
/////////
*/ /////////
NamedNodeMap rootCertAttributes = wapParm.item(0).getAttributes();
Node b64Encoded = rootCertAttributes.getNamedItem("value");
rootCertEncodedString=rootCertEncodedString.replaceAll("\n","");
b64Encoded.setTextContent(rootCertEncodedString);
System.out.println("COPY_ROOT_CERT:"+rootCertEncodedString);
/////////
wapParm.item(1).getParentNode().getAttributes().getNamedItem("type").setTextContent(String.valueOf(DigestUtils.sha1Hex(signedCert.getEncoded())));
/////////
/////////
/////////
/*
wapParm.item(1).getParentNode().getAttributes().getNamedItem("type").setTextContent(String.valueOf(DigestUtils.sha1Hex(signedCert.getEncoded())));
*/

Loading…
Cancel
Save