@UpnpAction( out = { @UpnpOutputArgument( name = "Result", stateVariable = "A_ARG_TYPE_Result", getterName = "getResult"), @UpnpOutputArgument( name = "NumberReturned", stateVariable = "A_ARG_TYPE_Count", getterName = "getCount"), @UpnpOutputArgument( name = "TotalMatches", stateVariable = "A_ARG_TYPE_Count", getterName = "getTotalMatches"), @UpnpOutputArgument( name = "UpdateID", stateVariable = "A_ARG_TYPE_UpdateID", getterName = "getContainerUpdateID") }) public BrowseResult search( @UpnpInputArgument(name = "ContainerID", stateVariable = "A_ARG_TYPE_ObjectID") String containerId, @UpnpInputArgument(name = "SearchCriteria") String searchCriteria, @UpnpInputArgument(name = "Filter") String filter, @UpnpInputArgument(name = "StartingIndex", stateVariable = "A_ARG_TYPE_Index") UnsignedIntegerFourBytes firstResult, @UpnpInputArgument(name = "RequestedCount", stateVariable = "A_ARG_TYPE_Count") UnsignedIntegerFourBytes maxResults, @UpnpInputArgument(name = "SortCriteria") String orderBy) throws ContentDirectoryException { SortCriterion[] orderByCriteria; try { orderByCriteria = SortCriterion.valueOf(orderBy); } catch (Exception ex) { throw new ContentDirectoryException( ContentDirectoryErrorCode.UNSUPPORTED_SORT_CRITERIA, ex.toString()); } try { return search( containerId, searchCriteria, filter, firstResult.getValue(), maxResults.getValue(), orderByCriteria); } catch (ContentDirectoryException ex) { throw ex; } catch (Exception ex) { throw new ContentDirectoryException(ErrorCode.ACTION_FAILED, ex.toString()); } }
/** * Call this method after making changes to your content directory. * * <p>This will notify clients that their view of the content directory is potentially outdated * and has to be refreshed. */ protected synchronized void changeSystemUpdateID() { Long oldUpdateID = getSystemUpdateID().getValue(); systemUpdateID.increment(true); getPropertyChangeSupport() .firePropertyChange("SystemUpdateID", oldUpdateID, getSystemUpdateID().getValue()); }