mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-02 06:45:59 +01:00
Move Roster Item Exchange code to legacy project
XEP-93 has been deprecated and superseded by XEP-144.
This commit is contained in:
parent
fa289eac04
commit
768700b301
10 changed files with 72 additions and 8 deletions
|
@ -13,5 +13,6 @@
|
|||
<className>org.jivesoftware.smackx.ExtensionsStartupClasses</className>
|
||||
<className>org.jivesoftware.smackx.ExperimentalProviderInitializer</className>
|
||||
<className>org.jivesoftware.smackx.WorkgroupProviderInitializer</className>
|
||||
<className>org.jivesoftware.smackx.LegacyProviderInitializer</className>
|
||||
</optionalStartupClasses>
|
||||
</smack>
|
||||
|
|
|
@ -15,14 +15,7 @@
|
|||
<namespace>jabber:iq:time</namespace>
|
||||
<className>org.jivesoftware.smackx.time.packet.Time</className>
|
||||
</iqProvider>
|
||||
|
||||
<!-- Roster Exchange -->
|
||||
<extensionProvider>
|
||||
<elementName>x</elementName>
|
||||
<namespace>jabber:x:roster</namespace>
|
||||
<className>org.jivesoftware.smackx.xroster.provider.RosterExchangeProvider</className>
|
||||
</extensionProvider>
|
||||
|
||||
|
||||
<!-- Message Events -->
|
||||
<extensionProvider>
|
||||
<elementName>x</elementName>
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
/**
|
||||
*
|
||||
* Copyright the original author or authors
|
||||
*
|
||||
* Licensed 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.jivesoftware.smackx;
|
||||
|
||||
import org.jivesoftware.smack.initializer.UrlProviderFileInitializer;
|
||||
|
||||
public class LegacyProviderInitializer extends UrlProviderFileInitializer {
|
||||
|
||||
@Override
|
||||
protected String getFilePath() {
|
||||
return "classpath:org.jivesoftware.smackx/legacy.providers";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- Providers file for legacy Smack extensions -->
|
||||
<smackProviders>
|
||||
|
||||
<!-- Roster Exchange -->
|
||||
<extensionProvider>
|
||||
<elementName>x</elementName>
|
||||
<namespace>jabber:x:roster</namespace>
|
||||
<className>org.jivesoftware.smackx.xroster.provider.RosterExchangeProvider</className>
|
||||
</extensionProvider>
|
||||
|
||||
</smackProviders>
|
|
@ -0,0 +1,31 @@
|
|||
/**
|
||||
*
|
||||
* Copyright the original author or authors
|
||||
*
|
||||
* Licensed 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.jivesoftware.smackx;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class LegacyProviderInitializerTest {
|
||||
|
||||
@Test
|
||||
public void testWorkgroupProviderInitializer() {
|
||||
LegacyProviderInitializer lpi = new LegacyProviderInitializer();
|
||||
lpi.initialize();
|
||||
assertTrue(lpi.getExceptions().size() == 0);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue